* [PATCH 0/5] Rework diff options
@ 2006-06-23 22:15 Timo Hirvonen
2006-06-23 22:28 ` Johannes Schindelin
2006-06-23 23:16 ` Linus Torvalds
0 siblings, 2 replies; 8+ messages in thread
From: Timo Hirvonen @ 2006-06-23 22:15 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
This patch series cleans up diff output format options.
This makes it possible to use any combination of --raw, -p, --stat and
--summary options and they work as you would expect.
These patches passed all tests but patch 2/5 is quite intrusive...
b/builtin-diff-files.c | 10 +-
b/builtin-diff-index.c | 4
b/builtin-diff-stages.c | 3
b/builtin-diff-tree.c | 3
b/builtin-diff.c | 74 ++++++-----------
b/builtin-log.c | 12 +-
b/combine-diff.c | 45 +++-------
b/diff.c | 207 +++++++++++++++++++++++-------------------------
b/diff.h | 29 +++---
b/git-merge.sh | 3
b/log-tree.c | 15 ++-
b/revision.c | 5 -
12 files changed, 196 insertions(+), 214 deletions(-)
--
http://onion.dynserv.net/~timo/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/5] Rework diff options
2006-06-23 22:15 [PATCH 0/5] Rework diff options Timo Hirvonen
@ 2006-06-23 22:28 ` Johannes Schindelin
2006-06-23 22:44 ` Timo Hirvonen
2006-06-23 23:28 ` Junio C Hamano
2006-06-23 23:16 ` Linus Torvalds
1 sibling, 2 replies; 8+ messages in thread
From: Johannes Schindelin @ 2006-06-23 22:28 UTC (permalink / raw)
To: Timo Hirvonen; +Cc: Junio C Hamano, git
Hi,
On Sat, 24 Jun 2006, Timo Hirvonen wrote:
> This patch series cleans up diff output format options.
Very good.
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.
IMHO it is an unnecessary change, and accounts for a lot of the diffstat.
Ciao,
Dscho
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/5] Rework diff options
2006-06-23 22:28 ` Johannes Schindelin
@ 2006-06-23 22:44 ` Timo Hirvonen
2006-06-23 23:18 ` Johannes Schindelin
2006-06-23 23:28 ` Junio C Hamano
1 sibling, 1 reply; 8+ messages in thread
From: Timo Hirvonen @ 2006-06-23 22:44 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: junkio, git
Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> Hi,
>
> On Sat, 24 Jun 2006, Timo Hirvonen wrote:
>
> > This patch series cleans up diff output format options.
>
> Very good.
>
> 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.
>
> 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.
--
http://onion.dynserv.net/~timo/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/5] Rework diff options
2006-06-23 22:15 [PATCH 0/5] Rework diff options Timo Hirvonen
2006-06-23 22:28 ` Johannes Schindelin
@ 2006-06-23 23:16 ` Linus Torvalds
1 sibling, 0 replies; 8+ messages in thread
From: Linus Torvalds @ 2006-06-23 23:16 UTC (permalink / raw)
To: Timo Hirvonen; +Cc: Junio C Hamano, git
On Sat, 24 Jun 2006, Timo Hirvonen wrote:
>
> This patch series cleans up diff output format options.
>
> This makes it possible to use any combination of --raw, -p, --stat and
> --summary options and they work as you would expect.
Looks good to me. I'll be very happy never having to remember the option
(or type) --patch-with-stat ever again. Doing just "-p --stat" is just
_so_ much better.
Linus
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/5] Rework diff options
2006-06-23 22:44 ` Timo Hirvonen
@ 2006-06-23 23:18 ` Johannes Schindelin
0 siblings, 0 replies; 8+ messages in thread
From: Johannes Schindelin @ 2006-06-23 23:18 UTC (permalink / raw)
To: Timo Hirvonen; +Cc: junkio, git
Hi,
On Sat, 24 Jun 2006, Timo Hirvonen wrote:
> 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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/5] Rework diff options
2006-06-23 22:28 ` Johannes Schindelin
2006-06-23 22:44 ` Timo Hirvonen
@ 2006-06-23 23:28 ` Junio C Hamano
2006-06-24 0:04 ` Johannes Schindelin
1 sibling, 1 reply; 8+ messages in thread
From: Junio C Hamano @ 2006-06-23 23:28 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: Timo Hirvonen, git
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> Hi,
>
> On Sat, 24 Jun 2006, Timo Hirvonen wrote:
>
>> This patch series cleans up diff output format options.
>
> Very good.
>
> 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.
I personally feel that the benefit of being able to make sure
you covered everything outweighs the size of initial diff.
Thanks Timo. Will take a look.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/5] Rework diff options
2006-06-23 23:28 ` Junio C Hamano
@ 2006-06-24 0:04 ` Johannes Schindelin
2006-06-24 2:51 ` Junio C Hamano
0 siblings, 1 reply; 8+ messages in thread
From: Johannes Schindelin @ 2006-06-24 0:04 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Timo Hirvonen, git
Hi,
On Fri, 23 Jun 2006, Junio C Hamano wrote:
> I personally feel that the benefit of being able to make sure you
> covered everything outweighs the size of initial diff.
IMHO the difficulty of finding bugs is proportional to the square of the
diff size, while the number of people willing to review it is proportional
to its square root. So, if it is not difficult (which it is not at all in
this case), I politely ask to cut the patch size down.
Ciao,
Dscho
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/5] Rework diff options
2006-06-24 0:04 ` Johannes Schindelin
@ 2006-06-24 2:51 ` Junio C Hamano
0 siblings, 0 replies; 8+ messages in thread
From: Junio C Hamano @ 2006-06-24 2:51 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: Timo Hirvonen, git
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> On Fri, 23 Jun 2006, Junio C Hamano wrote:
>
>> I personally feel that the benefit of being able to make sure you
>> covered everything outweighs the size of initial diff.
>
> IMHO the difficulty of finding bugs is proportional to the square of the
> diff size, while the number of people willing to review it is proportional
> to its square root. So, if it is not difficult (which it is not at all in
> this case), I politely ask to cut the patch size down.
Yeah, your "renaming in private while you are making sure but
rename them back" suggestion actually would work in this case.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2006-06-24 2:51 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-23 22:15 [PATCH 0/5] Rework diff options Timo Hirvonen
2006-06-23 22:28 ` Johannes Schindelin
2006-06-23 22:44 ` Timo Hirvonen
2006-06-23 23:18 ` Johannes Schindelin
2006-06-23 23:28 ` Junio C Hamano
2006-06-24 0:04 ` Johannes Schindelin
2006-06-24 2:51 ` Junio C Hamano
2006-06-23 23:16 ` Linus Torvalds
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).