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

Re: [PATCH v2 2/2] blame: allow blame --reverse --first-parent when it makes sense

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 25, 2015, 16:52 UTC
Message-ID
<xmqqk2qalwka.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20151025124338.GA27615@wheezy.local>
Max Kirillov <max@max630.net> writes:
> This additionally forbids having several end commits
> (git blame --reverse --first-parent ^A B C ...), but
> this does not seem to have much practical use.

Even if there were practical uses for a request with multiple end points, a solution that

 (1) guarantees that "blame --reverse --first-parent" is the only
     thing that is affected; and
 (2) errors out if "blame --reverse --first-parent" cannot give a
     sensible answer.

is a strict improvement over "we don't know how to produce a sensible answer in all cases, so we just forbid". Somebody who needs multiple end points badly can build on top with the same principle, just widening the definition of what is "a sensible answer" in the criteria (2) above. Until then, defining the sensible answer to be "an answer that consists of commits on the first parent chain (but in reverse)" is perfectly fine [*1*].

As you added your patch after "-- <EOL>", my MUA refuses to quote it in this response, but that's OK, as this message is not about the patch itself ;-)

[Footnote]
*1* I haven't read the patch text to see if that is what the updated
    code is computing, though.  That's for a weekday ;-).
Previous: Max Kirillov
Message 11 of 11 in “blame: allow blame --reverse --first-parent when it makes sense”
  1. 0/2 blame: allow blame --reverse --first-parent when it makes senseMax Kirillov, Oct 22, 2015
  2. 1/2 Add test to describe expectation of blame --reverse with branched historyMax Kirillov, Oct 22, 2015
  3. Junio C HamanoOct 22, 2015
  4. Max KirillovOct 22, 2015
  5. Max KirillovOct 22, 2015
  6. 2/2 blame: allow blame --reverse --first-parent when it makes senseMax Kirillov, Oct 22, 2015
  7. Junio C HamanoOct 22, 2015
  8. Max KirillovOct 22, 2015
  9. Junio C HamanoOct 22, 2015
  10. Max KirillovOct 25, 2015
  11. Junio C HamanoOct 25, 2015

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.