git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git whatchanged

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 20, 2025, 16:49 UTC
Message-ID
<xmqqfrdmaqg4.fsf@gitster.g>
In-Reply-To
<37da14fb-fead-448b-b6a0-853c9fbea653@app.fastmail.com>
"Kristoffer Haugsbakk" <kristofferhaugsbakk@fastmail.com> writes:
Show 19 quoted lines
> On Tue, Aug 19, 2025, at 22:57, rsbecker@nexbridge.com 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.

Previous: rsbecker@nexbridge.comNext: Chris Judkins-Fisher
Message 6 of 10 in “git whatchanged”
  1. Chris Judkins-FisherAug 19, 2025
  2. Chris Judkins-FisherAug 19, 2025
  3. rsbecker@nexbridge.comAug 19, 2025
  4. Kristoffer HaugsbakkAug 20, 2025
  5. rsbecker@nexbridge.comAug 20, 2025
  6. Junio C HamanoAug 20, 2025
  7. Chris Judkins-FisherAug 20, 2025
  8. Kristoffer HaugsbakkAug 20, 2025
  9. Junio C HamanoAug 20, 2025
  10. Kristoffer HaugsbakkAug 20, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.