Thread (50 messages) flat view 50 messages, 3 authors, 2017-08-04

Re: [PATCH v2 10/10] git.c: ignore pager.* when launching builtin as dashed external

From: Martin Ågren <hidden>
Date: 2017-07-31 17:46:06

On 31 July 2017 at 05:45, Jeff King [off-list ref] wrote:
On Mon, Jul 17, 2017 at 10:10:52PM +0200, Martin Ågren wrote:
quoted
One could address this in run_argv(), by making the second call to
execv_dashed_external() conditional on "!is_builtin()" whereas a builtin
would be started as "git foo". (Possibly after unrolling and cleaning up
the "while (1)"-loop.) That seems like the wrong fix for this particular
issue, but might be a wanted change on its own -- or maybe not --, since
it would mean one could relay, e.g., "-c baz" to "git -c baz foo" (but
only for builtins...).
We shouldn't need to relay them. They get added to the environment by
the initial "git" invocation, and then are available everywhere (in
fact, it would be wrong to relay them for multi-valued config).
Thanks for explaining. I did some very sloppy reading of the comment
in git.c that we "cannot take flags in between the 'git' and the
'xxxx'" which I somehow misunderstood completely as "we cannot pass
that sort of information to git-xxxx". Silly. Thanks for taking the
time to explain what I should have found out myself...

So yeah, I meant the above and not this:
Or did
you mean that we could potentially allow:

  [alias]
  foo = "-c baz some-builtin"

That's interesting, but I think the fact that it only works with
builtins makes it a bad idea. And you can always do:

  [alias]
  foo = "!git -c baz some-builtin"

which is equivalent.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help