From: Jakub Narebski Date: Fri, 03 Nov 2006 20:53:58 GMT Subject: Re: git-format-patch little gripe Message-ID: In-Reply-To: <20061103195253.9244.qmail@web31814.mail.mud.yahoo.com> Luben Tuikov wrote: > --- Junio C Hamano wrote: >> One thing we talked about but nobody stepped up to code [*1*] is >> to give "git-format-patch --stdin" that reads list of commits, >> and runs "git-diff-tree --pretty --stat --summary -p $commit". >> With that, we could do something like: >> >> git rev-list linus..orinoco | git format-patch --stdin > > That'd be swell to have. > >> Your "git-format-patch --single $commit" is a shorthand for a >> degenerated special case of that pattern. > > Yes, except that I'd have to paste the sha-1 into the terminal > rather than on the command line. This again proves that the current > git-format-patch to mean "..HEAD" is horribly broken. First, you could have behavior you wanted by using additional option --single, i.e. git-format-patch --single would mean git-format-patch ^.. But I agree that it is somewhat counter-intuitive that for all other commands which use revision list means lineage of while for git-format-patch it means ..HEAD ... and we have .. shortcut (two characters more) to mean the same. Another command with non-obvious UI is git-format-branch, which is not CLI equivalent of gitk/qgit (doesn't accept revision range for example). >> You cannot do patch-id based filtering with this form, but I see >> that "single" is often wanted on the list and #git, and people >> who want it do not care about patch-id based filtering at all. > > The reason it is wanted is because it is _intuitive_. This is > what engineers (of different backgrounds) tend to intuitively think > and assume given git's structure and the nature and meaning of > what an is in git, only to be surprised later when that > assumption is completely broken by git-format-patch. Intuiveness is in the eye of beholder :-) >> And I do not think it is that "they do not realize how much they >> would be missing without patch-id filtering", in this case. So >> the above command line would probably be Ok. > > I do not think they'd be missing _anything_. After all, > "git-format-patch ..HEAD" is also intuitive. And we have .. shortcut. -- Jakub Narebski Warsaw, Poland ShadeHawk on #git