git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bo Yang <struggleyb.nku@gmail.com>
To: git@vger.kernel.org
Cc: Thomas Rast <trast@student.ethz.ch>,
	Jens Lehmann <Jens.Lehmann@web.de>,
	Jakub Narebski <jnareb@gmail.com>,
	Junio C Hamano <gitster@pobox.com>,
	Jonathan Nieder <jrnieder@gmail.com>,
	Johannes Schindelin <johannes.schindelin@gmx.de>
Subject: Multiple line ranges and files in line level history browser
Date: Sun, 9 May 2010 07:00:32 -0700	[thread overview]
Message-ID: <p2q41f08ee11005090700xdb6070dajab0e2d77b1d0f9fc@mail.gmail.com> (raw)

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

             reply	other threads:[~2010-05-09 14:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-09 14:00 Bo Yang [this message]
2010-05-09 18:20 ` Multiple line ranges and files in line level history browser 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=p2q41f08ee11005090700xdb6070dajab0e2d77b1d0f9fc@mail.gmail.com \
    --to=struggleyb.nku@gmail.com \
    --cc=Jens.Lehmann@web.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jnareb@gmail.com \
    --cc=johannes.schindelin@gmx.de \
    --cc=jrnieder@gmail.com \
    --cc=trast@student.ethz.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).