git rebase --abort: always restore the right commit
[git] / t / t5304-prune.sh
1 #!/bin/sh
2 #
3 # Copyright (c) 2008 Johannes E. Schindelin
4 #
5
6 test_description='prune'
7 . ./test-lib.sh
8
9 test_expect_success setup '
10
11         : > file &&
12         git add file &&
13         test_tick &&
14         git commit -m initial &&
15         git gc
16
17 '
18
19 test_expect_success 'prune stale packs' '
20
21         orig_pack=$(echo .git/objects/pack/*.pack) &&
22         : > .git/objects/tmp_1.pack &&
23         : > .git/objects/tmp_2.pack &&
24         test-chmtime -86501 .git/objects/tmp_1.pack &&
25         git prune --expire 1.day &&
26         test -f $orig_pack &&
27         test -f .git/objects/tmp_2.pack &&
28         ! test -f .git/objects/tmp_1.pack
29
30 '
31
32 test_done