diff options
author | Ilari Liusvaara <ilari.liusvaara@elisanet.fi> | 2010-01-18 22:44:11 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-01-18 17:09:32 -0800 |
commit | 4fc500667636c4ada592a40c4d11ce0560c43c0d (patch) | |
tree | 78c07862f09c2b89339a53a287a4f5540dc73a4c /builtin-branch.c | |
parent | ff6d26a0e1d8fad775010fa3b689c0c027da8bb0 (diff) | |
download | git-4fc500667636c4ada592a40c4d11ce0560c43c0d.tar.gz |
Add branch --set-upstream
Add --set-upstream option to branch that works like --track, except that
when branch exists already, its upstream info is changed without changing
the ref value.
Based-on-patch-from: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Signed-off-by: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-branch.c')
-rw-r--r-- | builtin-branch.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/builtin-branch.c b/builtin-branch.c index ddc9f2dab7..970cf31811 100644 --- a/builtin-branch.c +++ b/builtin-branch.c @@ -564,6 +564,8 @@ int cmd_branch(int argc, const char **argv, const char *prefix) OPT__VERBOSE(&verbose), OPT_SET_INT('t', "track", &track, "set up tracking mode (see git-pull(1))", BRANCH_TRACK_EXPLICIT), + OPT_SET_INT( 0, "set-upstream", &track, "change upstream info", + BRANCH_TRACK_OVERRIDE), OPT_BOOLEAN( 0 , "color", &branch_use_color, "use colored output"), OPT_SET_INT('r', NULL, &kinds, "act on remote-tracking branches", REF_REMOTE_BRANCH), |