{"thread":{"id":"4209","subject":"[PATCH 3/5] Include ref log detail in commit, reset, etc.","startedAt":"2006-05-19T09:16:18Z","lastAt":"2006-05-19T09:16:18Z","messageCount":1,"participants":["Shawn Pearce"],"isPatch":true,"patchVersion":1,"patchTotal":5},"messages":[{"id":"20283","messageId":"20060519091618.GK22257@spearce.org","threadId":"4209","inReplyTo":null,"subject":"[PATCH 3/5] Include ref log detail in commit, reset, etc.","fromName":"Shawn Pearce","fromEmail":"spearce@spearce.org","sentAt":"2006-05-19T09:16:18Z","receivedAt":"2006-05-19T09:16:18Z","isPatch":true,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"When updating a ref at the direction of the user include a reason why\nhead was changed as part of the ref log (assuming it was enabled).\n\nSigned-off-by: Shawn O. Pearce <spearce@spearce.org>\n\n---\n\n git-am.sh         |    2 +-\n git-applypatch.sh |    2 +-\n git-branch.sh     |    2 +-\n git-commit.sh     |    3 ++-\n git-reset.sh      |    2 +-\n 5 files changed, 6 insertions(+), 5 deletions(-)\n\n2a83d6835922e222caadf03b25ebc72e773291ff\ndiff --git a/git-am.sh b/git-am.sh\nindex 97ec2d0..4232e27 100755\n--- a/git-am.sh\n+++ b/git-am.sh\n@@ -413,7 +413,7 @@ do\n \tparent=$(git-rev-parse --verify HEAD) &&\n \tcommit=$(git-commit-tree $tree -p $parent <\"$dotest/final-commit\") &&\n \techo Committed: $commit &&\n-\tgit-update-ref HEAD $commit $parent ||\n+\tgit-update-ref -m \"am: $SUBJECT\" HEAD $commit $parent ||\n \tstop_here $this\n \n \tif test -x \"$GIT_DIR\"/hooks/post-applypatch\ndiff --git a/git-applypatch.sh b/git-applypatch.sh\nindex 12cab1e..e4b0947 100755\n--- a/git-applypatch.sh\n+++ b/git-applypatch.sh\n@@ -204,7 +204,7 @@ echo Wrote tree $tree\n parent=$(git-rev-parse --verify HEAD) &&\n commit=$(git-commit-tree $tree -p $parent <\"$final\") || exit 1\n echo Committed: $commit\n-git-update-ref HEAD $commit $parent || exit\n+git-update-ref -m \"applypatch: $SUBJECT\" HEAD $commit $parent || exit\n \n if test -x \"$GIT_DIR\"/hooks/post-applypatch\n then\ndiff --git a/git-branch.sh b/git-branch.sh\nindex 134e68c..d1e3730 100755\n--- a/git-branch.sh\n+++ b/git-branch.sh\n@@ -117,4 +117,4 @@ then\n \t\tdie \"cannot force-update the current branch.\"\n \tfi\n fi\n-git update-ref \"refs/heads/$branchname\" $rev\n+git update-ref -m \"branch: Created from $head\" \"refs/heads/$branchname\" $rev\ndiff --git a/git-commit.sh b/git-commit.sh\nindex 6ef1a9d..a4b0a90 100755\n--- a/git-commit.sh\n+++ b/git-commit.sh\n@@ -676,7 +676,8 @@ then\n \t\trm -f \"$TMP_INDEX\"\n \tfi &&\n \tcommit=$(cat \"$GIT_DIR\"/COMMIT_MSG | git-commit-tree $tree $PARENTS) &&\n-\tgit-update-ref HEAD $commit $current &&\n+\trlogm=$(sed -e 1q \"$GIT_DIR\"/COMMIT_MSG) &&\n+\tgit-update-ref -m \"commit: $rlogm\" HEAD $commit $current &&\n \trm -f -- \"$GIT_DIR/MERGE_HEAD\" &&\n \tif test -f \"$NEXT_INDEX\"\n \tthen\ndiff --git a/git-reset.sh b/git-reset.sh\nindex 0ee3e3e..296f3b7 100755\n--- a/git-reset.sh\n+++ b/git-reset.sh\n@@ -48,7 +48,7 @@ then\n else\n \trm -f \"$GIT_DIR/ORIG_HEAD\"\n fi\n-git-update-ref HEAD \"$rev\"\n+git-update-ref -m \"reset $reset_type $@\" HEAD \"$rev\"\n \n case \"$reset_type\" in\n --hard )\n-- \n1.3.2.g7278\n"}]}