set x $cmd; shift
git symbolic-ref HEAD refs/heads/$1 ; shift
rm -f .git/FETCH_HEAD
- rm -f .git/refs/heads/*
- rm -f .git/refs/remotes/rem/*
- rm -f .git/refs/tags/*
+ git for-each-ref \
+ refs/heads refs/remotes/rem refs/tags |
+ while read val type refname
+ do
+ git update-ref -d "$refname" "$val"
+ done
git fetch "$@" >/dev/null
cat .git/FETCH_HEAD
} >"$actual_f" &&
git show-ref >"$actual_r" &&
if test -f "$expect_f"
then
- git diff -u "$expect_f" "$actual_f" &&
+ test_cmp "$expect_f" "$actual_f" &&
rm -f "$actual_f"
else
# this is to help developing new tests.
fi &&
if test -f "$expect_r"
then
- git diff -u "$expect_r" "$actual_r" &&
+ test_cmp "$expect_r" "$actual_r" &&
rm -f "$actual_r"
else
# this is to help developing new tests.