{"thread":{"id":"56826","subject":"`BUG: sequencer.c:921: GIT_AUTHOR_DATE missing from author script` when trying to reword in interactive rebase","startedAt":"2021-11-01T23:26:07Z","lastAt":"2021-11-02T12:20:39Z","messageCount":3,"participants":["Jonas Kittner","Jeff King","Phillip Wood"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"440279","messageId":"000201d7cf76$a4861460$ed923d20$@ruhr-uni-bochum.de","threadId":"56826","inReplyTo":null,"subject":"`BUG: sequencer.c:921: GIT_AUTHOR_DATE missing from author script` when trying to reword in interactive rebase","fromName":"Jonas Kittner","fromEmail":"jonas.kittner@ruhr-uni-bochum.de","sentAt":"2021-11-01T23:17:29Z","receivedAt":"2021-11-01T23:26:07Z","isPatch":false,"sender":{"key":"jonas.kittner@ruhr-uni-bochum.de","avatar":null},"body":"Hello,\nI encountered the following bug and filled out the template provided with\n`git bugreport` below.\nKind Regards,\nJonas Kittner\n\nThank you for filling out a Git bug report!\nPlease answer the following questions to help us understand your issue.\n\nWhat did you do before the bug happened? (Steps to reproduce your issue)\n\nIn the interactive prompt I changed `pick` to `reword`, saved and closed the\nprompt.\nCommands to repoduce see below\n\n```\nroot@135b2edea980:/# git init bug\nInitialized empty Git repository in /bug/.git/\nroot@135b2edea980:/# cd bug/\nroot@135b2edea980:/bug# touch foo\nroot@135b2edea980:/bug# git add .\nroot@135b2edea980:/bug# git commit -m \"foo\"\n[master (root-commit) 8fef261] foo\n 1 file changed, 0 insertions(+), 0 deletions(-)\n create mode 100644 foo\nroot@135b2edea980:/bug# touch bar\nroot@135b2edea980:/bug# git add .\nroot@135b2edea980:/bug# git commit -m \"bar\"\n[master 79a46e6] bar\n 1 file changed, 0 insertions(+), 0 deletions(-)\n create mode 100644 bar\nroot@135b2edea980:/bug# git log --oneline\n79a46e6 (HEAD -> master) bar\n8fef261 foo\nroot@135b2edea980:/bug# git rebase --interactive\n--committer-date-is-author-date 8fef261\nBUG: sequencer.c:921: GIT_AUTHOR_DATE missing from author script\nAborted (core dumped)\nroot@135b2edea980:/bug# git --version\ngit version 2.33.1\n```\n\nWhat did you expect to happen? (Expected behavior)\nI expected to be able to reword the commit message like without passing the\n`--committer-date-is-author-date` argument.\n\n\nWhat happened instead? (Actual behavior)\nsegfault: `BUG: sequencer.c:921: GIT_AUTHOR_DATE missing from author script`\n\nWhat's different between what you expected and what actually happened?\nwouldn't expect a segfault, but the option to be able to edit the commit\nmessage\n\nAnything else you want to add:\nThis was inside an ubuntu focal docker container, git was installed via the\nppa ` ppa:git-core/ppa`\n\nhttps://github.com/git/git/commit/7573cec52c0274ceb166c425be4288f6b3103d6f#d\niff-0e574dc9087fc7831bbc1403545a8561f08869576c1ccc4146aa276146ff9777R888-R88\n9\nthis seems to be not the case and needs to be handled differently I guess?\n\n\nPlease review the rest of the bug report below.\nYou can delete any lines you don't wish to share.\n\n\n[System Info]\ngit version:\ngit version 2.33.1\ncpu: x86_64\nno commit associated with this build\nsizeof-long: 8\nsizeof-size_t: 8\nshell-path: /bin/sh\nuname: Linux 5.11.0-38-generic #42~20.04.1-Ubuntu SMP Tue Sep 28 20:41:07\nUTC 2021 x86_64\ncompiler info: gnuc: 9.3\nlibc info: glibc: 2.31\n$SHELL (typically, interactive shell): <unset>\n\n\n[Enabled Hooks]\n\n\n"},{"id":"440285","messageId":"YYCT7tLfphH049h+@coredump.intra.peff.net","threadId":"56826","inReplyTo":"000201d7cf76$a4861460$ed923d20$@ruhr-uni-bochum.de","subject":"Re: `BUG: sequencer.c:921: GIT_AUTHOR_DATE missing from author script` when trying to reword in interactive rebase","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2021-11-02T01:27:10Z","receivedAt":"2021-11-02T01:27:18Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, Nov 02, 2021 at 12:17:29AM +0100, Jonas Kittner wrote:\n\n> In the interactive prompt I changed `pick` to `reword`, saved and closed the\n> prompt.\n> Commands to repoduce see below\n\nThanks for the easy reproduction. Here are commands that slightly\nsimplify / automate things, which I used to bisect:\n\n  rm -rf repo\n  git init repo\n  cd repo\n  git commit --allow-empty -qm base\n\n  touch file\n  git add .\n  GIT_AUTHOR_DATE='@123456789 +0000' git commit -qm \"this message says pick\"\n\n  GIT_EDITOR='sed -i s/pick/reword/' \\\n  git.compile rebase -i --committer-date-is-author-date HEAD^\n\n  # not strictly necessary, but when it works, you can see that the\n  # timestamps correctly match, and that \"pick\" was changed to \"reword\"\n  # in the message. Of course when it doesn't work, rebase aborts, so\n  # that's easier to see than looking at the commit. :)\n  git cat-file commit HEAD\n\n> What happened instead? (Actual behavior)\n> segfault: `BUG: sequencer.c:921: GIT_AUTHOR_DATE missing from author script`\n>\n> [...]\n>\n> https://github.com/git/git/commit/7573cec52c0274ceb166c425be4288f6b3103d6f#d\n> iff-0e574dc9087fc7831bbc1403545a8561f08869576c1ccc4146aa276146ff9777R888-R88\n> 9\n> this seems to be not the case and needs to be handled differently I guess?\n\nIt looks like things did work back in 7573cec52c (rebase -i: support\n--committer-date-is-author-date, 2020-08-17). Bisecting shows that it\nbroke in baf8ec8d3a (rebase -r: don't write .git/MERGE_MSG when\nfast-forwarding, 2021-08-20). +cc Phillip (who wrote both commits).\n\n-Peff\n"},{"id":"440292","messageId":"c510fd61-a079-c8fd-9203-61706f5534ac@gmail.com","threadId":"56826","inReplyTo":"YYCT7tLfphH049h+@coredump.intra.peff.net","subject":"Re: `BUG: sequencer.c:921: GIT_AUTHOR_DATE missing from author script` when trying to reword in interactive rebase","fromName":"Phillip Wood","fromEmail":"phillip.wood123@gmail.com","sentAt":"2021-11-02T12:20:35Z","receivedAt":"2021-11-02T12:20:39Z","isPatch":false,"sender":{"key":"phillip.wood@dunelm.org.uk","avatar":null},"body":"On 02/11/2021 01:27, Jeff King wrote:\n> On Tue, Nov 02, 2021 at 12:17:29AM +0100, Jonas Kittner wrote:\n> \n>> In the interactive prompt I changed `pick` to `reword`, saved and closed the\n>> prompt.\n>> Commands to repoduce see below\n> \n> Thanks for the easy reproduction. Here are commands that slightly\n> simplify / automate things, which I used to bisect:\n> \n>    rm -rf repo\n>    git init repo\n>    cd repo\n>    git commit --allow-empty -qm base\n> \n>    touch file\n>    git add .\n>    GIT_AUTHOR_DATE='@123456789 +0000' git commit -qm \"this message says pick\"\n> \n>    GIT_EDITOR='sed -i s/pick/reword/' \\\n>    git.compile rebase -i --committer-date-is-author-date HEAD^\n> \n>    # not strictly necessary, but when it works, you can see that the\n>    # timestamps correctly match, and that \"pick\" was changed to \"reword\"\n>    # in the message. Of course when it doesn't work, rebase aborts, so\n>    # that's easier to see than looking at the commit. :)\n>    git cat-file commit HEAD\n> \n>> What happened instead? (Actual behavior)\n>> segfault: `BUG: sequencer.c:921: GIT_AUTHOR_DATE missing from author script`\n>>\n>> [...]\n>>\n>> https://github.com/git/git/commit/7573cec52c0274ceb166c425be4288f6b3103d6f#d\n>> iff-0e574dc9087fc7831bbc1403545a8561f08869576c1ccc4146aa276146ff9777R888-R88\n>> 9\n>> this seems to be not the case and needs to be handled differently I guess?\n> \n> It looks like things did work back in 7573cec52c (rebase -i: support\n> --committer-date-is-author-date, 2020-08-17). Bisecting shows that it\n> broke in baf8ec8d3a (rebase -r: don't write .git/MERGE_MSG when\n> fast-forwarding, 2021-08-20). +cc Phillip (who wrote both commits).\n\nThanks for bisecting, I think I know what the problem is, I'll post a \nfix tomorrow.\n\nBest Wishes\n\nPhillip\n\n"}]}