Thread (6 messages) flat view 6 messages, 3 authors, 2016-06-15

Re: [PATCH RFC] Add a config verbose option fetch and push

From: Ævar Arnfjörð Bjarmason <hidden>
Date: 2016-06-15 22:48:50

On Sat, May 22, 2010 at 13:34, Thomas Rast [off-list ref] wrote:
Ævar Arnfjörð Bjarmason wrote:
quoted
On Sat, May 22, 2010 at 10:44, Thomas Rast [off-list ref] wrote:
quoted
Ævar Arnfjörð Bjarmason wrote:
That would completely ruin the scriptability of almost all commands.
Imagine the user added the following options as default:
 add --edit
[...]
quoted
quoted
I'm sure you can find one option that changes the command in something
completely different *for every command*.
Sure. But so would adding this as git-add to your $PATH:

    #!/bin/sh
    /usr/lib/git-core/git-add --edit $@
Two points:

* This way is not documented in git-config(1), as the proposed
 interface would have to be; hence, it is not "official".

* More importantly, it doesn't work; for builtins such as git-add, not
 even if you put it under the `git --exec-path` (yes, I've tested
 this).
I actually tested it too and found that it didn't work. Then thought
"meh, it's pseudocode" and pressed "Send".

Aside from the specific implementation it's easy to make that work the
right way. You can alias the git command itself and munge its
arguments before passing them on to Git itself.

Anyway, this feature isn't something I actually care about. I only
wanted to suggest that if we're going to get lots of proposals to add
a specific config flag for some specific option in some specific
tool. That maybe it would be easier for everyone if there was some
general facility to do so. It would cut down on special-case code in
individual tools.
quoted
Git already has plenty of ways to shoot yourself in the foot.
Can't argue with that.
And perhaps a general facility might actually improve scriptability. A
determined user is going to override Git anyway, even if that means
some gross hack involving munging $PATH and overriding of Git
itself. At least if such users were pointed to a general facility
script writers could set GIT_IGNORE_CRAZY_USER_DIRECTIVES=1 or
something like that.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help