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

Re: [PATCH v6 0/6] blame: add the ability to ignore commits

From
Michael Platings <michael@platin.gs>
Date
Apr 15, 2019, 21:54 UTC
Message-ID
<CAJDYR9QSAoYkrbdyJBN1tg0v1x6Do9qGf0+6hYL-n49+HSfu8g@mail.gmail.com>
In-Reply-To
<9439c697-246f-3bcb-4d34-85099e577e8b@google.com>
> My main concerns:
> - Can your version reach outside of a diff chunk?

Currently no. It's optimised for reformatting and renaming, both of which preserve ordering. I could look into allowing disordered matches where the similarity is high, while still being biased towards ordered matches. If you can post more examples that would be helpful.

> - Complexity and possibly performance.  The recursive stuff made me
> wonder about it a bit.  It's no reason not to use it, just need to check
> it more closely.

Complexity I can't deny, I can only mitigate it with documentation/comments. I optimised the code pretty heavily and tested on some contrived worst-case scenarios and the performance was still good so I'm not worried about that.

> Is the latest version of your stuff still the one you posted last week
> or so?

Yes. But reaching outside the chunk might lead to a significantly different API in the next version...

> Similarly, do you think the "two pass" approach I have (check the chunk,
> then check the parent file) would work with your recursive partitioning
> style?  That might make yours able to handle the "split diff chunk" case.
Yes, should do. I'll see what I can come up with this week.
> No algorithm will work for all cases.  The one you just gave had the
> simple heuristic working better than a complex one.  We could make it
> more complex, but then another example may be worse.  I can live with
> some inaccuracy in exchange for simplicity.

Exactly, no algorithm will work for all cases. So what I'm suggesting is that it might be best to let the user choose which heuristic is appropriate for a given commit. If they know that the simple heuristic works best then perhaps we should let them choose that rather than only offering a one-size-fits-all option. But if we do want to go for one-size-fits-all then I'm very keen to make sure it at least solves the specific cases that we know about.

Previous: Barret Rhoden
Message 25 of 25 in “blame: add the ability to ignore commits”
  1. 0/6 blame: add the ability to ignore commitsBarret Rhoden, Apr 10, 2019
  2. 1/6 Move init_skiplist() outside of fsckBarret Rhoden, Apr 10, 2019
  3. Ævar Arnfjörð BjarmasonApr 10, 2019
  4. Barret RhodenApr 15, 2019
  5. 2/6 blame: use a helper function in blame_chunk()Barret Rhoden, Apr 10, 2019
  6. 3/6 blame: add the ability to ignore commits and their changesBarret Rhoden, Apr 10, 2019
  7. Ævar Arnfjörð BjarmasonApr 10, 2019
  8. Michael PlatingsApr 14, 2019
  9. Barret RhodenApr 15, 2019
  10. Barret RhodenApr 15, 2019
  11. 4/6 blame: add config options to handle output for ignored linesBarret Rhoden, Apr 10, 2019
  12. Junio C HamanoApr 14, 2019
  13. Michael PlatingsApr 14, 2019
  14. Junio C HamanoApr 14, 2019
  15. Michael PlatingsApr 14, 2019
  16. Barret RhodenApr 15, 2019
  17. 5/6 blame: optionally track line fingerprints during fill_blame_origin()Barret Rhoden, Apr 10, 2019
  18. 6/6 blame: use a fingerprint heuristic to match ignored linesBarret Rhoden, Apr 10, 2019
  19. Junio C HamanoApr 14, 2019
  20. Michael PlatingsApr 14, 2019
  21. Barret RhodenApr 15, 2019
  22. Junio C HamanoApr 16, 2019
  23. Michael PlatingsApr 14, 2019
  24. Barret RhodenApr 15, 2019
  25. Michael PlatingsApr 15, 2019

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.