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

Re: [PATCH v2] stash: setup default diff output format if necessary

From
Jeff King <peff@peff.net>
Date
Mar 22, 2019, 03:48 UTC
Message-ID
<20190322034837.GA20091@sigill.intra.peff.net>
In-Reply-To
<xmqqtvfvr3oi.fsf@gitster-ct.c.googlers.com>
On Fri, Mar 22, 2019 at 12:25:17PM +0900, Junio C Hamano wrote:
Show 10 quoted lines
> > There is a "set_default" callback that was added by 6c374008b1
> > (diff_opt: track whether flags have been set explicitly, 2013-05-10),
> > but it looks like it was never actually used. I think the theory is that
> > cases like this could do their tweaking in such a callback. But I think
> > it makes sense to follow the lead of builtin/diff.c for the immediate
> > fix, and we can look at using set_default as a separate topic.
> 
> I agree with the conclusion.  I wouldn't be surprised if this is one
> of the things that was once used but left behind when the last
> caller disappeared, though.

I wondered, too, but `git log --pickaxe-regex -S'set_default[^_]'` seems to think it was purely aspirational. :)

That calls for a little extra caution when starting to use it (because it has not really been tested), but from a quick look I cannot see how it would go wrong.

-Peff
Previous: Junio C Hamano
Message 15 of 15 in “[REGRESSION ps/stash-in-c] git stash show -v”
  1. Denton LiuMar 19, 2019
  2. Thomas GummererMar 19, 2019
  3. Junio C HamanoMar 20, 2019
  4. Thomas GummererMar 20, 2019
  5. Junio C HamanoMar 20, 2019
  6. Jeff KingMar 20, 2019
  7. Duy NguyenMar 20, 2019
  8. Thomas GummererMar 20, 2019
  9. stash: setup default diff output format if necessaryThomas Gummerer, Mar 20, 2019
  10. Denton LiuMar 20, 2019
  11. Denton LiuMar 20, 2019
  12. Thomas GummererMar 28, 2019
  13. Jeff KingMar 21, 2019
  14. Junio C HamanoMar 22, 2019
  15. Jeff KingMar 22, 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.