Skip to content

pr-1183/TaoK/advise-ambiguous-tracking-refspec-v7

From: Tao Klerks <tao@klerks.biz>

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>

Submitted-As: https://lore.kernel.org/git/pull.1183.v7.git.1648793113943.gitgitgadget@gmail.com
In-Reply-To: https://lore.kernel.org/git/pull.1183.git.1647858238144.gitgitgadget@gmail.com
In-Reply-To: https://lore.kernel.org/git/pull.1183.v2.git.1647940686394.gitgitgadget@gmail.com
In-Reply-To: https://lore.kernel.org/git/pull.1183.v3.git.1648450268285.gitgitgadget@gmail.com
In-Reply-To: https://lore.kernel.org/git/pull.1183.v4.git.1648553209157.gitgitgadget@gmail.com
In-Reply-To: https://lore.kernel.org/git/pull.1183.v5.git.1648624810866.gitgitgadget@gmail.com
In-Reply-To: https://lore.kernel.org/git/pull.1183.v6.git.1648742485887.gitgitgadget@gmail.com
Assets 2