diff options
author | Dmitry S. Dolzhenko <dmitrys.dolzhenko@yandex.ru> | 2014-02-27 19:35:29 +0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-02-27 11:53:23 -0800 |
commit | fb73d8a51270e80e13c36a070407e5042bfd079e (patch) | |
tree | 5886147e9002f6c7e1b4b60c2757d29358bf8afc | |
parent | 0a9136f32758a785fe552adc58bba5824f85e5b7 (diff) | |
download | git-mh/micro-projects.tar.gz |
branch: change install_branch_config() to use skip_prefix()mh/micro-projects
Change install_branch_config() to use skip_prefix()
for getting the short name of the remote branch.
Signed-off-by: Dmitry S. Dolzhenko <dmitrys.dolzhenko@yandex.ru>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r-- | branch.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -49,8 +49,8 @@ static int should_setup_rebase(const char *origin) void install_branch_config(int flag, const char *local, const char *origin, const char *remote) { - const char *shortname = remote + 11; - int remote_is_branch = starts_with(remote, "refs/heads/"); + const char *shortname = skip_prefix(remote, "refs/heads/"); + int remote_is_branch = shortname != NULL; struct strbuf key = STRBUF_INIT; int rebasing = should_setup_rebase(origin); |