From: Junio C Hamano <junkio@cox.net>
To: git@vger.kernel.org
Subject: [PATCH] honor GIT_REFLOG_ACTION in git-commit
Date: Fri, 19 Jan 2007 17:12:11 -0800 [thread overview]
Message-ID: <7vfya6bixg.fsf@assigned-by-dhcp.cox.net> (raw)
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>
---
diff --git a/git-commit.sh b/git-commit.sh
index e23918c..eb211e5 100755
--- a/git-commit.sh
+++ b/git-commit.sh
@@ -524,6 +524,7 @@ else
rloga='commit (initial)'
current=''
fi
+set_reflog_action "$rloga"
if test -z "$no_edit"
then
@@ -598,7 +599,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 bb8f1ca..8207c9e 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
next reply other threads:[~2007-01-20 1:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-20 1:12 Junio C Hamano [this message]
2007-01-20 2:15 ` [PATCH] honor GIT_REFLOG_ACTION in git-commit Shawn O. Pearce
2007-01-20 2:22 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vfya6bixg.fsf@assigned-by-dhcp.cox.net \
--to=junkio@cox.net \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox