From 23913dc713a4f5b5228258919769ff1ab0a74a2b Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Fri, 19 Jan 2007 17:12:11 -0800 Subject: 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 diff --git a/git-commit.sh b/git-commit.sh index dc0fc3b..ec506d9 100755 --- a/git-commit.sh +++ b/git-commit.sh @@ -528,6 +528,7 @@ else rloga='commit (initial)' current='' fi +set_reflog_action "$rloga" if test -z "$no_edit" then @@ -602,7 +603,7 @@ then fi && commit=$(cat "$GIT_DIR"/COMMIT_MSG | git-commit-tree $tree $PARENTS) && rlogm=$(sed -e 1q "$GIT_DIR"/COMMIT_MSG) && - git-update-ref -m "$rloga: $rlogm" HEAD $commit "$current" && + git-update-ref -m "$GIT_REFLOG_ACTION: $rlogm" HEAD $commit "$current" && rm -f -- "$GIT_DIR/MERGE_HEAD" "$GIT_DIR/MERGE_MSG" && if test -f "$NEXT_INDEX" then diff --git a/git-revert.sh b/git-revert.sh index 866d622..49f0032 100755 --- a/git-revert.sh +++ b/git-revert.sh @@ -54,6 +54,8 @@ do shift done +set_reflog_action "$me" + test "$me,$replay" = "revert,t" && usage case "$no_commit" in -- cgit v0.10.2-6-g49f6