diff options
| author | Tao Klerks <tao@klerks.biz> | 2022-04-01 06:05:13 +0000 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2022-04-01 10:09:18 -0700 |
| commit | e4921d877ab3487fbc0bde8b3e59b757d274783c (patch) | |
| tree | 720185c5bb3e315fff585865008a03b055c28a7c /Documentation | |
| parent | abf474a5dd901f28013c52155411a48fd4c09922 (diff) | |
| download | git-e4921d877ab3487fbc0bde8b3e59b757d274783c.tar.xz | |
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 'Documentation')
| -rw-r--r-- | Documentation/config/advice.txt | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Documentation/config/advice.txt b/Documentation/config/advice.txt index c40eb09cb7..343d271c70 100644 --- a/Documentation/config/advice.txt +++ b/Documentation/config/advice.txt @@ -4,6 +4,10 @@ advice.*:: can tell Git that you do not need help by setting these to 'false': + -- + ambiguousFetchRefspec:: + Advice shown when fetch refspec for multiple remotes map to + the same remote-tracking branch namespace and causes branch + tracking set-up to fail. fetchShowForcedUpdates:: Advice shown when linkgit:git-fetch[1] takes a long time to calculate forced updates after ref updates, or to warn |
