summaryrefslogtreecommitdiff
path: root/advice.h
diff options
context:
space:
mode:
authorTao Klerks <tao@klerks.biz>2022-04-01 06:05:13 (GMT)
committerJunio C Hamano <gitster@pobox.com>2022-04-01 17:09:18 (GMT)
commite4921d877ab3487fbc0bde8b3e59b757d274783c (patch)
tree720185c5bb3e315fff585865008a03b055c28a7c /advice.h
parentabf474a5dd901f28013c52155411a48fd4c09922 (diff)
downloadgit-e4921d877ab3487fbc0bde8b3e59b757d274783c.zip
git-e4921d877ab3487fbc0bde8b3e59b757d274783c.tar.gz
git-e4921d877ab3487fbc0bde8b3e59b757d274783c.tar.bz2
tracking branches: add advice to ambiguous refspec error
The error "not tracking: ambiguous information for ref" is raised when we are evaluating what tracking information to set on a branch, and find that the ref to be added as tracking branch is mapped under multiple remotes' fetch refspecs. This can easily happen when a user copy-pastes a remote definition in their git config, and forgets to change the tracking path. Add advice in this situation, explicitly highlighting which remotes are involved and suggesting how to correct the situation. Also update a test to explicitly expect that advice. Signed-off-by: Tao Klerks <tao@klerks.biz> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'advice.h')
-rw-r--r--advice.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/advice.h b/advice.h
index a395712..2d4c94f 100644
--- a/advice.h
+++ b/advice.h
@@ -17,6 +17,7 @@ struct string_list;
ADVICE_ADD_EMPTY_PATHSPEC,
ADVICE_ADD_IGNORED_FILE,
ADVICE_AM_WORK_DIR,
+ ADVICE_AMBIGUOUS_FETCH_REFSPEC,
ADVICE_CHECKOUT_AMBIGUOUS_REMOTE_BRANCH_NAME,
ADVICE_COMMIT_BEFORE_MERGE,
ADVICE_DETACHED_HEAD,