{"thread":{"id":"14055","subject":"[q] git-diff --reverse 7def2be1..7def2be1^","startedAt":"2008-06-20T08:20:34Z","lastAt":"2008-07-07T04:01:31Z","messageCount":25,"participants":["Ingo Molnar","Junio C Hamano","Jakub Narebski","Matthieu Moy","Mikael Magnusson","Andreas Ericsson","Nicolas Pitre","Dmitry Potapov"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"80446","messageId":"20080620082034.GA24913@elte.hu","threadId":"14055","inReplyTo":null,"subject":"[q] git-diff --reverse 7def2be1..7def2be1^","fromName":"Ingo Molnar","fromEmail":"mingo@elte.hu","sentAt":"2008-06-20T08:20:34Z","receivedAt":"2008-06-20T08:20:34Z","isPatch":false,"sender":{"key":"mingo@elte.hu","avatar":null},"body":"\nA couple of stupid Git questions (using git-1.5.4.3-2.fc8).\n\nSometimes i want to see the reverse diff of a particular commit.\n\nIf i want to see the normal diff i do:\n\n   git-log -1 -p 7def2be1\n\nBut generating the reverse diff does not work:\n\n   git-log --reverse -1 -p 7def2be1\n\nBecause the '--reverse' here is the ordering of the revlist, not the \ndirection of the patch itself. And that's OK, albeit slightly \nunintuitive.\n\nSo instead i do:\n\n   git-diff --reverse 7def2be1..7def2be1^\n\nI've got two observations / potential suggestions:\n\n1) the SHA1 is duplicated above, is there a way to avoid it? Initially i \n   tried the obvious extension:\n\n      git-diff --reverse 7def2be1..^\n\n   But Git didnt recognize that as a valid commit range.\n\n2) is there a way to pass something like --reversediff to git-log?\n\n   [ time passes as i read the manpage - the final thing i do when\n     every other measure fails ;-) ]\n\n   Ah, there's \"git-log -R\" that would achieve this. \n\n   The situation still feels a tiny bit inconsistent to me, and that's \n   why my attempt to figure it out intuitively based on my existing \n   practices failed:\n\n    a) -R is not recognized by git-diff (so i cannot just standardize \n       myself on -R and have to waste neurons on remembering the \n       distinction ;-)\n\n    b) --reverse has different meaning in git-log and git-diff.\n\nPerhaps one solution would be if -R was recognized by git-diff as the \nmeaning of --reverse is an ABI. The extension to the sha1 range \nspecifier would be nice as well, it feels intuitive to me.\n\nHm?\n\n\tIngo\n"},{"id":"80447","messageId":"7v7icko61g.fsf@gitster.siamese.dyndns.org","threadId":"14055","inReplyTo":"20080620082034.GA24913@elte.hu","subject":"Re: [q] git-diff --reverse 7def2be1..7def2be1^","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-06-20T08:38:03Z","receivedAt":"2008-06-20T08:38:03Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ingo Molnar <mingo@elte.hu> writes:\n\n>     a) -R is not recognized by git-diff (so i cannot just standardize \n>        myself on -R and have to waste neurons on remembering the \n>        distinction ;-)\n\nHuh?  Have you actually tried \"git diff -R\"?  My copy of git 1.0.0 knows\nabout it.  What year are you still in ;-)?\n\nIf you apply the output of\n\n\tgit diff -R HEAD^..HEAD\n\nto your tree, you can revert the tip commit.  It is the same as\n\n\tgit diff HEAD..HEAD^\n\nIf you want to write a forward diff in an obscure way, you could say\n\n\tgit diff -R HEAD..HEAD^\n"},{"id":"80448","messageId":"7v3an8o5mm.fsf@gitster.siamese.dyndns.org","threadId":"14055","inReplyTo":"7v7icko61g.fsf@gitster.siamese.dyndns.org","subject":"Re: [q] git-diff --reverse 7def2be1..7def2be1^","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-06-20T08:46:57Z","receivedAt":"2008-06-20T08:46:57Z","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> Ingo Molnar <mingo@elte.hu> writes:\n>\n>>     a) -R is not recognized by git-diff (so i cannot just standardize \n>>        myself on -R and have to waste neurons on remembering the \n>>        distinction ;-)\n>\n> Huh?  Have you actually tried \"git diff -R\"?  My copy of git 1.0.0 knows\n> about it.  What year are you still in ;-)?\n>\n> If you apply the output of\n>\n> \tgit diff -R HEAD^..HEAD\n>\n> to your tree, you can revert the tip commit.  It is the same as\n>\n> \tgit diff HEAD..HEAD^\n>\n> If you want to write a forward diff in an obscure way, you could say\n>\n> \tgit diff -R HEAD..HEAD^\n\nBy the way, not linking --reverse (traverse the history normally and then\nshow the commits in the reverse order than usual) to -R (show diff in the\nopposite way while showing the change each commit introduces) allows you\nto even say \"log --reverse -R\", which did not come from a conscious\ndesign, but being able to say this _is_ a conscious design:\n\n\t$ git fetch j6t\n\t$ git log --reverse -p ..j6t/for-junio\n\nWhen I review a branch somebody else offers me, I may want to view the\ncommits on them in reverse order (so that they build a bit by bit on top\nof my tree), but I _certainly_ do not want to view the patch in reverse!\n"},{"id":"80453","messageId":"20080620100038.GB10704@elte.hu","threadId":"14055","inReplyTo":"7v3an8o5mm.fsf@gitster.siamese.dyndns.org","subject":"Re: [q] git-diff --reverse 7def2be1..7def2be1^","fromName":"Ingo Molnar","fromEmail":"mingo@elte.hu","sentAt":"2008-06-20T10:00:38Z","receivedAt":"2008-06-20T10:00:38Z","isPatch":false,"sender":{"key":"mingo@elte.hu","avatar":null},"body":"\n* Junio C Hamano <gitster@pobox.com> wrote:\n\n> By the way, not linking --reverse (traverse the history normally and \n> then show the commits in the reverse order than usual) to -R (show \n> diff in the opposite way while showing the change each commit \n> introduces) allows you to even say \"log --reverse -R\", which did not \n> come from a conscious design, but being able to say this _is_ a \n> conscious design:\n> \n> \t$ git fetch j6t\n> \t$ git log --reverse -p ..j6t/for-junio\n> \n> When I review a branch somebody else offers me, I may want to view the \n> commits on them in reverse order (so that they build a bit by bit on \n> top of my tree), but I _certainly_ do not want to view the patch in \n> reverse!\n\nyes, i too do that occasionally (and some of my export/import scripts \nrely on it in fact), and i was not suggesting to change any existing \nfunctionality anyway.\n\n\tIngo\n"},{"id":"80454","messageId":"20080620100224.GC10704@elte.hu","threadId":"14055","inReplyTo":"7v7icko61g.fsf@gitster.siamese.dyndns.org","subject":"Re: [q] git-diff --reverse 7def2be1..7def2be1^","fromName":"Ingo Molnar","fromEmail":"mingo@elte.hu","sentAt":"2008-06-20T10:02:24Z","receivedAt":"2008-06-20T10:02:24Z","isPatch":false,"sender":{"key":"mingo@elte.hu","avatar":null},"body":"\n* Junio C Hamano <gitster@pobox.com> wrote:\n\n> Ingo Molnar <mingo@elte.hu> writes:\n> \n> >     a) -R is not recognized by git-diff (so i cannot just standardize \n> >        myself on -R and have to waste neurons on remembering the \n> >        distinction ;-)\n> \n> Huh?  Have you actually tried \"git diff -R\"?  My copy of git 1.0.0 \n> knows about it.  What year are you still in ;-)?\n\nyeah, i tried it and somehow messed up so this is a red herring - i'll \njust use -R from now on :-)\n\nthe HEAD..^ format suggestion still stands, to express the range from \nHEAD to HEAD-1.\n\n\tIngo\n"},{"id":"80455","messageId":"m3d4mcmq20.fsf@localhost.localdomain","threadId":"14055","inReplyTo":"20080620082034.GA24913@elte.hu","subject":"Re: [q] git-diff --reverse 7def2be1..7def2be1^","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2008-06-20T10:05:30Z","receivedAt":"2008-06-20T10:05:30Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Ingo Molnar <mingo@elte.hu> writes:\n\n> I've got two observations / potential suggestions:\n> \n> 1) the SHA1 is duplicated above, is there a way to avoid it? Initially i \n>    tried the obvious extension:\n> \n>       git-diff --reverse 7def2be1..^\n> \n>    But Git didnt recognize that as a valid commit range.\n\nThere is shortcut for rev^..rev, namely rev^! (I'm not sure if it is\ndocumented anywhere, though), so you could have used\n\n        git diff 7def2be1^!\n \n>    [ time passes as i read the manpage - the final thing i do when\n>      every other measure fails ;-) ]\n> \n>    Ah, there's \"git-log -R\" that would achieve this. \n\nI think you should have done this first...\n\n-- \nJakub Narebski\nPoland\nShadeHawk on #git\n"},{"id":"80460","messageId":"vpqiqw42vk6.fsf@bauges.imag.fr","threadId":"14055","inReplyTo":"20080620082034.GA24913@elte.hu","subject":"Re: [q] git-diff --reverse 7def2be1..7def2be1^","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@imag.fr","sentAt":"2008-06-20T11:30:01Z","receivedAt":"2008-06-20T11:30:01Z","isPatch":false,"sender":{"key":"git@matthieu-moy.fr","avatar":"https://avatars.githubusercontent.com/u/14709?v=4"},"body":"Ingo Molnar <mingo@elte.hu> writes:\n\n> 1) the SHA1 is duplicated above, is there a way to avoid it? Initially i \n>    tried the obvious extension:\n>\n>       git-diff --reverse 7def2be1..^\n>\n>    But Git didnt recognize that as a valid commit range.\n\nGit may not know how to do it, but since you can omit the .. here,\nyour shell knows:\n\n  git diff whatever{,^}\n\n(BTW, git-foo is being obsoleted in favor of \"git foo\")\n\n-- \nMatthieu\n"},{"id":"80476","messageId":"237967ef0806200602v6b95939fm2663be849799e2de@mail.gmail.com","threadId":"14055","inReplyTo":"m3d4mcmq20.fsf@localhost.localdomain","subject":"Re: [q] git-diff --reverse 7def2be1..7def2be1^","fromName":"Mikael Magnusson","fromEmail":"mikachu@gmail.com","sentAt":"2008-06-20T13:02:21Z","receivedAt":"2008-06-20T13:02:21Z","isPatch":false,"sender":{"key":"mikachu@gmail.com","avatar":null},"body":"2008/6/20 Jakub Narebski <jnareb@gmail.com>:\n\n> There is shortcut for rev^..rev, namely rev^! (I'm not sure if it is\n> documented anywhere, though), so you could have used\n>\n>        git diff 7def2be1^!\n>\n>>    [ time passes as i read the manpage - the final thing i do when\n>>      every other measure fails ;-) ]\n\nWith some grepping, i found this in git-rev-parse,\n\n       Two other shorthands for naming a set that is formed by a\ncommit and its parent\n       commits exists. r1^@ notation means all parents of r1. r1^!\nincludes commit r1\n       but excludes its all parents.\n\n-- \nMikael Magnusson\n"},{"id":"80478","messageId":"237967ef0806200604s469a844l4d33301a60789c1@mail.gmail.com","threadId":"14055","inReplyTo":"20080620082034.GA24913@elte.hu","subject":"Re: [q] git-diff --reverse 7def2be1..7def2be1^","fromName":"Mikael Magnusson","fromEmail":"mikachu@gmail.com","sentAt":"2008-06-20T13:04:49Z","receivedAt":"2008-06-20T13:04:49Z","isPatch":false,"sender":{"key":"mikachu@gmail.com","avatar":null},"body":"2008/6/20 Ingo Molnar <mingo@elte.hu>:\n>\n> A couple of stupid Git questions (using git-1.5.4.3-2.fc8).\n>\n> Sometimes i want to see the reverse diff of a particular commit.\n>\n> If i want to see the normal diff i do:\n>\n>   git-log -1 -p 7def2be1\n\ngit show 7def2b1 is a bit easier to type.\n\n-- \nMikael Magnusson\n"},{"id":"80481","messageId":"200806201513.51034.jnareb@gmail.com","threadId":"14055","inReplyTo":"237967ef0806200602v6b95939fm2663be849799e2de@mail.gmail.com","subject":"Re: [q] git-diff --reverse 7def2be1..7def2be1^","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2008-06-20T13:13:50Z","receivedAt":"2008-06-20T13:13:50Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Mikael Magnusson wrote:\n> 2008/6/20 Jakub Narebski <jnareb@gmail.com>:\n> \n>> There is shortcut for rev^..rev, namely rev^! (I'm not sure if it is\n>> documented anywhere, though), so you could have used\n>>\n>>        git diff 7def2be1^!\n>>\n>>>    [ time passes as i read the manpage - the final thing i do when\n>>>      every other measure fails ;-) ]\n> \n> With some grepping, i found this in git-rev-parse,\n> \n>        Two other shorthands for naming a set that is formed by a commit and its parent\n>        commits exists. r1^@ notation means all parents of r1. r1^! includes commit r1\n>        but excludes its all parents.\n\nA bit strange is that neither \"git rev-parse pu^!\" nor \"git rev-parse pu^@\"\nwork, while the same works with git-rev-list.  WTF?\n\n-- \nJakub Narebski\nPoland\n"},{"id":"80487","messageId":"20080620135004.GB8135@elte.hu","threadId":"14055","inReplyTo":"vpqiqw42vk6.fsf@bauges.imag.fr","subject":"Re: [q] git-diff --reverse 7def2be1..7def2be1^","fromName":"Ingo Molnar","fromEmail":"mingo@elte.hu","sentAt":"2008-06-20T13:50:05Z","receivedAt":"2008-06-20T13:50:05Z","isPatch":false,"sender":{"key":"mingo@elte.hu","avatar":null},"body":"\n* Matthieu Moy <Matthieu.Moy@imag.fr> wrote:\n\n> (BTW, git-foo is being obsoleted in favor of \"git foo\")\n\nhm, can Bash be taught to do command completion on 'git rer<tab>', like \nit is able to do on git-rer<tab> ?\n\n\tIngo\n"},{"id":"80488","messageId":"20080620135236.GC8135@elte.hu","threadId":"14055","inReplyTo":"m3d4mcmq20.fsf@localhost.localdomain","subject":"Re: [q] git-diff --reverse 7def2be1..7def2be1^","fromName":"Ingo Molnar","fromEmail":"mingo@elte.hu","sentAt":"2008-06-20T13:52:37Z","receivedAt":"2008-06-20T13:52:37Z","isPatch":false,"sender":{"key":"mingo@elte.hu","avatar":null},"body":"\n* Jakub Narebski <jnareb@gmail.com> wrote:\n\n> >    But Git didnt recognize that as a valid commit range.\n> \n> There is shortcut for rev^..rev, namely rev^! (I'm not sure if it is \n> documented anywhere, though), so you could have used\n> \n>         git diff 7def2be1^!\n\nnice! :-)\n\n> >    [ time passes as i read the manpage - the final thing i do when\n> >      every other measure fails ;-) ]\n> > \n> >    Ah, there's \"git-log -R\" that would achieve this. \n> \n> I think you should have done this first...\n\nto read the man page? Nobody reads the manuals, except in grave \ncircumstances ;-)\n\n(Seriously, i usually try to guess around a lot with shell commands just \nto figure out new things, and to see how intuitive they are.)\n\n\tIngo\n"},{"id":"80490","messageId":"m34p7ombie.fsf@localhost.localdomain","threadId":"14055","inReplyTo":"20080620135004.GB8135@elte.hu","subject":"Re: [q] git-diff --reverse 7def2be1..7def2be1^","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2008-06-20T14:23:54Z","receivedAt":"2008-06-20T14:23:54Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Ingo Molnar <mingo@elte.hu> writes:\n\n> * Matthieu Moy <Matthieu.Moy@imag.fr> wrote:\n> \n> > (BTW, git-foo is being obsoleted in favor of \"git foo\")\n> \n> hm, can Bash be taught to do command completion on 'git rer<tab>', like \n> it is able to do on git-rer<tab> ?\n\ncontrib/completion/git-completion.bash in git repository.  \n\nI don't know if there are some ready packages[1] for contrib stuff, and\ngit-completion.bash doesn't seem to get packaged with git.\n\n[1] RPM packages, because Debian seems to have packaged everything, or\nalmist everything, in a itty-bitty-tiny package(lets) :-P\n\nYou can always use zsh, which has git completion in package... ;-)\n \n> \tIngo\n\n-- \nJakub Narebski\n\n\"My name is Inigo Montoya. You killed my father prepare to die\"\n                                           (The Princess Bride)\n"},{"id":"80494","messageId":"20080620153859.GA5700@elte.hu","threadId":"14055","inReplyTo":"20080620153819.GF17373@elte.hu","subject":"Re: [q] git-diff --reverse 7def2be1..7def2be1^","fromName":"Ingo Molnar","fromEmail":"mingo@elte.hu","sentAt":"2008-06-20T15:38:59Z","receivedAt":"2008-06-20T15:38:59Z","isPatch":false,"sender":{"key":"mingo@elte.hu","avatar":null},"body":"\n* Jakub Narebski <jnareb@gmail.com> wrote:\n\n> > hm, can Bash be taught to do command completion on 'git rer<tab>',\n> > like it is able to do on git-rer<tab> ?\n>\n> contrib/completion/git-completion.bash in git repository.\n\nworks perfectly - thanks for the suggestion!\n\n\tIngo\n"},{"id":"80631","messageId":"485E9F52.1060706@op5.se","threadId":"14055","inReplyTo":"20080620135236.GC8135@elte.hu","subject":"Re: [q] git-diff --reverse 7def2be1..7def2be1^","fromName":"Andreas Ericsson","fromEmail":"ae@op5.se","sentAt":"2008-06-22T18:52:02Z","receivedAt":"2008-06-22T18:52:02Z","isPatch":false,"sender":{"key":"ae@op5.se","avatar":"https://gravatar.com/avatar/426e89595c75a8f5252dd0c989e5fabe5bcac616e68557427ad9aef6b0ca342a?d=mp&s=160"},"body":"Ingo Molnar wrote:\n> * Jakub Narebski <jnareb@gmail.com> wrote:\n> \n>>>    But Git didnt recognize that as a valid commit range.\n>> There is shortcut for rev^..rev, namely rev^! (I'm not sure if it is \n>> documented anywhere, though), so you could have used\n>>\n>>         git diff 7def2be1^!\n> \n> nice! :-)\n> \n\nAnd for just a single revision, you can do\n\n\tgit show -R 7def2be1\n\n-- \nAndreas Ericsson                   andreas.ericsson@op5.se\nOP5 AB                             www.op5.se\nTel: +46 8-230225                  Fax: +46 8-230231\n"},{"id":"81260","messageId":"20080626093726.GA24577@elte.hu","threadId":"14055","inReplyTo":"m34p7ombie.fsf@localhost.localdomain","subject":"Re: [q] git-diff --reverse 7def2be1..7def2be1^","fromName":"Ingo Molnar","fromEmail":"mingo@elte.hu","sentAt":"2008-06-26T09:37:26Z","receivedAt":"2008-06-26T09:37:26Z","isPatch":false,"sender":{"key":"mingo@elte.hu","avatar":null},"body":"\n* Jakub Narebski <jnareb@gmail.com> wrote:\n\n> Ingo Molnar <mingo@elte.hu> writes:\n> \n> > * Matthieu Moy <Matthieu.Moy@imag.fr> wrote:\n> > \n> > > (BTW, git-foo is being obsoleted in favor of \"git foo\")\n> > \n> > hm, can Bash be taught to do command completion on 'git rer<tab>', like \n> > it is able to do on git-rer<tab> ?\n> \n> contrib/completion/git-completion.bash in git repository.  \n\nbtw., i had to turn this off - it made certain types of file completions \nalmost unusable, by adding a 2-3 seconds delay (during which bash would \njust spin around burning CPU time calculating its completion guesses).\n\nand that was on a 3 GHz dual-core box ...\n\nso please do not remove the git-* commands, they are really useful.\n\n\tIngo\n"},{"id":"81267","messageId":"200806261302.03952.jnareb@gmail.com","threadId":"14055","inReplyTo":"20080626093726.GA24577@elte.hu","subject":"Re: [q] git-diff --reverse 7def2be1..7def2be1^","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2008-06-26T11:02:02Z","receivedAt":"2008-06-26T11:02:02Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"On Thu, 26. Jun 2008, Ingo Molnar wrote:\n> * Jakub Narebski <jnareb@gmail.com> wrote:\n>> Ingo Molnar <mingo@elte.hu> writes:\n>>> * Matthieu Moy <Matthieu.Moy@imag.fr> wrote:\n>>> \n>>>> (BTW, git-foo is being obsoleted in favor of \"git foo\")\n>>> \n>>> hm, can Bash be taught to do command completion on 'git rer<tab>', like \n>>> it is able to do on git-rer<tab> ?\n>> \n>> contrib/completion/git-completion.bash in git repository.  \n> \n> btw., i had to turn this off - it made certain types of file completions \n> almost unusable, by adding a 2-3 seconds delay (during which bash would \n> just spin around burning CPU time calculating its completion guesses).\n\nPerhaps it would be better when \"ceiling dir\" feature in git, and\nconfigured, so git don't waste time searching for git repositories\nwhere there aren't any.\n\n> and that was on a 3 GHz dual-core box ...\n\nI think this might depend more on filesystem used, and file hierarchy.\nAnd also probably on the number of branches... \n\nThat said, I'm not fully happy with git bash completion[*1*] either:\none of complaints is that when completing \"filename.\" on filename with\nextension (for example to \"filename.h\") it sometimes treats \"filename.\"\nas beiginning of \"<rev1>..<rev2>\", and completes to \"filename..\", \neven if there no 'filename' ref in repository.\n\n> so please do not remove the git-* commands, they are really useful.\n\nWell, they are not removed, just moved aside (to address complaints\nof cluttering $PATH with 130+ programs), and I think that you can\nalways install everything into /usr/bin/, as usual.  Although it would\nbe nice to be able to move aside only internal (*--*) commands, or\nperhaps even internal and plumbing.\n\nFootnotes:\n==========\n[*1*] I wonder how zsh git completion fares in comparison.\n-- \nJakub Narebski\nPoland\n"},{"id":"81269","messageId":"20080626110826.GA25701@elte.hu","threadId":"14055","inReplyTo":"200806261302.03952.jnareb@gmail.com","subject":"Re: [q] git-diff --reverse 7def2be1..7def2be1^","fromName":"Ingo Molnar","fromEmail":"mingo@elte.hu","sentAt":"2008-06-26T11:08:26Z","receivedAt":"2008-06-26T11:08:26Z","isPatch":false,"sender":{"key":"mingo@elte.hu","avatar":null},"body":"\n* Jakub Narebski <jnareb@gmail.com> wrote:\n\n> On Thu, 26. Jun 2008, Ingo Molnar wrote:\n> > * Jakub Narebski <jnareb@gmail.com> wrote:\n> >> Ingo Molnar <mingo@elte.hu> writes:\n> >>> * Matthieu Moy <Matthieu.Moy@imag.fr> wrote:\n> >>> \n> >>>> (BTW, git-foo is being obsoleted in favor of \"git foo\")\n> >>> \n> >>> hm, can Bash be taught to do command completion on 'git rer<tab>', like \n> >>> it is able to do on git-rer<tab> ?\n> >> \n> >> contrib/completion/git-completion.bash in git repository.  \n> > \n> > btw., i had to turn this off - it made certain types of file completions \n> > almost unusable, by adding a 2-3 seconds delay (during which bash would \n> > just spin around burning CPU time calculating its completion guesses).\n> \n> Perhaps it would be better when \"ceiling dir\" feature in git, and\n> configured, so git don't waste time searching for git repositories\n> where there aren't any.\n> \n> > and that was on a 3 GHz dual-core box ...\n> \n> I think this might depend more on filesystem used, and file hierarchy. \n> And also probably on the number of branches...\n\nwell i wanted to say it's a box fast enough.\n\next3, kernel tree, -tip repository with 142 local branches and 277 total \nbranches.\n\n\tIngo\n"},{"id":"81292","messageId":"alpine.LFD.1.10.0806260949010.2979@xanadu.home","threadId":"14055","inReplyTo":"200806261302.03952.jnareb@gmail.com","subject":"Re: [q] git-diff --reverse 7def2be1..7def2be1^","fromName":"Nicolas Pitre","fromEmail":"nico@cam.org","sentAt":"2008-06-26T13:50:44Z","receivedAt":"2008-06-26T13:50:44Z","isPatch":false,"sender":{"key":"nico@fluxnic.net","avatar":"https://avatars.githubusercontent.com/u/702790?v=4"},"body":"On Thu, 26 Jun 2008, Jakub Narebski wrote:\n\n> On Thu, 26. Jun 2008, Ingo Molnar wrote:\n> > so please do not remove the git-* commands, they are really useful.\n> \n> Well, they are not removed, just moved aside (to address complaints\n> of cluttering $PATH with 130+ programs), and I think that you can\n> always install everything into /usr/bin/, as usual.  Although it would\n> be nice to be able to move aside only internal (*--*) commands, or\n> perhaps even internal and plumbing.\n\nOr simply add $gitexecdir to your search path.\n\n\nNicolas\n"},{"id":"81584","messageId":"7vk5g9kyap.fsf@gitster.siamese.dyndns.org","threadId":"14055","inReplyTo":"20080626093726.GA24577@elte.hu","subject":"Re: [q] git-diff --reverse 7def2be1..7def2be1^","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-06-28T22:08:30Z","receivedAt":"2008-06-28T22:08:30Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ingo Molnar <mingo@elte.hu> writes:\n\n> * Jakub Narebski <jnareb@gmail.com> wrote:\n> ...\n>> contrib/completion/git-completion.bash in git repository.  \n>\n> btw., i had to turn this off - it made certain types of file completions \n> almost unusable, by adding a 2-3 seconds delay (during which bash would \n> just spin around burning CPU time calculating its completion guesses).\n>\n> and that was on a 3 GHz dual-core box ...\n>\n> so please do not remove the git-* commands, they are really useful.\n\nThe slowness of the completion script (especially the time it takes before\nit decides to complete pathnames) has been bothering me for some time, so\nI share Ingo's frustration, but it hasn't got to the point to disable it.\n\nAfter typing:\n\n\t$ git checkout master -- Docu\n\nand then hitting the \"Tab\" key to complete before I see \"mentation/\", it\ntakes about 2-3 seconds for the first time, and after that it becomes\ntorelable.  Is it the command table bootstrapping that is taking this\nlong?\n\n<offtopic> I'll be mostly offline for the rest of the day, so you do not\nhave to respond in a hurry. </offtopic>\n"},{"id":"82376","messageId":"37fcd2780807060916h7d8c4e6mba7f30570d527dc3@mail.gmail.com","threadId":"14055","inReplyTo":"m3d4mcmq20.fsf@localhost.localdomain","subject":"Re: [q] git-diff --reverse 7def2be1..7def2be1^","fromName":"Dmitry Potapov","fromEmail":"dpotapov@gmail.com","sentAt":"2008-07-06T16:16:31Z","receivedAt":"2008-07-06T16:16:31Z","isPatch":false,"sender":{"key":"dpotapov@gmail.com","avatar":"https://avatars.githubusercontent.com/u/6568595?v=4"},"body":"On Fri, Jun 20, 2008 at 2:05 PM, Jakub Narebski <jnareb@gmail.com> wrote:\n>\n> There is shortcut for rev^..rev, namely rev^! (I'm not sure if it is\n> documented anywhere, though),\n\nThe latter is not exactly a shortcut for the former.  You can try it at any\nmerge commit, and you will see different log. For instance, in Git repo:\n\n$git rev-list 7ac749c^..7ac749c\n7ac749c96d143ba4f76723959892cbaddbe8ed07\n006f31d77f3dd5f813557c2839b39b2aaa22b925\n53b22a9e45161004ff3260782abc4ee2a5b3e730\n872354dcb3ce5f34f7ddb12d2c89d26a1ea4daf0\nbc7c73e29cfb38232b5b6b1d1e8d59e7145a9860\n\n$git rev-list 7ac749c^!\n7ac749c96d143ba4f76723959892cbaddbe8ed07\n\nSo, I believe, rev^! means --first-parent rev^..rev\n\nDmitry\n"},{"id":"82387","messageId":"7vprpqdbjx.fsf@gitster.siamese.dyndns.org","threadId":"14055","inReplyTo":"37fcd2780807060916h7d8c4e6mba7f30570d527dc3@mail.gmail.com","subject":"Re: [q] git-diff --reverse 7def2be1..7def2be1^","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-07-06T20:04:18Z","receivedAt":"2008-07-06T20:04:18Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Dmitry Potapov\" <dpotapov@gmail.com> writes:\n\n> On Fri, Jun 20, 2008 at 2:05 PM, Jakub Narebski <jnareb@gmail.com> wrote:\n>>\n>> There is shortcut for rev^..rev, namely rev^! (I'm not sure if it is\n>> documented anywhere, though),\n>\n> The latter is not exactly a shortcut for the former.  You can try it at any\n> merge commit, and you will see different log. For instance, in Git repo:\n> ...\n> So, I believe, rev^! means --first-parent rev^..rev\n\nNot quite.  From Documentation/git-rev-parse.txt:\n\n    SPECIFYING RANGES\n    -----------------\n\n    Two other shorthands for naming a set that is formed by a commit\n    and its parent commits exists.  `r1{caret}@` notation means all\n    parents of `r1`.  `r1{caret}!` includes commit `r1` but excludes\n    its all parents.\n"},{"id":"82390","messageId":"20080706203951.GB1721@dpotapov.dyndns.org","threadId":"14055","inReplyTo":"7vprpqdbjx.fsf@gitster.siamese.dyndns.org","subject":"Re: [q] git-diff --reverse 7def2be1..7def2be1^","fromName":"Dmitry Potapov","fromEmail":"dpotapov@gmail.com","sentAt":"2008-07-06T20:39:52Z","receivedAt":"2008-07-06T20:39:52Z","isPatch":false,"sender":{"key":"dpotapov@gmail.com","avatar":"https://avatars.githubusercontent.com/u/6568595?v=4"},"body":"On Sun, Jul 06, 2008 at 01:04:18PM -0700, Junio C Hamano wrote:\n>     Two other shorthands for naming a set that is formed by a commit\n>     and its parent commits exists.  `r1{caret}@` notation means all\n>     parents of `r1`.  `r1{caret}!` includes commit `r1` but excludes\n>     its all parents.\n\nSo, I would say that rev^! is shorthand for rev^@..rev, but it does not\nactually work:\n\ngit rev-list 7ac749c^@..7ac749c\nfatal: ambiguous argument '7ac749c^@..7ac749c': unknown revision or path\nnot in the working tree.\n\nyet \"^rev^@ rev\" syntax does:\n\ngit rev-list ^7ac749c^@ 7ac749c\n7ac749c96d143ba4f76723959892cbaddbe8ed07\n\nIs it a bug or feature?\n\nPuzzled...\n\nDmitry\n"},{"id":"82399","messageId":"7vbq1ad4nn.fsf@gitster.siamese.dyndns.org","threadId":"14055","inReplyTo":"20080706203951.GB1721@dpotapov.dyndns.org","subject":"Re: [q] git-diff --reverse 7def2be1..7def2be1^","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-07-06T22:33:16Z","receivedAt":"2008-07-06T22:33:16Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Dmitry Potapov <dpotapov@gmail.com> writes:\n\n> On Sun, Jul 06, 2008 at 01:04:18PM -0700, Junio C Hamano wrote:\n>>     Two other shorthands for naming a set that is formed by a commit\n>>     and its parent commits exists.  `r1{caret}@` notation means all\n>>     parents of `r1`.  `r1{caret}!` includes commit `r1` but excludes\n>>     its all parents.\n>\n> So, I would say that rev^! is shorthand for rev^@..rev, but it does not\n> actually work:\n>\n> git rev-list 7ac749c^@..7ac749c\n> fatal: ambiguous argument '7ac749c^@..7ac749c': unknown revision or path\n> not in the working tree.\n>\n> yet \"^rev^@ rev\" syntax does:\n>\n> git rev-list ^7ac749c^@ 7ac749c\n> 7ac749c96d143ba4f76723959892cbaddbe8ed07\n>\n> Is it a bug or feature?\n>\n> Puzzled...\n\nAfter reading these paragraphs from \"SPECIFYING RANGES\":\n\n        History traversing commands such as 'git-log' operate on a set\n        of commits, not just a single commit.  To these commands,\n        specifying a single revision with the notation described in the\n        previous section means the set of commits reachable from that\n        commit, following the commit ancestry chain.\n\n        To exclude commits reachable from a commit, a prefix `{caret}`\n        notation is used.  E.g. \"`{caret}r1 r2`\" means commits reachable\n        from `r2` but exclude the ones reachable from `r1`.\n\n        This set operation appears so often that there is a shorthand\n        for it.  \"`r1..r2`\" is equivalent to \"`{caret}r1 r2`\".  It is\n        the difference of two sets (subtract the set of commits\n        reachable from `r1` from the set of commits reachable from\n        `r2`).\n\nit is obvious to me that the third paragraph talks about r1 that is a\nsingle rev (refer to SPECIFYING REVISIONS section, which does _NOT_ talk\nabout rev^@ nor rev^!)  and r2 that similarly is another single rev.  So I\nthink it is fairly clear that your \"r^@..r\" example is nonsense.\n\nBut perhaps these paragraphs need to be further reworded to avoid the\nconfusion.  I dunno.\n"},{"id":"82412","messageId":"20080707040131.GC1721@dpotapov.dyndns.org","threadId":"14055","inReplyTo":"7vbq1ad4nn.fsf@gitster.siamese.dyndns.org","subject":"Re: [q] git-diff --reverse 7def2be1..7def2be1^","fromName":"Dmitry Potapov","fromEmail":"dpotapov@gmail.com","sentAt":"2008-07-07T04:01:31Z","receivedAt":"2008-07-07T04:01:31Z","isPatch":false,"sender":{"key":"dpotapov@gmail.com","avatar":"https://avatars.githubusercontent.com/u/6568595?v=4"},"body":"On Sun, Jul 06, 2008 at 03:33:16PM -0700, Junio C Hamano wrote:\n> Dmitry Potapov <dpotapov@gmail.com> writes:\n> \n> > git rev-list 7ac749c^@..7ac749c\n> > fatal: ambiguous argument '7ac749c^@..7ac749c': unknown revision or path\n> > not in the working tree.\n> >\n> > yet \"^rev^@ rev\" syntax does:\n> >\n> > git rev-list ^7ac749c^@ 7ac749c\n> > 7ac749c96d143ba4f76723959892cbaddbe8ed07\n> >\n> > Is it a bug or feature?\n> >\n> > Puzzled...\n> \n> After reading these paragraphs from \"SPECIFYING RANGES\":\n> \n>         History traversing commands such as 'git-log' operate on a set\n>         of commits, not just a single commit.  To these commands,\n>         specifying a single revision with the notation described in the\n>         previous section means the set of commits reachable from that\n>         commit, following the commit ancestry chain.\n> \n>         To exclude commits reachable from a commit, a prefix `{caret}`\n>         notation is used.  E.g. \"`{caret}r1 r2`\" means commits reachable\n>         from `r2` but exclude the ones reachable from `r1`.\n> \n>         This set operation appears so often that there is a shorthand\n>         for it.  \"`r1..r2`\" is equivalent to \"`{caret}r1 r2`\".  It is\n>         the difference of two sets (subtract the set of commits\n>         reachable from `r1` from the set of commits reachable from\n>         `r2`).\n> \n> it is obvious to me that the third paragraph talks about r1 that is a\n> single rev (refer to SPECIFYING REVISIONS section, which does _NOT_ talk\n> about rev^@ nor rev^!)  and r2 that similarly is another single rev.  So I\n> think it is fairly clear that your \"r^@..r\" example is nonsense.\n\nI think both second and third paragraphs talk about r1 as a single\nrevision. Yet, it is allowed to use \"^r^@ r\", and it works fine while\nyou cannot use \"r^@..r\". Of course, this behavior does not contradict\ndocumentation, as it says _nothing_ about what will happen if you use\n\"r^@\" instead of r1. That is why asked whether it is a bug or feature.\nIt still escapes me though, why you consider \"r^@..r\" as nonsense while\n\"^r^@ r\" as correct syntax. Not that I am trying to argue with how it\nshould work, but I am just trying to understand your logic here.\n\nDmitry\n"}]}