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

Re: Segfault in git when using git logs

From
Elijah Newren <newren@gmail.com>
Date
Nov 3, 2020, 16:10 UTC
Message-ID
<CABPp-BGdCOWCEMjXtJChW1oip2Ro1JhNr=pECcbhV8XWM2QBBw@mail.gmail.com>
In-Reply-To
<CAP8UFD3SMCBdE8TOP7OKabYyOW4344nNAa=G2hCzxWnN-XjQrA@mail.gmail.com>

On Tue, Nov 3, 2020 at 3:21 AM Christian Couder <christian.couder@gmail.com> wrote:

Show 32 quoted lines
>
> On Tue, Nov 3, 2020 at 11:19 AM SZEDER Gábor <szeder.dev@gmail.com> wrote:
> >
> > On Mon, Nov 02, 2020 at 09:43:21AM -0500, Jeff King wrote:
>
> > > but I'm not clear on how "--follow" and "-L" are supposed to interact.
> >
> > They shouldn't, I would say.  Though it would be great if their
> > rename-following logic would be unified.  In particular, line-level
> > log does a better job at rename following in some ways, notably it can
> > track multiple files at once, while '--follow' can only handle a
> > single file.  So I think the rename following logic should be
> > extracted from 'line-log.c' and made more generic, and it should be
> > used to implement '--follow', removing some restrictions of the
> > latter, not to mention removing the duplicated logic.
> >
> > (This might be a good GSoC project, though some of Linus' remarks in
> > 750f7b668f (Finally implement "git log --follow", 2007-06-19) like
> > "you did have to know and understand the internal git diff generation
> > machinery pretty well, and had to really be able to follow how commit
> > generation interacts with generating patches and generating the log"
> > and "this patch does seem to be firmly in the core "Linus or Junio"
> > territory" are worrying...)
>
> Thanks for the suggestion!
>
> For the Outreachy round starting next December, we have proposed a
> project to accelerate rename detection and range-diff based on:
>
> https://github.com/gitgitgadget/git/issues/519
>
> I am not sure how much it is related to this though.

As worded, the project is only tangentially related. If someone were to plumb better rename following through, then this Outreachy project might make the underlying internals faster, but that's it. However, it's a certainly an interesting related project.

Also, I'll note that there is some code coming with merge-ort that should help write an improved --follow implementation, and, in fact, was specially added with that goal in mind. merge-ort adds to diffcore-rename.c the ability to limit rename detection to either relevant_sources (e.g. only consider removed filenames matching these paths for rename detection) or relevant_targets (e.g. only include added files matching these paths for rename detection), or both. The relevant_targets was not useful within the merge-ort implementation, but since I was adding relevant_sources it seemed like a natural pairing; I added it for completeness and was specifically thinking how it would be useful for log --follow when I did so. (I also think the strmap API will also make it a bit easier to implement an improved --follow.) One of my goals was to use the relevant_targets ability as part of an improved log --follow implementation after getting the rest of the merge-ort stuff done, but it might be a useful intern project instead.

Previous: Christian CouderNext: Jeff King
Message 6 of 23 in “Segfault in git when using git logs”
  1. Sathyajith BhatNov 2, 2020
  2. Jeff KingNov 2, 2020
  3. Junio C HamanoNov 2, 2020
  4. SZEDER GáborNov 3, 2020
  5. Christian CouderNov 3, 2020
  6. Elijah NewrenNov 3, 2020
  7. Jeff KingNov 3, 2020
  8. Junio C HamanoNov 3, 2020
  9. Jeff KingNov 3, 2020
  10. Junio C HamanoNov 3, 2020
  11. Jeff KingNov 4, 2020
  12. Junio C HamanoNov 4, 2020
  13. Re*: Segfault in git when using git logsJunio C Hamano, Nov 4, 2020
  14. Jeff KingNov 4, 2020
  15. Junio C HamanoNov 4, 2020
  16. log: diagnose -L used with pathspec as an errorJunio C Hamano, Nov 4, 2020
  17. Jeff KingNov 4, 2020
  18. Derrick StoleeNov 3, 2020
  19. Sathyajith BhatNov 3, 2020
  20. Jeff KingNov 3, 2020
  21. Derrick StoleeNov 3, 2020
  22. Derrick StoleeNov 3, 2020
  23. Sathyajith BhatNov 4, 2020

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.