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

Re: [RFC] git blame-tree

From
Jeff King <peff@peff.net>
Date
Mar 2, 2011, 21:10 UTC
Message-ID
<20110302211035.GC20400@sigill.intra.peff.net>
In-Reply-To
<AANLkTi=m_WTohMfJZxTqObRT3rhhtxo=QfnDJCHO=U0K@mail.gmail.com>
On Wed, Mar 02, 2011 at 07:39:20PM +0100, Piotr Krukowiecki wrote:
Show 10 quoted lines
> I'd expect this to be something like union. Currently I can only think about
> following case:
> 
> Some files were changed in branch1, some in branch2, some in both.
> Show me how the files are changed. For example:
>   file1 changed in branch1 in commit1
>   file2 changed in branch2 in commit2
>   file3 changed in branch1 in commit3 and in branch2 in commit4
> 
> If file was not changed since branch creation then don't show it (optionally).

I think we are getting into something different here, because you are caring not just about the commit in some traversal that touched a file, but for each source, which commits got us there and potentially multiple such commits, one per source for each file.

And that's a bit more expensive to compute, and the answers are not always unambiguous. For example, let's say branch1 and branch2 fork from some merge-base M. In the parent of M, file "foo" was changed. We traverse from branch1 and branch2, not seeing anything interesting for "foo". We hit M, and then finally see that its parent touched "foo".

What do we output? Both branches have equal claim to the commit.

I think you could figure out semantics that make sense if you spent enough time on it. But I also think it is making the relatively simple problem of blame-tree a lot more complex.

-Peff
Previous: Piotr KrukowieckiNext: Piotr Krukowiecki
Message 6 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.