{"thread":{"id":"725","subject":"[PATCH] fix and testcase for git-commit-tree option","startedAt":"2005-05-26T23:03:26Z","lastAt":"2005-05-26T23:03:26Z","messageCount":1,"participants":["Rene Scharfe"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"4009","messageId":"20050526230326.GA14736@lsrfire.ath.cx","threadId":"725","inReplyTo":null,"subject":"[PATCH] fix and testcase for git-commit-tree option","fromName":"Rene Scharfe","fromEmail":"rene.scharfe@lsrfire.ath.cx","sentAt":"2005-05-26T23:03:26Z","receivedAt":"2005-05-26T23:03:26Z","isPatch":true,"sender":{"key":"l.s.r@web.de","avatar":"https://avatars.githubusercontent.com/u/26122331?v=4"},"body":"Actually use GIT_COMMITTER_DATE in git-commit-tree.\n\nSigned-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>\n\n---\ncommit 00a2437bb75c5c3521f199faa044481783de45aa\ntree 97976f550804169368e1e30cd26ead9980461a84\nparent 2eab945e865317cb7d390aec214303f1d931b53a\nauthor lsr <lsr@linux> Fri, 27 May 2005 00:53:30 +0200\ncommitter lsr <lsr@linux> Fri, 27 May 2005 00:53:30 +0200\n\n commit-tree.c                  |    2 -\n t/t1100-commit-tree-options.sh |   45 +++++++++++++++++++++++++++++++++++++++++\n 2 files changed, 46 insertions(+), 1 deletion(-)\n\nIndex: commit-tree.c\n===================================================================\n--- dbec0de73e52d5b6d0740dd2e226d3ce8e2e51fd/commit-tree.c  (mode:100644)\n+++ 97976f550804169368e1e30cd26ead9980461a84/commit-tree.c  (mode:100644)\n@@ -153,7 +153,7 @@\n \t\tparse_date(audate, date, sizeof(date));\n \tcmdate = gitenv(\"GIT_COMMITTER_DATE\");\n \tif (cmdate)\n-\t\tparse_date(audate, realdate, sizeof(realdate));\n+\t\tparse_date(cmdate, realdate, sizeof(realdate));\n \n \tremove_special(gecos); remove_special(realgecos); remove_special(commitgecos);\n \tremove_special(email); remove_special(realemail); remove_special(commitemail);\nIndex: t/t1100-commit-tree-options.sh\n===================================================================\n--- /dev/null  (tree:dbec0de73e52d5b6d0740dd2e226d3ce8e2e51fd)\n+++ 97976f550804169368e1e30cd26ead9980461a84/t/t1100-commit-tree-options.sh  (mode:100755)\n@@ -0,0 +1,45 @@\n+#!/bin/sh\n+#\n+# Copyright (C) 2005 Rene Scharfe\n+#\n+\n+test_description='git-commit-tree options test\n+\n+This test checks that git-commit-tree can create a specific commit\n+object by defining all environment variables that it understands.\n+'\n+\n+. ./test-lib.sh\n+\n+cat >expected <<EOF\n+tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904\n+author Author Name <author@email> 1117148400 +0000\n+committer Committer Name <committer@email> 1117150200 +0000\n+\n+comment text\n+EOF\n+\n+test_expect_success \\\n+    'test preparation: write empty tree' \\\n+    'git-write-tree >treeid'\n+\n+test_expect_success \\\n+    'construct commit' \\\n+    'echo comment text |\n+     GIT_AUTHOR_NAME=\"Author Name\" \\\n+     GIT_AUTHOR_EMAIL=\"author@email\" \\\n+     GIT_AUTHOR_DATE=\"2005-05-26 23:00\" \\\n+     GIT_COMMITTER_NAME=\"Committer Name\" \\\n+     GIT_COMMITTER_EMAIL=\"committer@email\" \\\n+     GIT_COMMITTER_DATE=\"2005-05-26 23:30\" \\\n+     TZ= git-commit-tree `cat treeid` >commitid 2>/dev/null'\n+\n+test_expect_success \\\n+    'read commit' \\\n+    'git-cat-file commit `cat commitid` >commit'\n+\n+test_expect_success \\\n+    'compare commit' \\\n+    'diff expected commit'\n+\n+test_done\n"}]}