git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Multiple line ranges and files in line level history browser
@ 2010-05-09 14:00 Bo Yang
  2010-05-09 18:20 ` Junio C Hamano
  2010-05-09 21:06 ` Jonathan Nieder
  0 siblings, 2 replies; 9+ messages in thread
From: Bo Yang @ 2010-05-09 14:00 UTC (permalink / raw)
  To: git
  Cc: Thomas Rast, Jens Lehmann, Jakub Narebski, Junio C Hamano,
	Jonathan Nieder, Johannes Schindelin

Hi,

    Since we want to support to browse the history of multiple line
ranges in multiple files, so we should design a workable way to let
users specify these kind of thing. Generally, git revision walking
mechanism support syntax like:

git log <revision> -- <file1> <file2>

That's that we can specify one revision and multiple files one time.
And the dashdash is optional. And I want to introduce a new way for
line ranges argument based on this, that is something like:

git log <revision> -L1,8 -L45,+6 <file1> -L/some/,/end/ -L9,29 <file2> <file3>

That's that putting the line ranges arguments just before the filename
argument.  And here, no dashdash should be provided by users, if there
is, all the following arguments are still take considered as normal
filenames. And this helps if there are some files in your working
directory called '-L1,8'... Yes, you can always try to browse the line
level history of such a strange file by 'git log -L1,8 <revision> --
-L1,8' .

And the principle for this:
1. After '--', all following arguments are treated as filenames, just
as what we do now;
2. After any <filename>, all following arguments are treated as
whether ranges or filenames, using -L to separate;
3. '-L' can be specified at any place, and all ranges will be assigned
to the first filename following the '-L';
4. If some file has no '-L', we will display the normal log for that
file just like git log -p <file>.

Since '-L' option is also used by many other command, I don't know the
exact impact of this, anyway we can use another name anytime...

If there is no opposition for this kind of option syntax, I will try
to implement it in revision.c. ;-)

Regards!
Bo
-- 
My blog: http://blog.morebits.org

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2010-05-12  7:57 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-09 14:00 Multiple line ranges and files in line level history browser Bo Yang
2010-05-09 18:20 ` Junio C Hamano
2010-05-11  5:43   ` Bo Yang
2010-05-12  7:57     ` Thomas Rast
2010-05-09 21:06 ` Jonathan Nieder
2010-05-10  9:31   ` Jonathan Nieder
2010-05-11  6:28     ` Bo Yang
2010-05-11  6:16   ` Bo Yang
2010-05-11  6:28     ` Jonathan Nieder

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).