{"thread":{"id":"4284","subject":"[PATCH] Verify git-commit provides a reflog message.","startedAt":"2006-05-25T03:33:18Z","lastAt":"2006-05-25T03:33:18Z","messageCount":1,"participants":["Shawn Pearce"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"20663","messageId":"20060525033318.GB4403@spearce.org","threadId":"4284","inReplyTo":null,"subject":"[PATCH] Verify git-commit provides a reflog message.","fromName":"Shawn Pearce","fromEmail":"spearce@spearce.org","sentAt":"2006-05-25T03:33:18Z","receivedAt":"2006-05-25T03:33:18Z","isPatch":true,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"The reflog message from git-commit should include the first line\nof the commit message as supplied by the user.\n\nSigned-off-by: Shawn O. Pearce <spearce@spearce.org>\n---\n t/t1400-update-ref.sh |   38 ++++++++++++++++++++++++++------------\n 1 files changed, 26 insertions(+), 12 deletions(-)\n\ndiff --git a/t/t1400-update-ref.sh b/t/t1400-update-ref.sh\nindex f6b076b..2b1f4c8 100755\n--- a/t/t1400-update-ref.sh\n+++ b/t/t1400-update-ref.sh\n@@ -178,22 +178,36 @@ rm -f .git/$m .git/logs/$m expect\n \n test_expect_success \\\n     'creating initial files' \\\n-    'cp ../../COPYING COPYING &&\n-     git-add COPYING &&\n+    'echo TEST >F &&\n+     git-add F &&\n+\t GIT_AUTHOR_DATE=\"2005-05-26 23:30\" \\\n \t GIT_COMMITTER_DATE=\"2005-05-26 23:30\" git-commit -m add -a &&\n-\t cp ../../Makefile COPYING &&\n-\t GIT_COMMITTER_DATE=\"2005-05-26 23:41\" git-commit -m change -a'\n+\t h_TEST=$(git-rev-parse --verify HEAD)\n+\t echo The other day this did not work. >M &&\n+\t echo And then Bob told me how to fix it. >>M &&\n+\t echo OTHER >F &&\n+\t GIT_AUTHOR_DATE=\"2005-05-26 23:41\" \\\n+\t GIT_COMMITTER_DATE=\"2005-05-26 23:41\" git-commit -F m -a &&\n+\t h_OTHER=$(git-rev-parse --verify HEAD)\n+\t rm -f m'\n+\n+cat >expect <<EOF\n+$Z $h_TEST $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150200 +0000\tcommit: add\n+$h_TEST $h_OTHER $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150860 +0000\tcommit: The other day this did not work.\n+EOF\n+test_expect_success \\\n+\t'git-commit logged updates' \\\n+\t'diff expect .git/logs/$m'\n+unset h_TEST h_OTHER\n \n test_expect_success \\\n-\t'git-cat-file blob master:COPYING (expect Makefile)' \\\n-\t'git-cat-file blob master:COPYING | diff - ../../Makefile'\n+\t'git-cat-file blob master:F (expect OTHER)' \\\n+\t'test OTHER = $(git-cat-file blob master:F)'\n test_expect_success \\\n-\t'git-cat-file blob master@{2005-05-26 23:30}:COPYING (expect COPYING)' \\\n-\t'git-cat-file blob \"master@{2005-05-26 23:30}:COPYING\" \\\n-\t  | diff - ../../COPYING'\n+\t'git-cat-file blob master@{2005-05-26 23:30}:F (expect TEST)' \\\n+\t'test TEST = $(git-cat-file blob \"master@{2005-05-26 23:30}:F\")'\n test_expect_success \\\n-\t'git-cat-file blob master@{2005-05-26 23:42}:COPYING (expect Makefile)' \\\n-\t'git-cat-file blob \"master@{2005-05-26 23:42}:COPYING\" \\\n-\t  | diff - ../../Makefile'\n+\t'git-cat-file blob master@{2005-05-26 23:42}:F (expect OTHER)' \\\n+\t'test OTHER = $(git-cat-file blob \"master@{2005-05-26 23:42}:F\")'\n \n test_done\n-- \n1.3.3.g45d8\n"}]}