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

Re: [PATCHv3] refs.c: enable large transactions

From
Jeff King <peff@peff.net>
Date
Apr 24, 2015, 17:19 UTC
Message-ID
<20150424171953.GA30592@peff.net>
In-Reply-To
<CAGZ79kYGDOUgzKmQOLAXkYYb-HZJCw3Y=iSLXWHVXcQ0pAiDBw@mail.gmail.com>
On Fri, Apr 24, 2015 at 09:16:28AM -0700, Stefan Beller wrote:
Show 10 quoted lines
> I think it's a mistake to s/Could/could/g for all errors in the code base
> as it reduces the information provided in the error messages.
> Just 3 days ago ("Regular Rebase Failure"). I used different
> capitalization to get a better understanding where the error may be.
> 
> So if we throw away that information, we should add new information
> to make the spot of the error easily findable in the source.
> That's why I proposed the idea of the version,filename,linenumber
> as that is one of the strongest signals (most information in a short
> amount of text) I can imagine.

I do like that idea, and I think you could base it on the trace_printf implementation. Note that it requires variadic macros, but I think that's OK. Just like trace_printf, we can do the macro implementation when we support that feature, and people on older systems just won't get the extra file/line data.

I also assume we would not show this information by default, but only with GIT_TRACE_ERRORS or something like that.

I would love it if we could also get a stack trace for warnings and errors. Very often the line number of the error() call is not nearly as interesting as the line number of the _caller_. But doing that portably is rather hard. Maybe a better option would be to make it easier to convince git to dump core at the right moments (e.g., dump core when we hit die() rather than calling exit). And then you can run gdb on the core file, which gives you a backtrace and much more.

-Peff
Previous: Stefan BellerNext: Jonathan Nieder
Message 6 of 12 in “[PATCHv3] refs.c: enable large transactions”
  1. Stefan BellerApr 22, 2015
  2. Junio C HamanoApr 23, 2015
  3. Stefan BellerApr 24, 2015
  4. Junio C HamanoApr 24, 2015
  5. Stefan BellerApr 24, 2015
  6. Jeff KingApr 24, 2015
  7. Jonathan NiederApr 24, 2015
  8. Stefan BellerApr 24, 2015
  9. Jeff KingApr 24, 2015
  10. Junio C HamanoApr 25, 2015
  11. Jeff KingApr 25, 2015
  12. Jeff KingApr 25, 2015

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.