{"thread":{"id":"6448","subject":"[PATCH] honor GIT_REFLOG_ACTION in git-commit","startedAt":"2007-01-20T01:12:11Z","lastAt":"2007-01-20T02:22:06Z","messageCount":3,"participants":["Junio C Hamano","Shawn O. Pearce"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"32120","messageId":"7vfya6bixg.fsf@assigned-by-dhcp.cox.net","threadId":"6448","inReplyTo":null,"subject":"[PATCH] honor GIT_REFLOG_ACTION in git-commit","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-01-20T01:12:11Z","receivedAt":"2007-01-20T01:12:11Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"This allows git-cherry-pick and git-revert to properly identify\nthemselves in the resulting reflog entries.  Earlier they were\nrecorded as what git-commit has done.\n\nSigned-off-by: Junio C Hamano <junkio@cox.net>\n---\ndiff --git a/git-commit.sh b/git-commit.sh\nindex e23918c..eb211e5 100755\n--- a/git-commit.sh\n+++ b/git-commit.sh\n@@ -524,6 +524,7 @@ else\n \trloga='commit (initial)'\n \tcurrent=''\n fi\n+set_reflog_action \"$rloga\"\n \n if test -z \"$no_edit\"\n then\n@@ -598,7 +599,7 @@ then\n \tfi &&\n \tcommit=$(cat \"$GIT_DIR\"/COMMIT_MSG | git-commit-tree $tree $PARENTS) &&\n \trlogm=$(sed -e 1q \"$GIT_DIR\"/COMMIT_MSG) &&\n-\tgit-update-ref -m \"$rloga: $rlogm\" HEAD $commit \"$current\" &&\n+\tgit-update-ref -m \"$GIT_REFLOG_ACTION: $rlogm\" HEAD $commit \"$current\" &&\n \trm -f -- \"$GIT_DIR/MERGE_HEAD\" \"$GIT_DIR/MERGE_MSG\" &&\n \tif test -f \"$NEXT_INDEX\"\n \tthen\ndiff --git a/git-revert.sh b/git-revert.sh\nindex bb8f1ca..8207c9e 100755\n--- a/git-revert.sh\n+++ b/git-revert.sh\n@@ -54,6 +54,8 @@ do\n \tshift\n done\n \n+set_reflog_action \"$me\"\n+\n test \"$me,$replay\" = \"revert,t\" && usage\n \n case \"$no_commit\" in\n"},{"id":"32133","messageId":"20070120021557.GB11073@spearce.org","threadId":"6448","inReplyTo":"7vfya6bixg.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] honor GIT_REFLOG_ACTION in git-commit","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2007-01-20T02:15:58Z","receivedAt":"2007-01-20T02:15:58Z","isPatch":true,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Junio C Hamano <junkio@cox.net> wrote:\n> This allows git-cherry-pick and git-revert to properly identify\n> themselves in the resulting reflog entries.  Earlier they were\n> recorded as what git-commit has done.\n\nNot sure how I missed that one when I introduced GIT_REFLOG_ACTION,\nbut thanks for finding and fixing it.  :-)\n\n-- \nShawn.\n"},{"id":"32134","messageId":"7vvej2a14h.fsf@assigned-by-dhcp.cox.net","threadId":"6448","inReplyTo":"20070120021557.GB11073@spearce.org","subject":"Re: [PATCH] honor GIT_REFLOG_ACTION in git-commit","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-01-20T02:22:06Z","receivedAt":"2007-01-20T02:22:06Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Shawn O. Pearce\" <spearce@spearce.org> writes:\n\n> Junio C Hamano <junkio@cox.net> wrote:\n>> This allows git-cherry-pick and git-revert to properly identify\n>> themselves in the resulting reflog entries.  Earlier they were\n>> recorded as what git-commit has done.\n>\n> Not sure how I missed that one when I introduced GIT_REFLOG_ACTION,\n> but thanks for finding and fixing it.  :-)\n\nThe fact that it went unnoticed for this long time shows how we\nlack proper tools to read the message part of the reflog,\nalthough we use @{N} and @{ago} notation every day and some\npeople might even rely on it.  I'd like to do something about\nit, and my earlier \"show-branch --reflog\" enhancement series\n(I'll park that in 'next' for now) was my attempt for that goal.\n\nI found this out by accident while working on it.\n"}]}