# RFC: Change whatchanged to report changes from merges by default?

4 messages from 2008-12-20 to 2008-12-20. Participants: Mark Burton, Junio C Hamano.
Thread: https://gitlist.dev/t/16805

## Mark Burton, 2008-12-20 10:42

Subject: RFC: Change whatchanged to report changes from merges by default?
Message-ID: <20081220104232.5ff1b7c0@crow>
URL: https://gitlist.dev/e/20081220104232.5ff1b7c0%40crow

```

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

```

## Mark Burton, 2008-12-20 17:22

Subject: Re: RFC: Change whatchanged to report changes from merges by default?
Message-ID: <20081220172252.6469d9b7@crow>
URL: https://gitlist.dev/e/20081220172252.6469d9b7%40crow
In-Reply-To: <20081220104232.5ff1b7c0@crow>

```

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

```

## Junio C Hamano, 2008-12-20 20:09

Subject: Re: RFC: Change whatchanged to report changes from merges by default?
Message-ID: <7vvdtewqvy.fsf@gitster.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vvdtewqvy.fsf%40gitster.siamese.dyndns.org
In-Reply-To: <20081220104232.5ff1b7c0@crow>

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

```

## Mark Burton, 2008-12-20 20:21

Subject: Re: RFC: Change whatchanged to report changes from merges by default?
Message-ID: <20081220202109.336d0a5e@crow>
URL: https://gitlist.dev/e/20081220202109.336d0a5e%40crow
In-Reply-To: <7vvdtewqvy.fsf@gitster.siamese.dyndns.org>

```

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

```
