From: Bo Yang Date: Tue, 11 May 2010 06:16:04 GMT Subject: Re: Multiple line ranges and files in line level history browser Message-ID: In-Reply-To: <20100509210654.GA1637@progeny.tock> Hi, On Mon, May 10, 2010 at 5:06 AM, Jonathan Nieder wrote: > I like it.  It looks like paranoid script authors would have to check > for paths like ‘--’ and ‘-L’ and quote them as ‘./--’ and ‘./-L’, a > small price to pay for a nice syntax. > > Unfortunately, this is completely incompatible with the existing blame > option syntax.  i.e., existing scripts might do things like this: > >  git blame -L1,8 -C > > or > >  git blame -L1,8 > > Maybe there should be a line range required before every file > specifier in this syntax, to avoid trouble.  Borrowing syntax from sed, > this makes > >  git log -L1,8 -L45,+6 -L/some/,/end/ -L9,29 -L1,$ > > which is also a little clearer to look at, I think. > >> 'git log -L1,8 -- -L1,8' . > > This provides a single line range specifier for all files?  Sounds > convenient. Ah, I don't mean that... I just want to provide a way to let the users view the line range history of files like '-L1,8'. But since you remind me users can always use 'log -L1,8 ./-L1,8' to do this, I think we should abandon this kind of syntax. >  # who wrote the opening comments? >  git blame -L '/^[/][*]/,/^ [*][/]/' -- '*.c' I think users can always use a little shell script to achieve this, we should not bother to implement such a complex thing which can be easily done by shell script. Regards! Bo -- My blog: http://blog.morebits.org