author | Martin von Zweigbergk <martin.von.zweigbergk@gmail.com> | |
Fri, 2 Sep 2011 00:50:34 +0000 (20:50 -0400) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 12 Sep 2011 04:39:56 +0000 (21:39 -0700) | ||
commit | 60e5eee0f1a70e09f28d1e55b3aaddb59eeea887 | |
tree | 288bbe70fc5574c3a21a3de90c53e7cffa4ef2b1 | tree | snapshot |
parent | 28f555f6357ee0706847aff5b476b31b472b325c | commit | diff |
remote: "rename o foo" should not rename ref "origin/bar"
When renaming a remote called 'o' using 'git remote rename o foo', git
should also rename any remote-tracking branches for the remote. This
does happen, but any remote-tracking branches starting with
'refs/remotes/o', such as 'refs/remotes/origin/bar', will also be
renamed (to 'refs/remotes/foorigin/bar' in this case).
Fix it by simply matching one more character, up to the slash
following the remote name.
Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
When renaming a remote called 'o' using 'git remote rename o foo', git
should also rename any remote-tracking branches for the remote. This
does happen, but any remote-tracking branches starting with
'refs/remotes/o', such as 'refs/remotes/origin/bar', will also be
renamed (to 'refs/remotes/foorigin/bar' in this case).
Fix it by simply matching one more character, up to the slash
following the remote name.
Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/remote.c | diff | blob | history | |
t/t5505-remote.sh | diff | blob | history |