Skip to content

Commit a033233

Browse files
peffgitster
authored andcommitted
t7700: do not use "touch" unnecessarily
Some versions of touch (such as /usr/ucb/touch on Solaris) do not know about the "-r" option. This would make sense as a feature of test-chmtime, but fortunately this fix is even easier. The test does not care about the timestamp of the .keep file it creates at all, only that it exists. For such a use case, with or without portability issues around "-r", "touch" should not be used in the first place. Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 088304b commit a033233

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

t/t7700-repack.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ test_expect_success 'objects in packs marked .keep are not repacked' '
1717
# The second pack will contain the excluded object
1818
packsha1=$(git rev-list --objects --all | grep file2 |
1919
git pack-objects pack) &&
20-
touch -r pack-$packsha1.pack pack-$packsha1.keep &&
20+
>pack-$packsha1.keep &&
2121
objsha1=$(git verify-pack -v pack-$packsha1.idx | head -n 1 |
2222
sed -e "s/^\([0-9a-f]\{40\}\).*/\1/") &&
2323
mv pack-* .git/objects/pack/ &&

0 commit comments

Comments
 (0)