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

Re: [PATCH] Documentation/git-blame.txt: --follow is a NO-OP

From
Kevin Ballard <kevin@sb.org>
Date
Sep 19, 2012, 20:31 UTC
Message-ID
<C07F05AC-8FBF-4F09-AF13-A291181A06D9@sb.org>
In-Reply-To
<20120919194213.GB21950@sigill.intra.peff.net>
On Sep 19, 2012, at 12:42 PM, Jeff King <peff@peff.net> wrote:
Show 19 quoted lines
>> So I am in general OK with it, but if we are to go that route, we
>> should make sure that the documentation makes it clear that blame
>> follows whole-file renames without any special instruction before
>> doing so.  Otherwise, it again will send the same wrong message to
>> people who try to use the "--follow" from their experience with
>> "log", no?
> 
> I guess it depends on your perspective. I can see the argument that
> blame is already doing what --follow would ask for, and thus it is a
> no-op. I think of it more as --follow is nonsensical for blame. But I
> do not think either is wrong per se, and there is no reason not to help
> people who come to git thinking the former. So yes, I think
> documentation in either case is probably a good thing.
> 
> I am a little lukewarm on my patch if only because of the precedent it
> sets.  There are a trillion options that revision.c parses that are not
> necessarily meaningful or implemented for sub-commands that piggy-back
> on its option parser. I'm not sure we want to get into manually
> detecting and disallowing each one in every caller.

I tend to agree with your final sentiment there. But the point that users may not realize that blame already follows is also valid. Perhaps we should catch --follow, as in your patch, but instead of saying that it's an unknown argument, just print out a helpful message saying blame already follows renames (and then continue with the blame anyway, so as to not set a precedent to abort on unknown-but-currently-accepted flags).

-Kevin
Previous: Jeff KingNext: Jeff King
Message 10 of 15 in “git blame --follow”
  1. norbert.nemecSep 6, 2012
  2. Jeff KingSep 6, 2012
  3. norbert.nemecSep 6, 2012
  4. Jeff KingSep 6, 2012
  5. Documentation/git-blame.txt: --follow is a NO-OPDrew Northup, Sep 19, 2012
  6. Junio C HamanoSep 19, 2012
  7. Jeff KingSep 19, 2012
  8. Junio C HamanoSep 19, 2012
  9. Jeff KingSep 19, 2012
  10. Kevin BallardSep 19, 2012
  11. Jeff KingSep 19, 2012
  12. Kevin BallardSep 19, 2012
  13. Re* [PATCH] Documentation/git-blame.txt: --follow is a NO-OPJunio C Hamano, Sep 21, 2012
  14. Junio C HamanoSep 21, 2012
  15. Junio C HamanoSep 20, 2012

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.