git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Multiple line ranges and files in line level history browser

From
Thomas Rast <trast@student.ethz.ch>
Date
May 12, 2010, 07:57 UTC
Message-ID
<201005120957.10961.trast@student.ethz.ch>
In-Reply-To
<AANLkTimCT7euE0CjGBx88MlfVJhxVo1GdOtnMhtZqBQs@mail.gmail.com>
Bo Yang wrote:
Show 8 quoted lines
> On Mon, May 10, 2010 at 2:20 AM, Junio C Hamano <gitster@pobox.com> wrote:
> > I'd rather not to see this in revision.c at all.  The revision.c parser
> > has always been options and then pathspecs and never takes individual
> > filnames, except for "--follow" that is an afterthought checkbox hack that
> > lets the main parser parse and then reject a generic pathspec after the
> > fact.
> 
> Ok, this will be put in the builtin/log.c
[...]
Show 5 quoted lines
> 1. The definition of TREESAME. TREESAME will be changed to consider
> the line ranges if -L option is given;
> With this, the history simplification can be done very well for line
> level history traversal. And even well for parent rewriting to support
> --graph option.
Doesn't this actually mean it should go in revision.c, after all?

AFAICS you make a case that this feature is an extension of the path filtering and also of --follow. This is not strictly speaking true, since '-- path' only cares about the path itself, '--follow -- path' tracks only "sufficiently close" renames and '-L0,inf path'[0] tracks the lines across files even if it's only small chunks.

But I still think it's a good argument. And then if git-log learns about it, why should this be a special case that only the log family understands, but not rev-list?

And since we can't remove --follow for hysterical raisins, you might as well link the whole "what moved where" tracking logic to a place where it helps fixing --follow.

Or am I totally on the wrong page?
[0] making up syntax for the purposes of the example, please don't
    think of this as normative or even a good idea
-- 
Thomas Rast
trast@{inf,student}.ethz.ch
Previous: Bo YangNext: Jonathan Nieder
Message 4 of 9 in “Multiple line ranges and files in line level history browser”
  1. Bo YangMay 9, 2010
  2. Junio C HamanoMay 9, 2010
  3. Bo YangMay 11, 2010
  4. Thomas RastMay 12, 2010
  5. Jonathan NiederMay 9, 2010
  6. Jonathan NiederMay 10, 2010
  7. Bo YangMay 11, 2010
  8. Bo YangMay 11, 2010
  9. Jonathan NiederMay 11, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.