diff options
author | Junio C Hamano <gitster@pobox.com> | 2008-02-27 13:02:57 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-02-27 13:02:57 -0800 |
commit | 60b188a9844cdcf865174c685a38acc053a9d43b (patch) | |
tree | b2ad8b5b4b20785ea137fa0ec5a11cb0b8517d8c /builtin-branch.c | |
parent | 5a4d707a6d914fcea302e299fc18892d9e42c767 (diff) | |
parent | 572fc81d21b26d856dd3c2cc366b7452a4ed16e4 (diff) | |
download | git-60b188a9844cdcf865174c685a38acc053a9d43b.tar.gz git-60b188a9844cdcf865174c685a38acc053a9d43b.tar.xz |
Merge branch 'js/branch-track'
* js/branch-track:
doc: documentation update for the branch track changes
branch: optionally setup branch.*.merge from upstream local branches
Conflicts:
Documentation/config.txt
Documentation/git-branch.txt
Documentation/git-checkout.txt
builtin-branch.c
cache.h
t/t7201-co.sh
Diffstat (limited to 'builtin-branch.c')
-rw-r--r-- | builtin-branch.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/builtin-branch.c b/builtin-branch.c index 7e991030c..a7844454a 100644 --- a/builtin-branch.c +++ b/builtin-branch.c @@ -30,8 +30,6 @@ static const char * const builtin_branch_usage[] = { static const char *head; static unsigned char head_sha1[20]; -static int branch_track = 1; - static int branch_use_color = -1; static char branch_colors[][COLOR_MAXLEN] = { "\033[m", /* reset */ @@ -76,10 +74,6 @@ static int git_branch_config(const char *var, const char *value) color_parse(value, var, branch_colors[slot]); return 0; } - if (!strcmp(var, "branch.autosetupmerge")) { - branch_track = git_config_bool(var, value); - return 0; - } return git_color_default_config(var, value); } @@ -420,14 +414,16 @@ int cmd_branch(int argc, const char **argv, const char *prefix) { int delete = 0, rename = 0, force_create = 0; int verbose = 0, abbrev = DEFAULT_ABBREV, detached = 0; - int reflog = 0, track; + int reflog = 0; + enum branch_track track; int kinds = REF_LOCAL_BRANCH; struct commit_list *with_commit = NULL; struct option options[] = { OPT_GROUP("Generic options"), OPT__VERBOSE(&verbose), - OPT_BOOLEAN( 0 , "track", &track, "set up tracking mode (see git-pull(1))"), + OPT_SET_INT( 0 , "track", &track, "set up tracking mode (see git-pull(1))", + BRANCH_TRACK_EXPLICIT), OPT_BOOLEAN( 0 , "color", &branch_use_color, "use colored output"), OPT_SET_INT('r', NULL, &kinds, "act on remote-tracking branches", REF_REMOTE_BRANCH), @@ -458,7 +454,7 @@ int cmd_branch(int argc, const char **argv, const char *prefix) if (branch_use_color == -1) branch_use_color = git_use_color_default; - track = branch_track; + track = git_branch_track; argc = parse_options(argc, argv, options, builtin_branch_usage, 0); if (!!delete + !!rename + !!force_create > 1) usage_with_options(builtin_branch_usage, options); |