{"thread":{"id":"37062","subject":"[PATCH] t5000, t5003: simplify commit","startedAt":"2014-07-05T19:35:01Z","lastAt":"2014-07-05T19:35:01Z","messageCount":1,"participants":["René Scharfe"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"245428","messageId":"53B85365.6070304@web.de","threadId":"37062","inReplyTo":null,"subject":"[PATCH] t5000, t5003: simplify commit","fromName":"René Scharfe","fromEmail":"l.s.r@web.de","sentAt":"2014-07-05T19:35:01Z","receivedAt":"2014-07-05T19:35:01Z","isPatch":true,"sender":{"key":"l.s.r@web.de","avatar":"https://avatars.githubusercontent.com/u/26122331?v=4"},"body":"Add the whole directory of test files at once using git add instead of\ncalling git update-index on each of them and use git commit instead of\nthe plumbing commands write-tree, update-ref and commit-tree to build\nthe commit.  This simplifies the code considerably.\n\nSigned-off-by: Rene Scharfe <l.s.r@web.de>\n---\n t/t5000-tar-tree.sh    | 12 ++++--------\n t/t5003-archive-zip.sh | 12 ++++--------\n 2 files changed, 8 insertions(+), 16 deletions(-)\n\ndiff --git a/t/t5000-tar-tree.sh b/t/t5000-tar-tree.sh\nindex 899c1c5..7b8babd 100755\n--- a/t/t5000-tar-tree.sh\n+++ b/t/t5000-tar-tree.sh\n@@ -119,14 +119,10 @@ test_expect_success \\\n     'echo ignore me >a/ignored &&\n      echo ignored export-ignore >.git/info/attributes'\n \n-test_expect_success \\\n-    'add files to repository' \\\n-    'find a -type f | xargs git update-index --add &&\n-     find a -type l | xargs git update-index --add &&\n-     treeid=$(git write-tree) &&\n-     echo $treeid >treeid &&\n-     git update-ref HEAD $(TZ=GMT GIT_COMMITTER_DATE=\"2005-05-27 22:00:00\" \\\n-     git commit-tree $treeid </dev/null)'\n+test_expect_success 'add files to repository' '\n+\tgit add a &&\n+\tGIT_COMMITTER_DATE=\"2005-05-27 22:00\" git commit -m initial\n+'\n \n test_expect_success 'setup export-subst' '\n \techo \"substfile?\" export-subst >>.git/info/attributes &&\ndiff --git a/t/t5003-archive-zip.sh b/t/t5003-archive-zip.sh\nindex 21a5c93..c929db5 100755\n--- a/t/t5003-archive-zip.sh\n+++ b/t/t5003-archive-zip.sh\n@@ -61,14 +61,10 @@ test_expect_success \\\n     'echo ignore me >a/ignored &&\n      echo ignored export-ignore >.git/info/attributes'\n \n-test_expect_success \\\n-    'add files to repository' \\\n-    'find a -type f | xargs git update-index --add &&\n-     find a -type l | xargs git update-index --add &&\n-     treeid=`git write-tree` &&\n-     echo $treeid >treeid &&\n-     git update-ref HEAD $(TZ=GMT GIT_COMMITTER_DATE=\"2005-05-27 22:00:00\" \\\n-     git commit-tree $treeid </dev/null)'\n+test_expect_success 'add files to repository' '\n+\tgit add a &&\n+\tGIT_COMMITTER_DATE=\"2005-05-27 22:00\" git commit -m initial\n+'\n \n test_expect_success 'setup export-subst' '\n \techo \"substfile?\" export-subst >>.git/info/attributes &&\n-- \n2.0.0\n"}]}