{"thread":{"id":"58642","subject":"git revert --reference doesn't populate commit subject","startedAt":"2022-10-18T03:02:50Z","lastAt":"2022-10-18T03:02:50Z","messageCount":1,"participants":["Bagas Sanjaya"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"465168","messageId":"Y04XTl6yWXZv6xk5@debian.me","threadId":"58642","inReplyTo":null,"subject":"git revert --reference doesn't populate commit subject","fromName":"Bagas Sanjaya","fromEmail":"bagasdotme@gmail.com","sentAt":"2022-10-18T03:02:38Z","receivedAt":"2022-10-18T03:02:50Z","isPatch":false,"sender":{"key":"bagasdotme@gmail.com","avatar":"https://avatars.githubusercontent.com/u/40219486?v=4"},"body":"Hi,\n\nWhen reverting commit with `git revert`, the subject for revert commit\nis populated (\"Revert <original commit subject>\"). However, when\nreverting with `git revert --reference`, the subject doesn't get\npopulated; only commit message is generated (\"This reverts <original\ncommit reference>...\"). When no subject is given, the first paragraph of\nthe message automatically becomes commit subject.\n\nTo reproduce:\n\n```\n$ mkdir /tmp/test && cd /tmp/test\n$ git init && git branch -m main\n$ echo \"test\" > test\n$ git add test && git commit -m \"test\"\n$ echo \"whoops\" > test\n$ git commit -a -m \"whoops\"\n$ git revert HEAD\n// keep the commit message by just exiting the editor\n$ git log -n 1 --pretty=\"format:%s\" -p HEAD\n  Revert \"whoops\"\n$ echo \"whoops\" > test\n$ git commit -a -m \"whoops again\"\n$ git revert --reference HEAD\n// keep the commit message by just exiting the editor\n$ git log -n 1 --pretty=\"format:%s\" -p HEAD\n  This reverts <reference to \"whoops again\" commit>.\n```\n\nIn the reproducer above, I expect that the second revert generates\n`Revert \"whoops again\"` subject.\n\nThanks.\n\n-- \nAn old man doll... just what I always wanted! - Clara\n"}]}