summaryrefslogtreecommitdiff
path: root/t/t5516-fetch-push.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-11-06 18:52:31 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-11-06 18:52:32 (GMT)
commita1671dd82b5e1c6e837a3f47509a3a33189b0884 (patch)
tree7481de8581bc9b94b6059333009e4c155a75dd99 /t/t5516-fetch-push.sh
parent6b55f8b54601c6e6319566875b104d333930bc76 (diff)
parent9233887cce8eaebd8469315622b84bd26910351f (diff)
downloadgit-a1671dd82b5e1c6e837a3f47509a3a33189b0884.zip
git-a1671dd82b5e1c6e837a3f47509a3a33189b0884.tar.gz
git-a1671dd82b5e1c6e837a3f47509a3a33189b0884.tar.bz2
Merge branch 'jk/fetch-reflog-df-conflict'
Corner-case bugfixes for "git fetch" around reflog handling. * jk/fetch-reflog-df-conflict: ignore stale directories when checking reflog existence fetch: load all default config at startup
Diffstat (limited to 't/t5516-fetch-push.sh')
-rwxr-xr-xt/t5516-fetch-push.sh40
1 files changed, 40 insertions, 0 deletions
diff --git a/t/t5516-fetch-push.sh b/t/t5516-fetch-push.sh
index 7c8a769..f4da20a 100755
--- a/t/t5516-fetch-push.sh
+++ b/t/t5516-fetch-push.sh
@@ -11,6 +11,7 @@ This test checks the following functionality:
* hooks
* --porcelain output format
* hiderefs
+* reflogs
'
. ./test-lib.sh
@@ -1290,4 +1291,43 @@ test_expect_success 'pushing a tag pushes the tagged object' '
test_cmp expect actual
'
+test_expect_success 'push into bare respects core.logallrefupdates' '
+ rm -rf dst.git &&
+ git init --bare dst.git &&
+ git -C dst.git config core.logallrefupdates true &&
+
+ # double push to test both with and without
+ # the actual pack transfer
+ git push dst.git master:one &&
+ echo "one@{0} push" >expect &&
+ git -C dst.git log -g --format="%gd %gs" one >actual &&
+ test_cmp expect actual &&
+
+ git push dst.git master:two &&
+ echo "two@{0} push" >expect &&
+ git -C dst.git log -g --format="%gd %gs" two >actual &&
+ test_cmp expect actual
+'
+
+test_expect_success 'fetch into bare respects core.logallrefupdates' '
+ rm -rf dst.git &&
+ git init --bare dst.git &&
+ (
+ cd dst.git &&
+ git config core.logallrefupdates true &&
+
+ # as above, we double-fetch to test both
+ # with and without pack transfer
+ git fetch .. master:one &&
+ echo "one@{0} fetch .. master:one: storing head" >expect &&
+ git log -g --format="%gd %gs" one >actual &&
+ test_cmp expect actual &&
+
+ git fetch .. master:two &&
+ echo "two@{0} fetch .. master:two: storing head" >expect &&
+ git log -g --format="%gd %gs" two >actual &&
+ test_cmp expect actual
+ )
+'
+
test_done