{"thread":{"id":"8785","subject":"Start deprecating \"git-command\" in favor of \"git command\"","startedAt":"2007-06-30T18:49:17Z","lastAt":"2007-07-03T03:50:37Z","messageCount":20,"participants":["Linus Torvalds","Junio C Hamano","Yann Dirson","walt","Johannes Schindelin","Jeff King","Josh Triplett","Nicolas Pitre"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"46117","messageId":"alpine.LFD.0.98.0706301135300.1172@woody.linux-foundation.org","threadId":"8785","inReplyTo":null,"subject":"Start deprecating \"git-command\" in favor of \"git command\"","fromName":"Linus Torvalds","fromEmail":"torvalds@linux-foundation.org","sentAt":"2007-06-30T18:49:17Z","receivedAt":"2007-06-30T18:49:17Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\nI realize that a lot of people use the \"git-xyzzy\" format, and we have \nvarious historical reasons for it, but I also think that most people have \nlong since started thinking of the git command as a single command with \nvarious subcommands, and we've long had the documentation talk about it \nthat way.\n\nSlowly migrating away from the git-xyzzy format would allow us to \neventually no longer install hundreds of binaries (even if most of them \nare symlinks or hardlinks) in users $PATH, and the _original_ reasons for \nit (implementation issues and bash completion) are really long long gone.\n\nUsing \"git xyzzy\" also has some fundamental advantages, like the ability \nto specify things like paging (\"git -p xyzzy\") and making the whole notion \nof aliases act like other git commands (which they already do, but they do \n*not* have a \"git-xyzzy\" form!)\n\nAnyway, while actually removing the \"git-xyzzy\" things is not practical \nright now, we can certainly start slowly to deprecate it internally inside \ngit itself - in the shell scripts we use, and the test vectors.\n\nThis patch adds a \"remove-dashes\" makefile target, which does that. It \nisn't particularly efficient or smart, but it *does* successfully rewrite \na lot of our shell scripts to use the \"git xyzzy\" form for all built-in \ncommands.\n\n(For non-builtins, the \"git xyzzy\" format implies an extra execve(), so \nthis script leaves those alone).\n\nSo apply this patch, and then run\n\n\tmake remove-dashes\n\tmake test\n\tgit commit -a\n\nto generate a much larger patch that actually starts this transformation.\n\n(The only half-way subtle thing about this is that it also fixes up \ngit-filter-branch.sh for the new world order by adding quoting around \nthe use of \"git-commit-tree\" as an argument. It doesn't need it in that \nformat, but when changed into \"git commit-tree\" it is no longer a single \nword, and the quoting maintains the old behaviour).\n\nNOTE! This does not yet mean that you can actually stop installing the \n\"git-xyzzy\" binaries for the builtins. There are some remaining places \nthat want to use the old form, this just removes the most obvious ones \nthat can easily be done automatically.\n\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>\n---\n\nComments? I think this is worth doing, but the patch that this scripting \ngenerates is actually fairly large, even if this patch itself is smallish.\n\nJunio, up to you.\n\n Makefile             |    3 ++-\n fixup-builtins       |   16 ++++++++++++++++\n git-filter-branch.sh |    2 +-\n 3 files changed, 19 insertions(+), 2 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex a98e27a..1620ef8 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -987,7 +987,8 @@ check-sha1:: test-sha1$X\n check: common-cmds.h\n \tfor i in *.c; do sparse $(ALL_CFLAGS) $(SPARSE_FLAGS) $$i || exit; done\n \n-\n+remove-dashes:\n+\t./fixup-builtins $(BUILT_INS)\n \n ### Installation rules\n \ndiff --git a/fixup-builtins b/fixup-builtins\nnew file mode 100755\nindex 0000000..d7fae43\n--- /dev/null\n+++ b/fixup-builtins\n@@ -0,0 +1,16 @@\n+#!/bin/sh\n+while [ \"$1\" ]\n+do\n+\told=\"$1\"\n+\tnew=$(echo \"$1\" | sed 's/git-/git /')\n+\techo \"Converting '$old' to '$new'\"\n+\tgit ls-files '*.sh' | while read file\n+\tdo\n+\t\tsed \"s/$old/$new/g\" < $file > $file.new\n+\t\tchmod --reference=$file $file.new\n+\t\tmv $file.new $file\n+\tdone\n+\tshift\n+done\n+git update-index --refresh >& /dev/null\n+exit 0\ndiff --git a/git-filter-branch.sh b/git-filter-branch.sh\nindex 8fa5ce6..0f54271 100644\n--- a/git-filter-branch.sh\n+++ b/git-filter-branch.sh\n@@ -383,7 +383,7 @@ while read commit parents; do\n \n \tsed -e '1,/^$/d' <../commit | \\\n \t\teval \"$filter_msg\" | \\\n-\t\tsh -c \"$filter_commit\" git-commit-tree $(git-write-tree) $parentstr | \\\n+\t\tsh -c \"$filter_commit\" \"git-commit-tree\" $(git-write-tree) $parentstr | \\\n \t\ttee ../map/$commit\n done <../revs\n \n"},{"id":"46118","messageId":"7vy7i1b6bt.fsf@assigned-by-dhcp.cox.net","threadId":"8785","inReplyTo":"alpine.LFD.0.98.0706301135300.1172@woody.linux-foundation.org","subject":"Re: Start deprecating \"git-command\" in favor of \"git command\"","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-06-30T19:17:10Z","receivedAt":"2007-06-30T19:17:10Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Linus Torvalds <torvalds@linux-foundation.org> writes:\n\n> Using \"git xyzzy\" also has some fundamental advantages, like the ability \n> to specify things like paging (\"git -p xyzzy\") and making the whole notion \n> of aliases act like other git commands (which they already do, but they do \n> *not* have a \"git-xyzzy\" form!)\n\nIn the longer run, we may want to allow \"git foo\" to alias to\n\"git foo --preferred-options\", although we currently do not\nallow such an alias.  Scripts, especially the ones we ship,\nwould not want to be confused by the user aliases when that\nhappens.\n\n> Anyway, while actually removing the \"git-xyzzy\" things is not practical \n> right now, we can certainly start slowly to deprecate it internally inside \n> git itself - in the shell scripts we use, and the test vectors.\n\nSo I am somewhat negative on this, unless there is a way for\nscripts to say \"Even though I say 'git foo', I do mean 'git foo'\nnot whatever the user has aliased\".\n"},{"id":"46119","messageId":"20070630194335.GK7730@nan92-1-81-57-214-146.fbx.proxad.net","threadId":"8785","inReplyTo":"7vy7i1b6bt.fsf@assigned-by-dhcp.cox.net","subject":"Re: Start deprecating \"git-command\" in favor of \"git command\"","fromName":"Yann Dirson","fromEmail":"ydirson@altern.org","sentAt":"2007-06-30T19:43:35Z","receivedAt":"2007-06-30T19:43:35Z","isPatch":false,"sender":{"key":"ydirson@altern.org","avatar":"https://avatars.githubusercontent.com/u/1190950?v=4"},"body":"On Sat, Jun 30, 2007 at 12:17:10PM -0700, Junio C Hamano wrote:\n> So I am somewhat negative on this, unless there is a way for\n> scripts to say \"Even though I say 'git foo', I do mean 'git foo'\n> not whatever the user has aliased\".\n\n\"git --no-alias foo\" (like \"cvs -f foo\" which ignores ~/.cvsrc) ?\n\nBest regards,\n-- \nYann\n"},{"id":"46120","messageId":"alpine.LFD.0.98.0706301231200.1172@woody.linux-foundation.org","threadId":"8785","inReplyTo":"7vy7i1b6bt.fsf@assigned-by-dhcp.cox.net","subject":"Re: Start deprecating \"git-command\" in favor of \"git command\"","fromName":"Linus Torvalds","fromEmail":"torvalds@linux-foundation.org","sentAt":"2007-06-30T19:43:55Z","receivedAt":"2007-06-30T19:43:55Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Sat, 30 Jun 2007, Junio C Hamano wrote:\n> \n> In the longer run, we may want to allow \"git foo\" to alias to\n> \"git foo --preferred-options\", although we currently do not\n> allow such an alias.  Scripts, especially the ones we ship,\n> would not want to be confused by the user aliases when that\n> happens.\n\nI agree. And I think our current behaviour is the correct one.\n\n> So I am somewhat negative on this, unless there is a way for\n> scripts to say \"Even though I say 'git foo', I do mean 'git foo'\n> not whatever the user has aliased\".\n\nWell, we have a more serious issue, that is related, but has nothing to do \nwith aliases.\n\nIf you set an environment variable \"diff.color=always\", any script will \nget that behaviour, and not work the way it might expect.\n\nMy point being that this has nothing to do with \"git-diff\" vs \"git diff\", \nand everything to do with default configurations. If you don't want people \nto be able to change fixed behaviour, you'd need to have a way to disable \nit.\n\nQuite frankly, I think it's _easier_ to disable with \"git xyzzy\" than with \n\"git-xyzzy\", but hey, not a big deal. With \"git xyzzy\", we could add a \ngeneric flag like\n\n\tgit - xyzzy\n\nto make the rule be that no configurations (_including_ aliases) are \nallowed to override default behaviour, which is much harder with the \n\"git-xyzzy\" format (since then it's invariably a per-command thing).\n\nThat said, I'm not going to push that patch very hard.\n\nEspecially as I just realized that it had a bug: it caused things like\n\n\t-our \\$logo = \"file:///$(pwd)/../../gitweb/git-logo.png\";\n\t+our \\$logo = \"file:///$(pwd)/../../gitweb/git logo.png\";\n\nbecause \"git-log\" got rewritten as \"git log\", without checking that it was \na proper word.\n\nI have a fixed version already (just make the sed script use \\<..\\> around \nthe pattern - appended here), but as mentioned, I don't think this is a \nhugely important issue. I prefer the \"git cmd\" form, but if we want to \nmaintain \"git-cmd\" forever, then hey...\n\n\t\tLinus\n---\n\nFixed the sed pattern a bit..\n\n Makefile             |    3 ++-\n fixup-builtins       |   16 ++++++++++++++++\n git-filter-branch.sh |    2 +-\n 3 files changed, 19 insertions(+), 2 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex a98e27a..1620ef8 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -987,7 +987,8 @@ check-sha1:: test-sha1$X\n check: common-cmds.h\n \tfor i in *.c; do sparse $(ALL_CFLAGS) $(SPARSE_FLAGS) $$i || exit; done\n \n-\n+remove-dashes:\n+\t./fixup-builtins $(BUILT_INS)\n \n ### Installation rules\n \ndiff --git a/fixup-builtins b/fixup-builtins\nnew file mode 100755\nindex 0000000..49e861d\n--- /dev/null\n+++ b/fixup-builtins\n@@ -0,0 +1,16 @@\n+#!/bin/sh\n+while [ \"$1\" ]\n+do\n+\told=\"$1\"\n+\tnew=$(echo \"$1\" | sed 's/git-/git /')\n+\techo \"Converting '$old' to '$new'\"\n+\tgit ls-files '*.sh' | while read file\n+\tdo\n+\t\tsed \"s/\\\\<$old\\\\>/$new/g\" < $file > $file.new\n+\t\tchmod --reference=$file $file.new\n+\t\tmv $file.new $file\n+\tdone\n+\tshift\n+done\n+git update-index --refresh >& /dev/null\n+exit 0\ndiff --git a/git-filter-branch.sh b/git-filter-branch.sh\nindex 8fa5ce6..0f54271 100644\n--- a/git-filter-branch.sh\n+++ b/git-filter-branch.sh\n@@ -383,7 +383,7 @@ while read commit parents; do\n \n \tsed -e '1,/^$/d' <../commit | \\\n \t\teval \"$filter_msg\" | \\\n-\t\tsh -c \"$filter_commit\" git-commit-tree $(git-write-tree) $parentstr | \\\n+\t\tsh -c \"$filter_commit\" \"git-commit-tree\" $(git-write-tree) $parentstr | \\\n \t\ttee ../map/$commit\n done <../revs\n \n"},{"id":"46123","messageId":"7vtzspb3yt.fsf@assigned-by-dhcp.cox.net","threadId":"8785","inReplyTo":"alpine.LFD.0.98.0706301231200.1172@woody.linux-foundation.org","subject":"Re: Start deprecating \"git-command\" in favor of \"git command\"","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-06-30T20:08:10Z","receivedAt":"2007-06-30T20:08:10Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Linus Torvalds <torvalds@linux-foundation.org> writes:\n\n> Well, we have a more serious issue, that is related, but has nothing to do \n> with aliases.\n>\n> If you set an environment variable \"diff.color=always\", any script will \n> get that behaviour, and not work the way it might expect.\n>\n> My point being that this has nothing to do with \"git-diff\" vs \"git diff\", \n> and everything to do with default configurations. If you don't want people \n> to be able to change fixed behaviour, you'd need to have a way to disable \n> it.\n\nThat's exactly why we have told people to use plumbing in their\nscripts, and git-diff-tree does not look at diff.color.\n\n> Quite frankly, I think it's _easier_ to disable with \"git xyzzy\" than with \n> \"git-xyzzy\", but hey, not a big deal. With \"git xyzzy\", we could add a \n> generic flag like\n>\n> \tgit - xyzzy\n>\n> to make the rule be that no configurations (_including_ aliases) are \n> allowed to override default behaviour, which is much harder with the \n> \"git-xyzzy\" format (since then it's invariably a per-command thing).\n\nBut that would break existing scripts wouldn't it?\n"},{"id":"46127","messageId":"7vlke1b3ai.fsf@assigned-by-dhcp.cox.net","threadId":"8785","inReplyTo":"7vy7i1b6bt.fsf@assigned-by-dhcp.cox.net","subject":"Re: Start deprecating \"git-command\" in favor of \"git command\"","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-06-30T20:22:45Z","receivedAt":"2007-06-30T20:22:45Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> Linus Torvalds <torvalds@linux-foundation.org> writes:\n>\n>> Anyway, while actually removing the \"git-xyzzy\" things is not practical \n>> right now, we can certainly start slowly to deprecate it internally inside \n>> git itself - in the shell scripts we use, and the test vectors.\n>\n> So I am somewhat negative on this, unless there is a way for\n> scripts to say \"Even though I say 'git foo', I do mean 'git foo'\n> not whatever the user has aliased\".\n\nHaving said that, I am not opposed to encourage distros to set\ngitexecdir to $(prefix)/libexec in their modified Makefile.\nThere is no reason to contaminate a directory on end users'\n$PATH with hundreds of commands that begin with \"git-\" prefix.\n\nIn fact, I used to configure my copy of git with gitexecdir set\nto outside my $PATH when we first started pushing it to make\nsure everything works (I do not install git from distro on my\nmachine so I know I have only one instance of bin/git in my\npath).  It used to work, but I am no longer using that layout\nthese days, so it is entirely possible that we might have broken\nthe support along the way.  And _that_ is worth fixing.\n"},{"id":"46128","messageId":"f66eog$qe$1@sea.gmane.org","threadId":"8785","inReplyTo":"alpine.LFD.0.98.0706301135300.1172@woody.linux-foundation.org","subject":"Re: Start deprecating \"git-command\" in favor of \"git command\"","fromName":"walt","fromEmail":"wa1ter@myrealbox.com","sentAt":"2007-06-30T20:34:20Z","receivedAt":"2007-06-30T20:34:20Z","isPatch":false,"sender":{"key":"wa1ter@myrealbox.com","avatar":null},"body":"Linus Torvalds wrote:\n> I realize that a lot of people use the \"git-xyzzy\" format, and we have \n> various historical reasons for it...\n\nOne of the historical reasons was to allow users of gnu interactive\ntools to delete the git wrapper script, as outlined in 'INSTALL'.\n\nSeems unlikely that 'git' could still be deleted if your proposed\nchanges are implemented.  I recall that a few people cared a lot\nabout this, and not too long ago.\n"},{"id":"46130","messageId":"Pine.LNX.4.64.0706302236210.4438@racer.site","threadId":"8785","inReplyTo":"f66eog$qe$1@sea.gmane.org","subject":"Re: Start deprecating \"git-command\" in favor of \"git command\"","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-06-30T21:37:07Z","receivedAt":"2007-06-30T21:37:07Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Sat, 30 Jun 2007, walt wrote:\n\n> Linus Torvalds wrote:\n> > I realize that a lot of people use the \"git-xyzzy\" format, and we have\n> > various historical reasons for it...\n> \n> One of the historical reasons was to allow users of gnu interactive\n> tools to delete the git wrapper script, as outlined in 'INSTALL'.\n> \n> Seems unlikely that 'git' could still be deleted if your proposed\n> changes are implemented.  I recall that a few people cared a lot\n> about this, and not too long ago.\n\nAll this would be less of a problem if Git consisted only of builtins, \nsince you could easily do \"mv git gitscm\" then. *sigh*\n\nCiao,\nDscho\n"},{"id":"46133","messageId":"f66m4i$ih4$1@sea.gmane.org","threadId":"8785","inReplyTo":"Pine.LNX.4.64.0706302236210.4438@racer.site","subject":"Re: Start deprecating \"git-command\" in favor of \"git command\"","fromName":"walt","fromEmail":"wa1ter@myrealbox.com","sentAt":"2007-06-30T22:40:13Z","receivedAt":"2007-06-30T22:40:13Z","isPatch":false,"sender":{"key":"wa1ter@myrealbox.com","avatar":null},"body":"Johannes Schindelin wrote:\n> Hi,\n> \n> On Sat, 30 Jun 2007, walt wrote:\n> \n>> Linus Torvalds wrote:\n>>> I realize that a lot of people use the \"git-xyzzy\" format, and we have\n>>> various historical reasons for it...\n>> One of the historical reasons was to allow users of gnu interactive\n>> tools to delete the git wrapper script, as outlined in 'INSTALL'.\n...\n> All this would be less of a problem if Git consisted only of builtins, \n> since you could easily do \"mv git gitscm\" then. *sigh*\n\nI just installed the gnu tools as a test (gentoo won't allow both gits to\nbe installed at the same time, btw) and I found that each package installs\none main 'git' along with a collection of other tools beginning with the\nprefix git.\n\nOne major difference is that our git names them git-* while the gnu tools\nnames them git*, so only the main 'git's conflict.  The gnu 'git' can also\nbe renamed and it still works.  'man git' might still be a problem.\n"},{"id":"46139","messageId":"7vtzsoami9.fsf@assigned-by-dhcp.cox.net","threadId":"8785","inReplyTo":"20070630194335.GK7730@nan92-1-81-57-214-146.fbx.proxad.net","subject":"Re: Start deprecating \"git-command\" in favor of \"git command\"","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-07-01T02:25:18Z","receivedAt":"2007-07-01T02:25:18Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Yann Dirson <ydirson@altern.org> writes:\n\n> On Sat, Jun 30, 2007 at 12:17:10PM -0700, Junio C Hamano wrote:\n>> So I am somewhat negative on this, unless there is a way for\n>> scripts to say \"Even though I say 'git foo', I do mean 'git foo'\n>> not whatever the user has aliased\".\n>\n> \"git --no-alias foo\" (like \"cvs -f foo\" which ignores ~/.cvsrc) ?\n\nThe current scripts that largely use \"git-foo\" do not have to be\nchanged.  Your --no-alias and Linus's \"git - foo\" would be a\n\"solution\", but both require changes to the scripts -- and that\n\"solution\" is necessary only because we would rewrite calls to\n\"git-foo\" in existing scripts to \"git foo\" today?\n\nNo, thanks.  We should do better than that.\n"},{"id":"46142","messageId":"alpine.LFD.0.98.0706301955560.1172@woody.linux-foundation.org","threadId":"8785","inReplyTo":"7vtzsoami9.fsf@assigned-by-dhcp.cox.net","subject":"Re: Start deprecating \"git-command\" in favor of \"git command\"","fromName":"Linus Torvalds","fromEmail":"torvalds@linux-foundation.org","sentAt":"2007-07-01T03:01:59Z","receivedAt":"2007-07-01T03:01:59Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Sat, 30 Jun 2007, Junio C Hamano wrote:\n> \n> The current scripts that largely use \"git-foo\" do not have to be\n> changed.  Your --no-alias and Linus's \"git - foo\" would be a\n> \"solution\", but both require changes to the scripts\n\nNo. I didn't (and wouldn't) _remove_ the \"git-xyzzy\" thing.\n\nI'm just saying that it should be considered a secondary thing, and we \nshould have the long-term *option* to remove it.\n\nAnd in order to do that, we should start removing our dependency on it \nearlier rather than later.\n\nYour whole alias argument is bogus, since we don't _allow_ aliases to \noverride the command (as you yourself did admit).\n\nSo changing the current scripts from using \"git-xyzzy\" to using \"git \nxyzzy\" changes nothing at all - except it gives people the _option_ to \nstop installing the git-* links if they don't want to.\n\nWith my script, you can actually do it and have a mostly working setup. \nYeah, not installing the git-* links will actually break some things, but \nit won't break the really common stuff. \n\nAs it is, we have to have the git-* links somewhere, and I don't see why \nyou or others argue that that _requirement_ is somehow a better thing than \nnot requiring it.\n\nWith my patch, it's a _choice_, rather than a straight-jacket.\n\n\t\tLinus\n"},{"id":"46144","messageId":"7vsl8894tc.fsf@assigned-by-dhcp.cox.net","threadId":"8785","inReplyTo":"alpine.LFD.0.98.0706301955560.1172@woody.linux-foundation.org","subject":"Re: Start deprecating \"git-command\" in favor of \"git command\"","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-07-01T03:32:47Z","receivedAt":"2007-07-01T03:32:47Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Linus Torvalds <torvalds@linux-foundation.org> writes:\n\n> On Sat, 30 Jun 2007, Junio C Hamano wrote:\n>> \n>> The current scripts that largely use \"git-foo\" do not have to be\n>> changed.  Your --no-alias and Linus's \"git - foo\" would be a\n>> \"solution\", but both require changes to the scripts\n>\n> No. I didn't (and wouldn't) _remove_ the \"git-xyzzy\" thing.\n>\n> I'm just saying that it should be considered a secondary thing, and we \n> should have the long-term *option* to remove it.\n>\n> And in order to do that, we should start removing our dependency on it \n> earlier rather than later.\n>\n> Your whole alias argument is bogus, since we don't _allow_ aliases to \n> override the command (as you yourself did admit).\n>\n> So changing the current scripts from using \"git-xyzzy\" to using \"git \n> xyzzy\" changes nothing at all - except it gives people the _option_ to \n> stop installing the git-* links if they don't want to.\n\nPeople who do not want to have git-xyzzy in their PATH had that\nchoice for eternity (\"make gitexecdir=$(prefix)/libexec/git\");\nyour patch is not needed to satisfy that.\n\nWhat it buys us is that they do not have to have\n$(prefix)/libexec/git/git-xyzzy for all xyzzy that git.c knows\nabout as built-ins (obviously non built-ins are still needed).\nI do see value in not cluttering $(prefix)/bin/ quite a lot, but\ndoes it matter if we have 140 links or 70 links (the differences\nare 70 or so built-ins we currently have) in $(prefix)/libexec/git?\n\nI would not be objecting to it if this was about $(bindir).\n\n> With my patch, it's a _choice_, rather than a straight-jacket.\n\nBut that is a different choice.  Choice of having only 70\ngit-xyzzy in $(gitexecdir) vs having to have 140 (among which 70\nare hardlinks).\n\nYour patch _closes the door_ for us to implement overriding\naliases later if we wanted to; we would need to go back to the\nscripts and say \"git --no-alias xyzzy\" again.\n"},{"id":"46155","messageId":"20070701082202.GB6093@coredump.intra.peff.net","threadId":"8785","inReplyTo":"7vy7i1b6bt.fsf@assigned-by-dhcp.cox.net","subject":"Re: Start deprecating \"git-command\" in favor of \"git command\"","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2007-07-01T08:22:02Z","receivedAt":"2007-07-01T08:22:02Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Sat, Jun 30, 2007 at 12:17:10PM -0700, Junio C Hamano wrote:\n\n> So I am somewhat negative on this, unless there is a way for\n> scripts to say \"Even though I say 'git foo', I do mean 'git foo'\n> not whatever the user has aliased\".\n\nI had submitted GIT_NOALIAS=1 patches a while back, but IIRC, the\nconsensus was that it was a bit too ugly and fragile in concept.\n\n-Peff\n"},{"id":"46161","messageId":"Pine.LNX.4.64.0707011301540.4438@racer.site","threadId":"8785","inReplyTo":"7vsl8894tc.fsf@assigned-by-dhcp.cox.net","subject":"Re: Start deprecating \"git-command\" in favor of \"git command\"","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-07-01T12:12:16Z","receivedAt":"2007-07-01T12:12:16Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Sat, 30 Jun 2007, Junio C Hamano wrote:\n\n> Your patch _closes the door_ for us to implement overriding aliases \n> later if we wanted to; we would need to go back to the scripts and say \n> \"git --no-alias xyzzy\" again.\n\nNo, it does not.\n\nCarlos had a cute idea on IRC, but was too shy to mention it here. There \nis a central place for Git's shell script, git-sh-setup. Defining an \nenvironment variable there, GIT_NO_ALIAS, and honouring that in the Git \nwrapper. Something similar is possible in Git.pm for perl scripts.\n\nNote: I am opposed to overriding default parameters via alias. I am only \nstating that it is still possible.\n\nI am in favour of Linus' patch. Here's why: quite some times, I have been \nasked (at a very late stage) \"What still confuses me: what is the \ndifference between git-xyz and git xyz?\" It _is_ confusing for beginners, \neven if it is easy to explain.\n\nCiao,\nDscho\n"},{"id":"46167","messageId":"20070701134734.GM7730@nan92-1-81-57-214-146.fbx.proxad.net","threadId":"8785","inReplyTo":"Pine.LNX.4.64.0706302236210.4438@racer.site","subject":"Re: Start deprecating \"git-command\" in favor of \"git command\"","fromName":"Yann Dirson","fromEmail":"ydirson@altern.org","sentAt":"2007-07-01T13:47:34Z","receivedAt":"2007-07-01T13:47:34Z","isPatch":false,"sender":{"key":"ydirson@altern.org","avatar":"https://avatars.githubusercontent.com/u/1190950?v=4"},"body":"On Sat, Jun 30, 2007 at 10:37:07PM +0100, Johannes Schindelin wrote:\n> Hi,\n> \n> On Sat, 30 Jun 2007, walt wrote:\n> \n> > Linus Torvalds wrote:\n> > > I realize that a lot of people use the \"git-xyzzy\" format, and we have\n> > > various historical reasons for it...\n> > \n> > One of the historical reasons was to allow users of gnu interactive\n> > tools to delete the git wrapper script, as outlined in 'INSTALL'.\n> > \n> > Seems unlikely that 'git' could still be deleted if your proposed\n> > changes are implemented.  I recall that a few people cared a lot\n> > about this, and not too long ago.\n> \n> All this would be less of a problem if Git consisted only of builtins, \n> since you could easily do \"mv git gitscm\" then. *sigh*\n\nThat *would* be a problem for all porcelains - stgit, guilt, qgit,\netc, all have to find git...\n\nBest regards,\n-- \nYann\n"},{"id":"46168","messageId":"Pine.LNX.4.64.0707011313580.4438@racer.site","threadId":"8785","inReplyTo":"20070701082202.GB6093@coredump.intra.peff.net","subject":"Re: Start deprecating \"git-command\" in favor of \"git command\"","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-07-01T13:48:19Z","receivedAt":"2007-07-01T13:48:19Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Sun, 1 Jul 2007, Jeff King wrote:\n\n> On Sat, Jun 30, 2007 at 12:17:10PM -0700, Junio C Hamano wrote:\n> \n> > So I am somewhat negative on this, unless there is a way for\n> > scripts to say \"Even though I say 'git foo', I do mean 'git foo'\n> > not whatever the user has aliased\".\n> \n> I had submitted GIT_NOALIAS=1 patches a while back, but IIRC, the\n> consensus was that it was a bit too ugly and fragile in concept.\n\nI think it is not GIT_NOALIAS that is ugly and fragile in concept. It is \nthe whole notion that you can define default parameters via aliases that \nis ugly and fragile.\n\nThe possibility to say\n\n\tgit config alias.log '!rm -rf /home/peff'\n\non somebody _else's_ machine makes me go shudder.\n\nAnd there's another thing. On some machines, rm is aliased to 'rm -i'. \nThat's good, right? NO! It _forces_ me to either look at the aliases on \nthat particular box, or alternatively (which is what I actually do), \nspecify _exactly_ what I want (I never do \"rm\", I always do \"rm -i\" or \"rm \n-f\", or \"git rm\"). That's because the default behaviour is \n_different_ on _different_ boxes. Repeat after me: consistency is good, \ninconsistency is bad.\n\nSo, yes, I am glad we have the option of using GIT_NOALIAS (which I forgot \nuntil jasam had this idea on IRC, independently), but no, I'd like not to \nuse it. Not because GIT_NOALIAS is ugly, but because individual \noverriding default behaviours via peculiar aliases is.\n\nCiao,\nDscho\n"},{"id":"46186","messageId":"7vir946lcb.fsf@assigned-by-dhcp.cox.net","threadId":"8785","inReplyTo":"Pine.LNX.4.64.0707011301540.4438@racer.site","subject":"Re: Start deprecating \"git-command\" in favor of \"git command\"","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-07-01T18:16:20Z","receivedAt":"2007-07-01T18:16:20Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n> Carlos had a cute idea on IRC, but was too shy to mention it here. There \n> is a central place for Git's shell script, git-sh-setup. Defining an \n> environment variable there, GIT_NO_ALIAS, and honouring that in the Git \n> wrapper. Something similar is possible in Git.pm for perl scripts.\n>\n> Note: I am opposed to overriding default parameters via alias. I am only \n> stating that it is still possible.\n>\n> I am in favour of Linus' patch. Here's why: quite some times, I have been \n> asked (at a very late stage) \"What still confuses me: what is the \n> difference between git-xyz and git xyz?\" It _is_ confusing for beginners, \n> even if it is easy to explain.\n\nOk, please consider the idea sold.\n"},{"id":"46194","messageId":"4688189C.8040105@freedesktop.org","threadId":"8785","inReplyTo":"Pine.LNX.4.64.0707011313580.4438@racer.site","subject":"Re: Start deprecating \"git-command\" in favor of \"git command\"","fromName":"Josh Triplett","fromEmail":"josh@freedesktop.org","sentAt":"2007-07-01T21:11:56Z","receivedAt":"2007-07-01T21:11:56Z","isPatch":false,"sender":{"key":"josh@joshtriplett.org","avatar":"https://avatars.githubusercontent.com/u/162737?v=4"},"body":"Johannes Schindelin wrote:\n> Hi,\n> \n> On Sun, 1 Jul 2007, Jeff King wrote:\n> \n>> On Sat, Jun 30, 2007 at 12:17:10PM -0700, Junio C Hamano wrote:\n>>\n>>> So I am somewhat negative on this, unless there is a way for\n>>> scripts to say \"Even though I say 'git foo', I do mean 'git foo'\n>>> not whatever the user has aliased\".\n>> I had submitted GIT_NOALIAS=1 patches a while back, but IIRC, the\n>> consensus was that it was a bit too ugly and fragile in concept.\n> \n> I think it is not GIT_NOALIAS that is ugly and fragile in concept. It is \n> the whole notion that you can define default parameters via aliases that \n> is ugly and fragile.\n> \n> The possibility to say\n> \n> \tgit config alias.log '!rm -rf /home/peff'\n> \n> on somebody _else's_ machine makes me go shudder.\n> \n> And there's another thing. On some machines, rm is aliased to 'rm -i'. \n> That's good, right? NO! It _forces_ me to either look at the aliases on \n> that particular box, or alternatively (which is what I actually do), \n> specify _exactly_ what I want (I never do \"rm\", I always do \"rm -i\" or \"rm \n> -f\", or \"git rm\"). That's because the default behaviour is \n> _different_ on _different_ boxes. Repeat after me: consistency is good, \n> inconsistency is bad.\n\nAnd to give a git-specific example, I suspect many people would see this\nfeature and immediately do \"git config alias.commit \"commit -a\".\n\n- Josh Triplett\n"},{"id":"46314","messageId":"alpine.LFD.0.999.0707022253580.26459@xanadu.home","threadId":"8785","inReplyTo":"7vsl8894tc.fsf@assigned-by-dhcp.cox.net","subject":"Re: Start deprecating \"git-command\" in favor of \"git command\"","fromName":"Nicolas Pitre","fromEmail":"nico@cam.org","sentAt":"2007-07-03T02:56:16Z","receivedAt":"2007-07-03T02:56:16Z","isPatch":false,"sender":{"key":"nico@fluxnic.net","avatar":"https://avatars.githubusercontent.com/u/702790?v=4"},"body":"On Sat, 30 Jun 2007, Junio C Hamano wrote:\n\n> Your patch _closes the door_ for us to implement overriding\n> aliases later if we wanted to; we would need to go back to the\n> scripts and say \"git --no-alias xyzzy\" again.\n\nI think such aliases would be evil.  Closing the door on them is most \ncertainly a good thing IMHO.\n\n\nNicolas\n"},{"id":"46319","messageId":"7vlkdyuovm.fsf@assigned-by-dhcp.cox.net","threadId":"8785","inReplyTo":"alpine.LFD.0.999.0707022253580.26459@xanadu.home","subject":"Re: Start deprecating \"git-command\" in favor of \"git command\"","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2007-07-03T03:50:37Z","receivedAt":"2007-07-03T03:50:37Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Nicolas Pitre <nico@cam.org> writes:\n\n> On Sat, 30 Jun 2007, Junio C Hamano wrote:\n>\n>> Your patch _closes the door_ for us to implement overriding\n>> aliases later if we wanted to; we would need to go back to the\n>> scripts and say \"git --no-alias xyzzy\" again.\n>\n> I think such aliases would be evil.  Closing the door on them is most \n> certainly a good thing IMHO.\n\nOk.\n\nNow my 'next' is coming very close to 'master' while preparing\nfor 1.5.3-rc0, it may be a good time to apply Linus's magic.\n"}]}