Hi, On Mon, May 10, 2010 at 5:06 AM, Jonathan Nieder <jrnieder@xxxxxxxxx> 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 <file> > > or > > git blame -L1,8 <rev> <file> > > 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 <rev> -L1,8 -L45,+6 <file1> -L/some/,/end/ -L9,29 <file2> -L1,$ <file3> > > which is also a little clearer to look at, I think. > >> 'git log -L1,8 <revision> -- -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 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html