Skip to content

Commit df4d7d5

Browse files
committed
Merge branch 'rs/simplify-archive-tests'
* rs/simplify-archive-tests: t5000, t5003: simplify commit
2 parents b41a463 + 21711ca commit df4d7d5

File tree

2 files changed

+8
-16
lines changed

2 files changed

+8
-16
lines changed

t/t5000-tar-tree.sh

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -119,14 +119,10 @@ test_expect_success \
119119
'echo ignore me >a/ignored &&
120120
echo ignored export-ignore >.git/info/attributes'
121121

122-
test_expect_success \
123-
'add files to repository' \
124-
'find a -type f | xargs git update-index --add &&
125-
find a -type l | xargs git update-index --add &&
126-
treeid=$(git write-tree) &&
127-
echo $treeid >treeid &&
128-
git update-ref HEAD $(TZ=GMT GIT_COMMITTER_DATE="2005-05-27 22:00:00" \
129-
git commit-tree $treeid </dev/null)'
122+
test_expect_success 'add files to repository' '
123+
git add a &&
124+
GIT_COMMITTER_DATE="2005-05-27 22:00" git commit -m initial
125+
'
130126

131127
test_expect_success 'setup export-subst' '
132128
echo "substfile?" export-subst >>.git/info/attributes &&

t/t5003-archive-zip.sh

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,10 @@ test_expect_success \
6161
'echo ignore me >a/ignored &&
6262
echo ignored export-ignore >.git/info/attributes'
6363

64-
test_expect_success \
65-
'add files to repository' \
66-
'find a -type f | xargs git update-index --add &&
67-
find a -type l | xargs git update-index --add &&
68-
treeid=`git write-tree` &&
69-
echo $treeid >treeid &&
70-
git update-ref HEAD $(TZ=GMT GIT_COMMITTER_DATE="2005-05-27 22:00:00" \
71-
git commit-tree $treeid </dev/null)'
64+
test_expect_success 'add files to repository' '
65+
git add a &&
66+
GIT_COMMITTER_DATE="2005-05-27 22:00" git commit -m initial
67+
'
7268

7369
test_expect_success 'setup export-subst' '
7470
echo "substfile?" export-subst >>.git/info/attributes &&

0 commit comments

Comments
 (0)