summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2017-01-31 13:14:59 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-01-31 13:14:59 -0800
commitfe575f06532bde1e672a2313fd76ef09b66fc355 (patch)
treec0a7b6b77695f9ea2b2c8c76b0a8c8f495ac77d7 /t
parentMerge branch 'jk/clear-delta-base-cache-fix' (diff)
parentremote rename: more carefully determine whether a remote is configured (diff)
downloadtgif-fe575f06532bde1e672a2313fd76ef09b66fc355.tar.xz
Merge branch 'js/remote-rename-with-half-configured-remote'
With anticipatory tweaking for remotes defined in ~/.gitconfig (e.g. "remote.origin.prune" set to true, even though there may or may not actually be "origin" remote defined in a particular Git repository), "git remote rename" and other commands misinterpreted and behaved as if such a non-existing remote actually existed. * js/remote-rename-with-half-configured-remote: remote rename: more carefully determine whether a remote is configured remote rename: demonstrate a bogus "remote exists" bug
Diffstat (limited to 't')
-rwxr-xr-xt/t5505-remote.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/t/t5505-remote.sh b/t/t5505-remote.sh
index 8198d8eb05..ba46e86de0 100755
--- a/t/t5505-remote.sh
+++ b/t/t5505-remote.sh
@@ -764,6 +764,13 @@ test_expect_success 'rename a remote with name prefix of other remote' '
)
'
+test_expect_success 'rename succeeds with existing remote.<target>.prune' '
+ git clone one four.four &&
+ test_when_finished git config --global --unset remote.upstream.prune &&
+ git config --global remote.upstream.prune true &&
+ git -C four.four remote rename origin upstream
+'
+
cat >remotes_origin <<EOF
URL: $(pwd)/one
Push: refs/heads/master:refs/heads/upstream