git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RFC: Change whatchanged to report changes from merges by default?
@ 2008-12-20 10:42 Mark Burton
  2008-12-20 17:22 ` Mark Burton
  2008-12-20 20:09 ` Junio C Hamano
  0 siblings, 2 replies; 4+ messages in thread
From: Mark Burton @ 2008-12-20 10:42 UTC (permalink / raw)
  To: git


Hi,

Is it just an accident of history or by design that whatchanged
requires the -m option to show changes introduced by merges but
diff and git log show those changes without requiring any extra
options?

Would it not make more sense to have git whatchanged show the changes
introduced by merges by default and then people can use the (already
supported) --no-merges option to suppress that behaviour?

It appears that just setting rev.ignore_merges to 0 in cmd_whatchanged()
would do the trick. Shall I submit a patch?

Mark

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: RFC: Change whatchanged to report changes from merges by default?
  2008-12-20 10:42 RFC: Change whatchanged to report changes from merges by default? Mark Burton
@ 2008-12-20 17:22 ` Mark Burton
  2008-12-20 20:09 ` Junio C Hamano
  1 sibling, 0 replies; 4+ messages in thread
From: Mark Burton @ 2008-12-20 17:22 UTC (permalink / raw)
  To: git


Hi,

On further studying, I see that 1aec7917dc (git log: don't do merge
diffs by default) makes git log only show the log message by default
for merges. OK, no problem with that. 

However, in my mind, whatchanged is misleading when it doesn't output
anything (by default) for merges because, in my mind, that implies that
nothing has changed when, in fact, whole heaps of stuff could have been
merged in. So, if you forget to add the -m option, whatchanged will silently
ignore all the merged stuff and leave the poor user in the dark.

So, if changing the default behaviour is acceptable, I still think it would
be better if ignore_merges is set to 0 in cmd_whatchanged() but I guess an
alternative would be to set always_show_header, instead.

Any thoughts?

Cheers,

Mark

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: RFC: Change whatchanged to report changes from merges by default?
  2008-12-20 10:42 RFC: Change whatchanged to report changes from merges by default? Mark Burton
  2008-12-20 17:22 ` Mark Burton
@ 2008-12-20 20:09 ` Junio C Hamano
  2008-12-20 20:21   ` Mark Burton
  1 sibling, 1 reply; 4+ messages in thread
From: Junio C Hamano @ 2008-12-20 20:09 UTC (permalink / raw)
  To: Mark Burton; +Cc: git

Mark Burton <markb@ordern.com> writes:

> Is it just an accident of history or by design that whatchanged
> requires the -m option to show changes introduced by merges but
> diff and git log show those changes without requiring any extra
> options?

Mostly personal preference and inertia..

I personally do not see any reason for anybody to use whatchanged (what a
long single-word to type!) since around git version v1.0.0 or so.  Back
then, whatchanged was a good way to satisfy "I want a quick sanity check,
but I want to see a bit more than just names of files to assure me.  But I
want to get that without actually running the diffs or stats because I
consider that anything that takes more than half a second is too
expensive."  But ever since we made the diff generation built-in, the
performance objection ceased to be an issue.  These days I'd imagine that
"log --name-only" or even "log --stat" would be perfectly acceptable and
easier to explain alternative, especially if you happen to be a very early
adopter whose fingers are trained to type "whatchanged".

IOW, I consider "whatchanged" a command that is kept only for old timers'
sake.  There is no reason to promote it, but there is no reason to
deprecate it, either.  Which means the answer to this question...

> Would it not make more sense to have git whatchanged show the changes
> introduced by merges by default and then people can use the (already
> supported) --no-merges option to suppress that behaviour?

... is a NO spelled in capital letters.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: RFC: Change whatchanged to report changes from merges by default?
  2008-12-20 20:09 ` Junio C Hamano
@ 2008-12-20 20:21   ` Mark Burton
  0 siblings, 0 replies; 4+ messages in thread
From: Mark Burton @ 2008-12-20 20:21 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git


On Sat, 20 Dec 2008 12:09:05 -0800
Junio C Hamano <gitster@pobox.com> wrote:

> IOW, I consider "whatchanged" a command that is kept only for old timers'
> sake.  There is no reason to promote it, but there is no reason to
> deprecate it, either.  Which means the answer to this question...
> 
> > Would it not make more sense to have git whatchanged show the changes
> > introduced by merges by default and then people can use the (already
> > supported) --no-merges option to suppress that behaviour?  
> 
> ... is a NO spelled in capital letters.

OK (spelled in capital letters), I won't submit the patch.

Cheers,

Mark

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-12-20 20:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-20 10:42 RFC: Change whatchanged to report changes from merges by default? Mark Burton
2008-12-20 17:22 ` Mark Burton
2008-12-20 20:09 ` Junio C Hamano
2008-12-20 20:21   ` Mark Burton

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).