On Tue, Aug 16, 2016 at 05:13:55PM +0200, Dmitry Neverov wrote:
> I wonder why credential helpers are called in the order: system,
> global, local, command-line and not in the reverse order? This make it
> impossible to provide a custom helper and disable default ones via
> command-line parameter. My use-case is to clone a repository in a
> non-interactive environment where a system-level GUI helper is
> configured: clone hangs since system-level helper called first and
> there is no input from the user. Also if a system-level helper sets
> quit=true, then lower-level helpers won't be called at all. Is it by
I agree that it's not really a sensible order. But reversing them isn't
quite right either. The problem is that the config code just gives the
credential code a sequence of items, with no indication which file they
came from, with what priority, etc.
For config keys with a single value, "last one wins" makes sense; we
just keep overwriting the previous value.
But for lists (like credential.helper, but also other things like
remote.*.fetch), we just build up the list. And we can't tell the
difference between two items next to each in the same file, or two in
different files with differing priorities.
Fixing that would be tricky. But I think for your case (and most similar
cases), you'd be happy to just be able to "reset" the list to empty. As
of git v2.9.0, you can do that, like so:
helper = "!echo >&2 should not run;:"
helper = "!echo >&2 should run;:"
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html