From 5bdd8d4a3062ac8f29ec511fecb85049f6ff3ecc Mon Sep 17 00:00:00 2001 From: Clemens Buchacher Date: Wed, 5 Nov 2008 21:55:53 +0100 Subject: 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 Signed-off-by: Junio C Hamano --- t/t3210-pack-refs.sh | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 't/t3210-pack-refs.sh') 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 && -- cgit v1.2.3