aboutsummaryrefslogtreecommitdiff
path: root/t/t5516-fetch-push.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-11-08 21:33:55 -0800
committerJunio C Hamano <gitster@pobox.com>2008-11-08 21:33:55 -0800
commitbc9c0248a5cf184756ba562d6c452cace8863517 (patch)
treefac1220b800f9656c81ccc4b105a6f7626e850ce /t/t5516-fetch-push.sh
parent5fe9cd02c2639dbe4430fab6bc220d561b28aa93 (diff)
parent7c181d627c136cbc67ef0f722e74e34017e662f0 (diff)
downloadgit-bc9c0248a5cf184756ba562d6c452cace8863517.tar.gz
git-bc9c0248a5cf184756ba562d6c452cace8863517.tar.xz
Merge branch 'maint'
* maint: GIT 1.6.0.4 Update RPM spec for the new location of git-cvsserver. push: fix local refs update if already up-to-date do not force write of packed refs Conflicts: builtin-revert.c
Diffstat (limited to 't/t5516-fetch-push.sh')
-rwxr-xr-xt/t5516-fetch-push.sh31
1 files changed, 31 insertions, 0 deletions
diff --git a/t/t5516-fetch-push.sh b/t/t5516-fetch-push.sh
index f0030ad00..598664ce7 100755
--- a/t/t5516-fetch-push.sh
+++ b/t/t5516-fetch-push.sh
@@ -437,6 +437,37 @@ test_expect_success 'push updates local refs' '
'
+test_expect_success 'push updates up-to-date local refs' '
+
+ rm -rf parent child &&
+ mkdir parent &&
+ (cd parent && git init &&
+ echo one >foo && git add foo && git commit -m one) &&
+ git clone parent child1 &&
+ git clone parent child2 &&
+ (cd child1 &&
+ echo two >foo && git commit -a -m two &&
+ git push) &&
+ (cd child2 &&
+ git pull ../child1 master &&
+ git push &&
+ test $(git rev-parse master) = $(git rev-parse remotes/origin/master))
+
+'
+
+test_expect_success 'push preserves up-to-date packed refs' '
+
+ rm -rf parent child &&
+ mkdir parent &&
+ (cd parent && git init &&
+ echo one >foo && git add foo && git commit -m one) &&
+ git clone parent child &&
+ (cd child &&
+ git push &&
+ ! test -f .git/refs/remotes/origin/master)
+
+'
+
test_expect_success 'push does not update local refs on failure' '
rm -rf parent child &&