Git development
 help / color / mirror / Atom feed
* Usage of git whatchanged
@ 2025-09-14 12:48 Bjoern Bastian
  2025-09-14 13:10 ` Kristoffer Haugsbakk
  0 siblings, 1 reply; 4+ messages in thread
From: Bjoern Bastian @ 2025-09-14 12:48 UTC (permalink / raw)
  To: git

Hello,

I still use 'git whatchanged' that has been available for a long time
and though being longer than 'git log --raw' is much quicker to type,
as 'git wh' is already sufficient for syntax completion. Obviously,
for this reason I won't use it with the '--i-still-use-this' option.

Best regards,
Björn Bastian

-- 
Physicist
Wilhelm Ostwald Institute for Physical Chemistry, Leizig, Germany

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

* Re: Usage of git whatchanged
  2025-09-14 12:48 Usage of git whatchanged Bjoern Bastian
@ 2025-09-14 13:10 ` Kristoffer Haugsbakk
       [not found]   ` <aMbIqD4c5JY60fK1@eismeer>
  0 siblings, 1 reply; 4+ messages in thread
From: Kristoffer Haugsbakk @ 2025-09-14 13:10 UTC (permalink / raw)
  To: Bjoern Bastian, git

Hi

On Sun, Sep 14, 2025, at 14:48, Bjoern Bastian wrote:
> I still use 'git whatchanged' that has been available for a long time
> and though being longer than 'git log --raw' is much quicker to type,
> as 'git wh' is already sufficient for syntax completion. Obviously,
> for this reason I won't use it with the '--i-still-use-this' option.

`git log --raw --no-merged` is the closest equivalent.

What if you made a `wh` alias?

    wh = log --raw --no-merged

-- 
Kristoffer Haugsbakk

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

* Re: Usage of git whatchanged
       [not found]   ` <aMbIqD4c5JY60fK1@eismeer>
@ 2025-09-14 17:58     ` Kristoffer Haugsbakk
       [not found]       ` <aMcYrG3XBZc9Yu_L@eismeer>
  0 siblings, 1 reply; 4+ messages in thread
From: Kristoffer Haugsbakk @ 2025-09-14 17:58 UTC (permalink / raw)
  To: Bjoern Bastian; +Cc: git

On Sun, Sep 14, 2025, at 15:52, Bjoern Bastian wrote:
> Hi Kristoffer,
>
> I simply followed the invitation printed upon `git whatchanged` to
> join in giving feedback from those who frequently use the command.
>
> I did not expect a thoughtful reply, so thank you very much for it!
>
>> `git log --raw --no-merged` is the closest equivalent.
>
> Thanks for pointing this out, true (actually `--no-merges`).

Yep.

>
>> What if you made a `wh` alias?
>>
>>     wh = log --raw --no-merges
>
> Sure an alias will be the next obvious workaround. With bash I need to
> include `git ` though and just type `wh` on the command line which is
> okay. To get `git wh` I could maybe modify the bash completion.

You can also make a Git alias.

    git config set --global alias.wh 'log --raw --no-merges'

> One can live without, but the statement "whatchanged is not even shorter
> to type than log --raw." on https://git-scm.com/docs/git-whatchanged is
> a weak one

I have a proposal to remove it.

> that misses obvious use cases of `whatchanged`.

The thing with git-whatchanged is that it uses the same underlying
machinery as git-log.  So there’s nothing that git-whatchanged can do
that git-log cannot do.

... and I guess vice versa.  But historically git-log ended up as the
new-and-better replacement (according to the devs) with git-whatchanged
being kept around for people who was used to typing it.

-- 
Kristoffer Haugsbakk

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

* Re: Usage of git whatchanged
       [not found]       ` <aMcYrG3XBZc9Yu_L@eismeer>
@ 2025-09-14 19:44         ` Kristoffer Haugsbakk
  0 siblings, 0 replies; 4+ messages in thread
From: Kristoffer Haugsbakk @ 2025-09-14 19:44 UTC (permalink / raw)
  To: Bjoern Bastian; +Cc: git

On Sun, Sep 14, 2025, at 21:34, Bjoern Bastian wrote:
> Hi Kristoffer,
>
>> You can also make a Git alias.
>>
>>     git config set --global alias.wh 'log --raw --no-merges'
>
> neat, thank you, I never noticed the Git aliases.  I'll do that.
>
>> > One can live without, but the statement "whatchanged is not even shorter
>> > to type than log --raw." on https://git-scm.com/docs/git-whatchanged is
>> > a weak one
>>
>> I have a proposal to remove it.
>
> Makes sense to me.
>
>> > that misses obvious use cases of `whatchanged`.
>>
>> The thing with git-whatchanged is that it uses the same underlying
>> machinery as git-log.  So there’s nothing that git-whatchanged can do
>> that git-log cannot do.
>>
>> ... and I guess vice versa.  But historically git-log ended up as the
>> new-and-better replacement (according to the devs) with git-whatchanged
>> being kept around for people who was used to typing it.
>
> Knowing Git aliases, there is actually no reason to keep `whatchanged`.
> Without the idea to enforce `--i-still-use-this` in the transition time,
> this would allow users to continue with their habits if they like to.

Sure, you can use something like that `wh` alias.

But note that you cannot make an alias like this named simply
`whatchanged` (the same name as the command):

    git config set --global alias.whatchanged 'log --raw --no-merges'

(in order to continue with the same habits exactly, verbatim)

Because you cannot currently make an alias that has the same name as a
command like this one.  But it looks like that restriction will be
lifted for deprecated commands in a future version.

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

end of thread, other threads:[~2025-09-14 19:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-14 12:48 Usage of git whatchanged Bjoern Bastian
2025-09-14 13:10 ` Kristoffer Haugsbakk
     [not found]   ` <aMbIqD4c5JY60fK1@eismeer>
2025-09-14 17:58     ` Kristoffer Haugsbakk
     [not found]       ` <aMcYrG3XBZc9Yu_L@eismeer>
2025-09-14 19:44         ` Kristoffer Haugsbakk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox