summaryrefslogtreecommitdiff
path: root/parse-options.c
diff options
context:
space:
mode:
authorLibravatar Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>2011-09-01 20:50:33 -0400
committerLibravatar Junio C Hamano <gitster@pobox.com>2011-09-11 21:39:55 -0700
commit28f555f6357ee0706847aff5b476b31b472b325c (patch)
tree43792d7b55a96f86e0a895a68f56c9527eb78025 /parse-options.c
parentGit 1.7.6.2 (diff)
downloadtgif-28f555f6357ee0706847aff5b476b31b472b325c.tar.xz
remote: write correct fetch spec when renaming remote 'remote'
When renaming a remote whose name is contained in a configured fetch refspec for that remote, we currently replace the first occurrence of the remote name in the refspec. This is correct in most cases, but breaks if the remote name occurs in the fetch refspec before the expected place. For example, we currently change [remote "remote"] url = git://git.kernel.org/pub/scm/git/git.git fetch = +refs/heads/*:refs/remotes/remote/* into [remote "origin"] url = git://git.kernel.org/pub/scm/git/git.git fetch = +refs/heads/*:refs/origins/remote/* Reduce the risk of changing incorrect sections of the refspec by matching the entire ":refs/remotes/<name>/" instead of just "<name>". Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'parse-options.c')
0 files changed, 0 insertions, 0 deletions