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

git whatchanged --i-still-use-this

From
RLRoy Lomicka <rlomicka@concord.net>
Date
Oct 13, 2025, 18:55 UTC
Message-ID
<SJ2PR03MB7043AA590AD8D80DB4EC7B73CFEAA@SJ2PR03MB7043.namprd03.prod.outlook.com>
In-Reply-To
<SJ2PR03MB704376284D14F92B54139BFBCFEAA@SJ2PR03MB7043.namprd03.prod.outlook.com>
This is one way I deal with the fact that git has no option to respect mtime.
powershell use-commit-times.ps1

'git whatchanged' is nominated for removal. If you still use this command, please add an extra option, '--i-still-use-this', on the command line and let us know you still use it by sending an e-mail to <mailto:git@vger.kernel.org>.  Thanks. fatal: refusing to run without --i-still-use-this

use-commit-times.ps1:
#use-commit-times
[string[]]$changes = &git whatchanged --reverse --pretty=%at
$mtime = [DateTime]::Now;
[string]$change = $null;
foreach($change in $changes)
{
    if($change.Length -eq 0) { continue; }
    if($change[0] -eq ":")
    {
        $parts = $change.Split("`t");
        $file = $parts[$parts.Length - 1];
        if([System.IO.File]::Exists($file))
        {
            [System.IO.File]::SetLastWriteTimeUtc($file, $mtime);
        }
    }
    else
    {
        $mtime = [DateTimeOffset]::FromUnixTimeSeconds([Int64]::Parse($change)).DateTime;
    }
}

Roy Lomicka Software Developer p: (978) 367-3518 e: mailto:rlomicka@concord.net w: http://www.concord.net/

Concord Technologies and Biscom have come together to better serve you, https://concord.net/concord-technologies-acquires-biscom/.
Next: Kristoffer Haugsbakk
Message 1 of 2 in “git whatchanged --i-still-use-this”
  1. Roy LomickaOct 13, 2025
  2. Kristoffer HaugsbakkOct 13, 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.