diff options
author | Clemens Buchacher <drizzd@aon.at> | 2008-11-05 21:55:53 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-11-05 14:09:43 -0800 |
commit | 5bdd8d4a3062ac8f29ec511fecb85049f6ff3ecc (patch) | |
tree | d3b9070702938cd3f0455cca7894896ed5b1113c /t/t3210-pack-refs.sh | |
parent | 16088d8870b7da6d4dd280be2d1728dd3be346b5 (diff) | |
download | git-5bdd8d4a3062ac8f29ec511fecb85049f6ff3ecc.tar.gz |
do not force write of packed refs
We force writing a ref if it does not exist. Originally, we only had to look
for the ref file to check if it existed. Now we have to look for a packed ref
as well. Luckily, resolve_ref already does all the work for us.
Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3210-pack-refs.sh')
-rwxr-xr-x | t/t3210-pack-refs.sh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/t/t3210-pack-refs.sh b/t/t3210-pack-refs.sh index 087ef75061..413019acaf 100755 --- a/t/t3210-pack-refs.sh +++ b/t/t3210-pack-refs.sh @@ -96,6 +96,13 @@ test_expect_success \ git branch -d n/o/p && git branch n' +test_expect_success \ + 'see if up-to-date packed refs are preserved' \ + 'git branch q && + git pack-refs --all --prune && + git update-ref refs/heads/q refs/heads/q && + ! test -f .git/refs/heads/q' + test_expect_success 'pack, prune and repack' ' git tag foo && git pack-refs --all --prune && |