honor GIT_REFLOG_ACTION in git-commit
This allows git-cherry-pick and git-revert to properly identify themselves in the resulting reflog entries. Earlier they were recorded as what git-commit has done. Signed-off-by: Junio C Hamano <junkio@cox.net>
Junio C Hamano committed
Jan 19, 2007 at 17:12 UTC
23913dc713a4f5b5228258919769ff1ab0a74a2b
2 files changed
+4
-1
git-commit.sh
+2
-1
@@ -528,6 +528,7 @@ else
528
rloga='commit (initial)'
529
current=''
530
fi
531
+set_reflog_action "$rloga"
532
533
if test -z "$no_edit"
534
then
@@ -602,7 +603,7 @@ then
603
fi &&
604
commit=$(cat "$GIT_DIR"/COMMIT_MSG | git-commit-tree $tree $PARENTS) &&
605
rlogm=$(sed -e 1q "$GIT_DIR"/COMMIT_MSG) &&
605
- git-update-ref -m "$rloga: $rlogm" HEAD $commit "$current" &&
606
+ git-update-ref -m "$GIT_REFLOG_ACTION: $rlogm" HEAD $commit "$current" &&
607
rm -f -- "$GIT_DIR/MERGE_HEAD" "$GIT_DIR/MERGE_MSG" &&
608
if test -f "$NEXT_INDEX"
609
then
git-revert.sh
+2
@@ -54,6 +54,8 @@ do
54
shift
55
done
56
57
+set_reflog_action "$me"
58
+
59
test "$me,$replay" = "revert,t" && usage
60
61
case "$no_commit" in