diff options
author | René Scharfe <l.s.r@web.de> | 2014-07-05 21:35:01 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-07-07 14:10:13 -0700 |
commit | 21711ca4b2a387b587c90e0ad8a98170e4b006e4 (patch) | |
tree | 65b14a2718b82817ba774a3e50163241cfc973f4 /t/t5000-tar-tree.sh | |
parent | 6f92e5ff3cdc813de8ef5327fd4bad492fb7d6c9 (diff) | |
download | git-21711ca4b2a387b587c90e0ad8a98170e4b006e4.tar.gz |
t5000, t5003: simplify commitrs/simplify-archive-tests
Add the whole directory of test files at once using git add instead of
calling git update-index on each of them and use git commit instead of
the plumbing commands write-tree, update-ref and commit-tree to build
the commit. This simplifies the code considerably.
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5000-tar-tree.sh')
-rwxr-xr-x | t/t5000-tar-tree.sh | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/t/t5000-tar-tree.sh b/t/t5000-tar-tree.sh index 899c1c5bbc..7b8babd89b 100755 --- a/t/t5000-tar-tree.sh +++ b/t/t5000-tar-tree.sh @@ -119,14 +119,10 @@ test_expect_success \ 'echo ignore me >a/ignored && echo ignored export-ignore >.git/info/attributes' -test_expect_success \ - 'add files to repository' \ - 'find a -type f | xargs git update-index --add && - find a -type l | xargs git update-index --add && - treeid=$(git write-tree) && - echo $treeid >treeid && - git update-ref HEAD $(TZ=GMT GIT_COMMITTER_DATE="2005-05-27 22:00:00" \ - git commit-tree $treeid </dev/null)' +test_expect_success 'add files to repository' ' + git add a && + GIT_COMMITTER_DATE="2005-05-27 22:00" git commit -m initial +' test_expect_success 'setup export-subst' ' echo "substfile?" export-subst >>.git/info/attributes && |