Michael Forney [off-list ref] writes:
This way, they still work even if the built-in symlinks aren't
installed.
Signed-off-by: Michael Forney <redacted>
---
It looks like there was an effort to do this a number of years ago (through
`make remove-dashes`). These are just a few I noticed were still left in the
.sh scripts.
Our goal was *not* to have *no* "git-foo" on the filesystem,
though. It happened in v1.6.0 timeframe and it was about removing
"git-foo" from end-user's $PATH.
Earlier there was a more ambitious proposal to remove all "git-foo"
even from $GIT_EXEC_PATH for built-in commands, but that plan was
scuttled [*1*].
The changes in your patch still are good changes to make sure people
who copy & paste code would see fewer instances of "git-foo", but
"will still work even if I break my installation of Git by removing
them from the filesystem" is not the project's goal.
IIUC, you will need "$GIT_EXEC_PATH/git-checkout" on the filesystem
if you want your "git co" alias to work, as we spawn built-in as a
dashed external.
[Reference]
*1* https://public-inbox.org/git/alpine.LFD.1.10.0808261114070.3363@nehalem.linux-foundation.org/
Hi Junio,
On Mon, 7 Aug 2017, Junio C Hamano wrote:
Michael Forney [off-list ref] writes:
quoted
This way, they still work even if the built-in symlinks aren't
installed.
Signed-off-by: Michael Forney <redacted>
---
It looks like there was an effort to do this a number of years ago (through
`make remove-dashes`). These are just a few I noticed were still left in the
.sh scripts.
Our goal was *not* to have *no* "git-foo" on the filesystem,
though. It happened in v1.6.0 timeframe and it was about removing
"git-foo" from end-user's $PATH.
That was in the v1.6.0 timeframe. It is past time to reconsider the goal,
though, as there is really very little use in keeping the dashed forms.
And it does hurt in some circumstances. Take for example .zip files: they
do not support hard-links. So if you need to distribute Git binaries in
.zip files, you are not only affected negatively by the less-than-stellar
compression ratio compared to .bz2 let alone LZMA, Git adds insult to
injury by *forcing* an additional inflation by pointlessly adding the
builtins *again*.
Earlier there was a more ambitious proposal to remove all "git-foo"
even from $GIT_EXEC_PATH for built-in commands, but that plan was
scuttled [*1*].
That *1* is not a good reference, I am afraid. It says very little in
addition to paraphrased commands to stop responding (when a more civilized
call back to rational arguments might have been a lot more productive).
In that light, would you kindly explain in your own words what is your
current thinking on shipping dashed forms of builtins?
I mean, I can understand for git-upload-pack, to help with determining
permissions on server sides (it is easier to filter out all `git` commands
than to painstakingly look whether argv[1] equals `upload-pack`). It's
sort of a very unfortunate outlier.
But I cannot understand at all why we insist on installing hardlinked
copies (or not so hardlinked copies when hardlinks are unavailable) for
builtins, when these copies really outlived their usefulness a long, long
time ago.
So I would love to hear the arguments for keeping the dashed forms of
builtins, even if the only surviving argument may be "I dig in my feet
because I always said we'd keep them".
Ciao,
Dscho
Hi Junio,
I feel a bit talked to my hand, as the only reply I was graced was a "I
think I already did". So this will be my last reply on this matter for a
while.
On Mon, 7 Aug 2017, Junio C Hamano wrote:
IIUC, you will need "$GIT_EXEC_PATH/git-checkout" on the filesystem if
you want your "git co" alias to work, as we spawn built-in as a dashed
external.
And of course this is just the status quo, not an argument why it should
be so for eternity. Because that would be circular reasoning and prevent
us from improving things.
It is still arguably wrong to call the dashed form for builtins when we
already have enough information at our hands to tell that it is a builtin:
https://github.com/git-for-windows/git/commit/bad2c6978ec
Granted, this duplicates code a little, as it was developed under time
pressure (and it is necessary to allow the test suite to be run on Git
built in Visual Studio using an installed Git for Windows for the Unix
utilities). As above, though, the current state of this patch does not
prevent any improvement in the future.
Ciao,
Dscho