[PATCH 2/2] dim: log git --version in rerere cache commits
Jani Nikula
jani.nikula at intel.com
Wed Oct 11 15:31:28 UTC 2017
Make it easier to debug potential issues in rerere cache
handling. Adding the commit message using a temp file also makes it
easier to add more breadcrumbs in the future.
---
dim | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/dim b/dim
index 4b65eb26f1a1..8dd2e62279cc 100755
--- a/dim
+++ b/dim
@@ -617,11 +617,21 @@ function commit_rerere_cache
done
find rr-cache/ -mtime -1 -type f -not -name "thisimage*" -print0 | xargs -0 git add > /dev/null || true
git rm rr-cache/rr-cache &> /dev/null || true
- if git commit -m "$time: $integration_branch rerere cache update" >& /dev/null; then
+
+ commit_message=$(mktemp)
+ cat > $commit_message <<-EOF
+ $time: $integration_branch rerere cache update
+
+ $(git --version)
+ EOF
+
+ if git commit -F $commit_message >& /dev/null; then
echo -n "New commit. "
else
echo -n "Nothing changed. "
fi
+ rm $commit_message
+
echo -n "Pushing rerere cache... "
git push $DRY_RUN $remote HEAD >& /dev/null && echo "Done."
}
--
2.11.0
More information about the dim-tools
mailing list