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

Re: [PATCH v1 1/3] Introduce config variable "diff.primer"

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jan 25, 2009, 19:30 UTC
Message-ID
<alpine.DEB.1.00.0901252016590.14855@racer>
In-Reply-To
<alpine.GSO.2.00.0901251033160.12651@kiwi.cs.ucla.edu>
Hi,
On Sun, 25 Jan 2009, Keith Cascio wrote:
Show 8 quoted lines
> On Sun, 25 Jan 2009, Johannes Schindelin wrote:
> 
> > That would break existing scripts using "git diff" rather badly.  We 
> > already did not allow something like "git config alias.diff ..." from 
> > changing the behavior of "git diff", so I cannot find a reason why we 
> > should let diff.primer (a misnomer BTW) override the behavior.
> 
> I took special care to protect all core scripts from the effects.

What about my scripts I have here locally? Do you want to change them, too?

Show 5 quoted lines
> I fact, by introducing the cpp macro DIFF_MACHINE_FRIENDLY() and the 
> command-line options "--machine-friendly" and "--no-primer", I made such 
> protection declarative.  Don't you find it preferable that existing 
> programs and scripts would explicitly declare their desire for 
> machine-friendly output?

No. We made a promise long time ago that plumbing (and "git diff" is pretty much plumbing, except for the configurable colorness) would not change behind scripts' backs.

And since Shawn uses plumbing for that very reason, your diff.primer patch would not be allowed to make a difference. Ever.

Now, if you would have changed only the UI diff things (i.e. git diff, but not git diff-files), I could have accepted the diff.primer patch for different applications than "git gui", but from cursory reading of your patch it does not appear so.

Speaking of appearance (or for that matter, explaining why it was only a cursory reading): did it not occur to you that your coding style is utterly different from the surrounding code?

Just to number a few things that would definitely prohibit this patch from being applied:

- space instead of tabs,
- horrible lengths of spaces within the line,
- no space after if, but after the parenthesis.

Now, this could be good explanation why you need the patch (to ignore white-space), but that is not a reason of letting us suffer, too.

Besides, it seems you did a lot of "fixes" on the side that I do not like at all. Simple example: if the original code cleared the DIRSTAT_CUMULATIVE flag, it is not acceptable for you to introduce an unnecessary if(), testing if the CUMULATIVE flag was set to begin with.

Ciao, Dscho

Previous: Keith CascioNext: Keith Cascio
Message 9 of 41 in “Introduce config variable "diff.primer"”
  1. 0/3 Introduce config variable "diff.primer"Keith Cascio, Jan 25, 2009
  2. 1/3 Introduce config variable "diff.primer"Keith Cascio, Jan 25, 2009
  3. 2/3 Test functionality of new config variable "diff.primer"Keith Cascio, Jan 25, 2009
  4. 3/3 git-gui hooks for new config variable "diff.primer"Keith Cascio, Jan 25, 2009
  5. Johannes SchindelinJan 25, 2009
  6. Keith CascioJan 25, 2009
  7. Johannes SchindelinJan 25, 2009
  8. Keith CascioJan 25, 2009
  9. Johannes SchindelinJan 25, 2009
  10. Keith CascioJan 25, 2009
  11. Jeff KingJan 25, 2009
  12. Keith CascioJan 25, 2009
  13. Jeff KingJan 25, 2009
  14. Junio C HamanoJan 25, 2009
  15. Junio C HamanoJan 26, 2009
  16. Keith CascioJan 26, 2009
  17. Jeff KingJan 26, 2009
  18. Junio C HamanoJan 26, 2009
  19. Keith CascioJan 26, 2009
  20. Jeff KingJan 26, 2009
  21. Junio C HamanoJan 26, 2009
  22. Jeff KingJan 26, 2009
  23. Johannes SchindelinJan 26, 2009
  24. Jeff KingJan 26, 2009
  25. backwards compatibility, was Re: [PATCH v1 1/3] Introduce config variable "diff.primer"Johannes Schindelin, Jan 26, 2009
  26. Jeff KingJan 26, 2009
  27. Johannes SchindelinJan 26, 2009
  28. Jeff KingJan 26, 2009
  29. Keith CascioJan 27, 2009
  30. Jay SoffianJan 26, 2009
  31. Jeff KingJan 26, 2009
  32. Jay SoffianJan 26, 2009
  33. Junio C HamanoJan 26, 2009
  34. Jay SoffianJan 26, 2009
  35. Jeff KingJan 26, 2009
  36. Junio C HamanoJan 26, 2009
  37. Junio C HamanoJan 25, 2009
  38. Keith CascioJan 25, 2009
  39. Jeff KingJan 25, 2009
  40. Keith CascioJan 27, 2009
  41. Jeff KingJan 27, 2009

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.