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

Re: [RFC] git blame-tree

From
Piotr Krukowiecki <piotr.krukowiecki@gmail.com>
Date
Mar 2, 2011, 17:51 UTC
Message-ID
<AANLkTim4fKO=Lb0dY0DzRu1QqC8NHPoF8iveYQ2E6OBH@mail.gmail.com>
In-Reply-To
<20110302171653.GA18957@sigill.intra.peff.net>
Hi,
On Wed, Mar 2, 2011 at 6:16 PM, Jeff King <peff@peff.net> wrote:
> I considered making it a special mode of "git blame" when blame is fed a
> directory instead of a file. But the implementations aren't shared at
> all (nor do I think they need to be; blame-tree is _way_ simpler). And I
git blame dir/file.c
  "Show what revision and author last modified each line of a file"
git blame dir/
  "Show what revision and author last modified each file"

This makes sense to me (the user). I don't understand the implementation thing. I don't see a difference between those two commands. Even more, if I'm educated Unix user I might know directories are also files.

Show 5 quoted lines
> didn't want to steal that concept in case somebody can think of a more
> content-level way of blaming a whole tree that makes sense (obviously
> just showing the concatenation of the blames of each file is one way,
> but I don't know how useful that would be). If we want to go that way,
> we can always catch the special case in blame and just exec blame-tree.
Still can be in git-blame command, no?
Show 6 quoted lines
> The initial set of interesting files we come up with is gotten by
> looking at the tree of the first pending object after parsing the rev
> options (defaulting to HEAD). Which sounds a little flaky to me, but
> does what you want in practice. I'd be curious if somebody can come up
> with a counterexample where the ability to manually specify the source
> tree would be more useful.

Same argument as for normal blame: I want to know who modified files at the state of commit X (if I understand the question correctly).

-- 
Piotrek
Previous: Jeff KingNext: Jeff King
Message 3 of 17 in “[RFC] git blame-tree”
  1. Jeff KingMar 2, 2011
  2. Jeff KingMar 2, 2011
  3. Piotr KrukowieckiMar 2, 2011
  4. Jeff KingMar 2, 2011
  5. Piotr KrukowieckiMar 2, 2011
  6. Jeff KingMar 2, 2011
  7. Piotr KrukowieckiMar 2, 2011
  8. Jeff KingMar 2, 2011
  9. Junio C HamanoMar 2, 2011
  10. Jeff KingMar 2, 2011
  11. Junio C HamanoMar 2, 2011
  12. Jeff KingMar 3, 2011
  13. Ryan TomaykoMar 5, 2011
  14. Jakub NarebskiMar 3, 2011
  15. Jeff KingMar 2, 2011
  16. Will PalmerMar 4, 2011
  17. Jeff KingMar 4, 2011

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.