mirror of
https://github.com/git/git
synced 2024-08-28 12:09:19 +00:00
Prepare testsuite for a "git clone" that packs refs
t5515-fetch-merge-logic removes many, but not all, refs between each test. This is done by removing the corresponding refs/foo/* files in the .git/refs hierarchy. However, once "git clone" starts producing packed refs, these refs will no longer be in the .git/refs hierarchy, but rather listed in .git/packed-refs. This patch teaches t5515-fetch-merge-logic to remove the refs using "git update-ref -d" which properly handles packed refs. Signed-off-by: Johan Herland <johan@herland.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
94e724a741
commit
d0d12b4768
|
@ -142,9 +142,12 @@ do
|
||||||
set x $cmd; shift
|
set x $cmd; shift
|
||||||
git symbolic-ref HEAD refs/heads/$1 ; shift
|
git symbolic-ref HEAD refs/heads/$1 ; shift
|
||||||
rm -f .git/FETCH_HEAD
|
rm -f .git/FETCH_HEAD
|
||||||
rm -f .git/refs/heads/*
|
git for-each-ref \
|
||||||
rm -f .git/refs/remotes/rem/*
|
refs/heads refs/remotes/rem refs/tags |
|
||||||
rm -f .git/refs/tags/*
|
while read val type refname
|
||||||
|
do
|
||||||
|
git update-ref -d "$refname" "$val"
|
||||||
|
done
|
||||||
git fetch "$@" >/dev/null
|
git fetch "$@" >/dev/null
|
||||||
cat .git/FETCH_HEAD
|
cat .git/FETCH_HEAD
|
||||||
} >"$actual_f" &&
|
} >"$actual_f" &&
|
||||||
|
|
Loading…
Reference in a new issue