{"thread":{"id":"63999","subject":"I use whatchanged!","startedAt":"2025-08-20T19:21:10Z","lastAt":"2025-08-28T06:31:24Z","messageCount":7,"participants":["Dan Allen","Kristoffer Haugsbakk","Junio C Hamano","Ben Zanin","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"524550","messageId":"83241BDE-1E0D-489A-9181-C608E9FCC17B@gmail.com","threadId":"63999","inReplyTo":null,"subject":"I use whatchanged!","fromName":"Dan Allen","fromEmail":"danallen46@gmail.com","sentAt":"2025-08-20T19:20:58Z","receivedAt":"2025-08-20T19:21:10Z","isPatch":false,"sender":{"key":"danallen46@gmail.com","avatar":null},"body":"I just updated to git 2.51 and got the spam about whatchanged being nominated for removal.\n\nI run an important python script that uses this to set file times to the dates of the actual git commits, so as I browse the files I can see their last modified date, and not the date that the file was last synced.\n\nNow, if there is a different way of setting a git repository's files' mod dates to their actual date and time of last commit, please let me know!\n\nThe exact usage in the script is:\n\n    git whatchanged --pretty=%at\n\nThanks!\n\nDan Allen\nIdaho Falls, ID"},{"id":"524558","messageId":"868d0df4-992e-41a7-901e-288a4ff8527d@app.fastmail.com","threadId":"63999","inReplyTo":"83241BDE-1E0D-489A-9181-C608E9FCC17B@gmail.com","subject":"Re: I use whatchanged!","fromName":"Kristoffer Haugsbakk","fromEmail":"kristofferhaugsbakk@fastmail.com","sentAt":"2025-08-20T20:46:26Z","receivedAt":"2025-08-20T20:46:49Z","isPatch":false,"sender":{"key":"kristofferhaugsbakk@fastmail.com","avatar":null},"body":"On Wed, Aug 20, 2025, at 21:20, Dan Allen wrote:\n> I just updated to git 2.51 and got the spam about whatchanged being\n> nominated for removal.\n>\n> I run an important python script that uses this to set file times to\n> the dates of the actual git commits, so as I browse the files I can see\n> their last modified date, and not the date that the file was last\n> synced.\n>\n> Now, if there is a different way of setting a git repository's files'\n> mod dates to their actual date and time of last commit, please let me\n> know!\n>\n> The exact usage in the script is:\n>\n>     git whatchanged --pretty=%at\n\nAccording to git-whatchanged(1)\n\n    replace: git whatchanged <opts>\n    with:    git log <opts> --raw --no-merges\n\nShould be enough.\n\n-- \nsemantic drift\n"},{"id":"524559","messageId":"xmqq8qjdaf55.fsf@gitster.g","threadId":"63999","inReplyTo":"83241BDE-1E0D-489A-9181-C608E9FCC17B@gmail.com","subject":"Re: I use whatchanged!","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-08-20T20:53:42Z","receivedAt":"2025-08-20T20:53:45Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Dan Allen <danallen46@gmail.com> writes:\n\n> The exact usage in the script is:\n>\n>     git whatchanged --pretty=%at\n\nAnd \"git log --raw --pretty=%at\" does not fit your need?\n"},{"id":"524561","messageId":"877byxbtiw.fsf@gmail.com","threadId":"63999","inReplyTo":"83241BDE-1E0D-489A-9181-C608E9FCC17B@gmail.com","subject":"Re: I use whatchanged!","fromName":"Ben Zanin","fromEmail":"bzanin@gmail.com","sentAt":"2025-08-20T20:57:43Z","receivedAt":"2025-08-20T20:57:46Z","isPatch":false,"sender":{"key":"bzanin@gmail.com","avatar":null},"body":"Dan Allen <danallen46@gmail.com> writes:\n> I just updated to git 2.51 and got the spam about whatchanged being nominated for removal.\n>\n> I run an important python script that uses this to set file times to\n> the dates of the actual git commits, so as I browse the files I can\n> see their last modified date, and not the date that the file was last\n> synced.\n>\n> Now, if there is a different way of setting a git repository's files' mod dates to their actual date and time of last commit, please let me know!\n>\n> The exact usage in the script is:\n>\n>     git whatchanged --pretty=%at\n[snip]\n\nDan,\n\nWould a git-log invocation like this suit your use case?\n\n    git log --raw --no-merges --pretty='%at'\n\nWhen I test that by running it inside a working directory of the git\nrepo as of commit c44beea485f0f2feaf460e2ac87fdd5608d63cf0 / v2.51.0, it\nlooks like the output of `git whatchanged --pretty='%at'` and that of\n`git log --raw --no-merges --pretty='%at'` is almost identical but for\nthe addition of a couple of extra timestamps in the output:\n\n    diff -U0 \\\n      <(git whatchanged --i-still-use-this --pretty='%at') \\\n      <(git log --raw --no-merges --pretty='%at')\n\n...gives me..:\n\n    --- /dev/fd/63  2025-08-20 16:55:36.936065126 -0400\n    +++ /dev/fd/62  2025-08-20 16:55:36.936065126 -0400\n    @@ -39,0 +40 @@\n    +1754972997\n    @@ -3773,0 +3775 @@\n    +1745540054\n    @@ -18102,0 +18105 @@\n    +1717188675\n    @@ -210119,0 +210123 @@\n    +1179951046\n    @@ -243728,0 +243733 @@\n    +1113865892\n\nIs that close enough to support the functionality of your script?\n\n-- \n\tBen\n"},{"id":"524858","messageId":"20250825085428.GA367101@coredump.intra.peff.net","threadId":"63999","inReplyTo":"877byxbtiw.fsf@gmail.com","subject":"Re: I use whatchanged!","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2025-08-25T08:54:28Z","receivedAt":"2025-08-25T08:54:30Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Aug 20, 2025 at 04:57:43PM -0400, Ben Zanin wrote:\n\n> When I test that by running it inside a working directory of the git\n> repo as of commit c44beea485f0f2feaf460e2ac87fdd5608d63cf0 / v2.51.0, it\n> looks like the output of `git whatchanged --pretty='%at'` and that of\n> `git log --raw --no-merges --pretty='%at'` is almost identical but for\n> the addition of a couple of extra timestamps in the output:\n> \n>     diff -U0 \\\n>       <(git whatchanged --i-still-use-this --pretty='%at') \\\n>       <(git log --raw --no-merges --pretty='%at')\n> \n> ...gives me..:\n> \n>     --- /dev/fd/63  2025-08-20 16:55:36.936065126 -0400\n>     +++ /dev/fd/62  2025-08-20 16:55:36.936065126 -0400\n>     @@ -39,0 +40 @@\n>     +1754972997\n>     @@ -3773,0 +3775 @@\n>     +1745540054\n>     @@ -18102,0 +18105 @@\n>     +1717188675\n>     @@ -210119,0 +210123 @@\n>     +1179951046\n>     @@ -243728,0 +243733 @@\n>     +1113865892\n\nLooks like those are cases where the commit is empty (it's not a merge,\nand has the same tree as its first parent). E.g.:\n\n  $ commits=8d2709d075d65ba386a4dac157129ef868c283e5^-\n  $ git log --oneline --raw --no-merges $commits\n  8d2709d075 A few hotfixes before -rc2\n\n  $ git whatchanged --i-still-use-this $commits\n  [no output]\n\nThe culprit is the revs.always_show_header flag, which git-log sets but\ngit-whatchanged does not. I don't think there is a way to influence it\nwith an option, though. You can simplify history by giving a pathspec,\nbut that can have broader changes (e.g., it may also simplify away side\nbranches).\n\nI don't know if that's an option that should be added before declaring\nwhatchanged dead. Arguably the git-log behavior is much more reasonable,\nbut I don't know if anybody cares about being byte-for-byte identical to\nwhatchanged behavior.\n\n-Peff\n"},{"id":"524869","messageId":"xmqq5xebtmsl.fsf@gitster.g","threadId":"63999","inReplyTo":"20250825085428.GA367101@coredump.intra.peff.net","subject":"Re: I use whatchanged!","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-08-25T15:59:22Z","receivedAt":"2025-08-25T15:59:25Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> The culprit is the revs.always_show_header flag, which git-log sets but\n> git-whatchanged does not. I don't think there is a way to influence it\n> with an option, though. You can simplify history by giving a pathspec,\n> but that can have broader changes (e.g., it may also simplify away side\n> branches).\n>\n> I don't know if that's an option that should be added before declaring\n> whatchanged dead. Arguably the git-log behavior is much more reasonable,\n> but I don't know if anybody cares about being byte-for-byte identical to\n> whatchanged behavior.\n\n\"git log\" behaviour of showing the presence of empty commits is\nreasonable in the context of \"showing the log\".  \"git whatchanged\"\nbbehaviour of reporting which commits changed things (either in the\nwhole tree, or limited by pathspec) and omitting is reasonable in\nthe context of \"showing what commit changed these things\".\n\nI do not think byte-for-byte identical output is a requirement, but\nI of course am biased ;-)\n"},{"id":"525086","messageId":"d13a0a0d-4d62-47f4-9908-5a712e250856@app.fastmail.com","threadId":"63999","inReplyTo":"280B51C1-CE87-4953-89CE-6310ECEC9D61@gmail.com","subject":"Re: I use whatchanged!","fromName":"Kristoffer Haugsbakk","fromEmail":"kristofferhaugsbakk@fastmail.com","sentAt":"2025-08-28T06:31:03Z","receivedAt":"2025-08-28T06:31:24Z","isPatch":false,"sender":{"key":"kristofferhaugsbakk@fastmail.com","avatar":null},"body":"On Fri, Aug 22, 2025, at 15:52, Dan Allen wrote:\n>> On 20 Aug 2025, at 14:46, Kristoffer Haugsbakk <kristofferhaugsbakk@fastmail.com> wrote:\n>>[snip]\n>> According to git-whatchanged(1)\n>>\n>>    replace: git whatchanged <opts>\n>>    with:    git log <opts> --raw --no-merges\n>>\n>> Should be enough.\n>>\n>> --\n>> semantic drift\n>\n> That works!  Thank you.\n\nThat’s great.  Just remember to use reply-all on this list.\n\nCheers\n\n-- \nKristoffer\n"}]}