See PHI1739, which reports that Git commits with no message fail to parse.
[19-May-2020 00:52:13 UTC] [2020-05-19 00:52:13] EXCEPTION: (PhutilProxyException) Error while executing Task ID 256505576. {>} (AphrontQueryException) #1048: Column 'commitMessage' cannot be null at [<phabricator>/src/infrastructure/storage/connection/mysql/AphrontBaseMySQLDatabaseConnection.php:386] ...
These seem to be impossible to construct normally:
$ git commit --allow-empty -m '' Aborting commit due to empty commit message.
Previously, see T11537 for commits with impossible timestamps. A similar method of production likely works here:
$ git cat-file commit HEAD > message.original $ nano message.original # Delete all the useful text. $ git hash-object -t commit --stdin -w < message.original $ git reset --hard <hash>
$ git show commit f6abfc515e98edaddadede599e640b4fbbad74e0 (HEAD -> blank1) Author: epriestley <git@epriestley.com> Date: Fri May 8 13:50:07 2020 -0700
For completeness, note that we don't actually need an Author or Committer and can remove every line except tree. Here's the perfect commit:
epriestley@orbital ~/dev/spellbook $ (echo 'tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904'; echo) | git hash-object -t commit --stdin -w 8d7ff291d28b7f1109200d31f87a6f98fe7df90e epriestley@orbital ~/dev/spellbook $ git show 8d7ff291d28b7f1109200d31f87a6f98fe7df90e commit 8d7ff291d28b7f1109200d31f87a6f98fe7df90e