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

Re: [PATCH 0/5] Rework diff options

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jun 23, 2006, 23:18 UTC
Message-ID
<Pine.LNX.4.63.0606240111590.29667@wbgn013.biozentrum.uni-wuerzburg.de>
In-Reply-To
<20060624014420.2c3df276.tihirvon@gmail.com>
Hi,
On Sat, 24 Jun 2006, Timo Hirvonen wrote:
Show 5 quoted lines
> Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> 
> > Although I understand that to convert all users to the new convention, it 
> > is sensible to rename the constants, I think it is not good to change 
> > something as DIFF_FORMAT_RAW to OUTPUT_FMT_RAW in the resulting patch.

Note that I understand this for the purpose of not forgetting to change things over to "|=" and "&": the compiler will warn you about that now.

But after it compiles, you can change the names back to reduce patch size and to avoid confusing of dumb people like me.

> > IMHO it is an unnecessary change, and accounts for a lot of the diffstat.
> 
> I did it because you can't have many DIFF_FORMAT_* options at the same
> time but OUTPUT_FMT_* can be combined.

But you just renamed them! The name alone does not say "you cannot combine them".

-- snip --
@@ -150,15 +162,6 @@ #define COMMON_DIFF_OPTIONS_HELP \
 "                show all files diff when -S is used and hit is found.\n"
 
 extern int diff_queue_is_empty(void);
-
-#define DIFF_FORMAT_RAW                1
-#define DIFF_FORMAT_PATCH      2
-#define DIFF_FORMAT_NO_OUTPUT  3
-#define DIFF_FORMAT_NAME       4
-#define DIFF_FORMAT_NAME_STATUS        5
-#define DIFF_FORMAT_DIFFSTAT   6
-#define DIFF_FORMAT_CHECKDIFF  7
-
-- snap --

You also sneak in some other things, such as renaming output_format to 
output_fmt in struct diff_options, making a function static, and expanding 
a "(a ? b : c)", without accounting for it in the commit message.

Ciao,
Dscho
Previous: Timo HirvonenNext: Junio C Hamano
Message 4 of 8 in “Rework diff options”
  1. 0/5 Rework diff optionsTimo Hirvonen, Jun 23, 2006
  2. Johannes SchindelinJun 23, 2006
  3. Timo HirvonenJun 23, 2006
  4. Johannes SchindelinJun 23, 2006
  5. Junio C HamanoJun 23, 2006
  6. Johannes SchindelinJun 24, 2006
  7. Junio C HamanoJun 24, 2006
  8. Linus TorvaldsJun 23, 2006

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.