From: Junio C Hamano Date: Fri, 10 Dec 2010 23:36:22 GMT Subject: Re: [PATCH 0/2] [RFD] Using gitrevisions :/search style with other operators Message-ID: <7v7hfhb3pl.fsf@alter.siamese.dyndns.org> In-Reply-To: <64905EED-F368-4D3F-9D2D-C08D9B460D67@sb.org> Kevin Ballard writes: > On Dec 10, 2010, at 3:08 PM, Junio C Hamano wrote: > ... >> d414638 Merge branch 'rj/msvc-fix' into pu >> ... >> 1b2ea00 Merge branch 'mg/cvsimport' into pu >> c6d41f4 Merge branch 'nd/maint-relative' into pu >> 81f395e Merge branch 'ab/i18n' into pu >> 9f5471f Merge branch 'nd/setup' into pu >> 06f74a4 Merge branch 'yd/dir-rename' into pu >> d8a2ec8 Merge branch 'en/object-list-with-pathspec' into pu >> >> After looking at this output, do you really want to say ":nth(2)/nd/" >> instead of 9f5471f? > > Yep. Doing the latter either requires me to swap over to my mouse, copy the sha1, > and paste in, or requires me to peer at the sha1 and re-type enough characters. > It's a lot easier to just glance at that list, realize the 2nd one is the one I > want, and type `git merge :^{nth(2)/nd/}`. It may not necessarily be faster than > retyping the sha1, but it's a lot less prone to transcription errors. What you said heavily depends on the way in which I give names to the branches, and also on the fact that "nd/" happens to be not very common prefix at this moment. If the branches were named without nd/ part and still be unique, you would not be arguing for nth(2) at all to begin with. So it is dubious that your argument is convincing.