summaryrefslogtreecommitdiff
path: root/advice.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-08-02 22:30:41 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-08-02 22:30:41 (GMT)
commit50858edd1aa063d3ee2ecb48672c43630cea9070 (patch)
tree16e42089e479d0776ff94fa9621daf6f815a6668 /advice.c
parenta81575aa91a015535374bb5b1e0e6dc2a81c74ab (diff)
parent8d7b558baebe3abbbad4973ce1e1f87a7da17f47 (diff)
downloadgit-50858edd1aa063d3ee2ecb48672c43630cea9070.zip
git-50858edd1aa063d3ee2ecb48672c43630cea9070.tar.gz
git-50858edd1aa063d3ee2ecb48672c43630cea9070.tar.bz2
Merge branch 'ab/checkout-default-remote'
"git checkout" and "git worktree add" learned to honor checkout.defaultRemote when auto-vivifying a local branch out of a remote tracking branch in a repository with multiple remotes that have tracking branches that share the same names. * ab/checkout-default-remote: checkout & worktree: introduce checkout.defaultRemote checkout: add advice for ambiguous "checkout <branch>" builtin/checkout.c: use "ret" variable for return checkout: pass the "num_matches" up to callers checkout.c: change "unique" member to "num_matches" checkout.c: introduce an *_INIT macro checkout.h: wrap the arguments to unique_tracking_name() checkout tests: index should be clean after dwim checkout
Diffstat (limited to 'advice.c')
-rw-r--r--advice.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/advice.c b/advice.c
index 52aa85b..3561cd6 100644
--- a/advice.c
+++ b/advice.c
@@ -23,6 +23,7 @@ int advice_add_embedded_repo = 1;
int advice_ignored_hook = 1;
int advice_waiting_for_editor = 1;
int advice_graft_file_deprecated = 1;
+int advice_checkout_ambiguous_remote_branch_name = 1;
static int advice_use_color = -1;
static char advice_colors[][COLOR_MAXLEN] = {
@@ -75,6 +76,7 @@ static struct {
{ "ignoredHook", &advice_ignored_hook },
{ "waitingForEditor", &advice_waiting_for_editor },
{ "graftFileDeprecated", &advice_graft_file_deprecated },
+ { "checkoutAmbiguousRemoteBranchName", &advice_checkout_ambiguous_remote_branch_name },
/* make this an alias for backward compatibility */
{ "pushNonFastForward", &advice_push_update_rejected }