Re: git whatchanged

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Kristoffer Haugsbakk" <kristofferhaugsbakk@xxxxxxxxxxxx> writes:

> On Tue, Aug 19, 2025, at 22:57, rsbecker@xxxxxxxxxxxxx wrote:
>> On August 19, 2025 1:51 PM, Chris Judkins-Fisher wrote:
>>>I still use git whatchanged
>>
>> I did too. However, now that git log --since has basically the same
>> functionality,
>> Perhaps setting up a git alias might do the trick for you:
>>
>> git config --global alias.whatchanged 'log'
>>
>> so
>>
>> git whatchanged --since="2 week"
>>
>> or something like that should continue to work after the command is
>> removed.
>
> You can’t alias core commands.  So this will fail in the reported way
> before Git 3.0.  Then from that point out it will work as an alias.

Not quite.

  $ git -c alias.whatchanged='!echo bar' \
	whatchanged --i-still-use-this -2 --oneline
  7c10e48e81 describe: pass commit to describe_commit()
  :100644 100644 72b2e1162c 04df89d56b M	builtin/describe.c
  8cfd4ac215 describe: handle blob traversal with no commits
  :100644 100644 f7bea3c8c5 72b2e1162c M	builtin/describe.c
  :100755 100755 feec57bcbc 2c70cc561a M	t/t6120-describe.sh

Your alias with the same name as a real command is silently ignored,
and when the real command disappears, it will start working.

Having said that, as "log --raw" is even shorter to type than
"whatchanged", these people are really better off without such an
alias.




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux