{"thread":{"id":"18013","subject":"Commits with empty commit messages","startedAt":"2009-02-25T12:50:03Z","lastAt":"2009-02-25T12:50:03Z","messageCount":1,"participants":["Geert Uytterhoeven"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"106213","messageId":"alpine.LRH.2.00.0902251338230.21065@vixen.sonytel.be","threadId":"18013","inReplyTo":null,"subject":"Commits with empty commit messages","fromName":"Geert Uytterhoeven","fromEmail":"geert.uytterhoeven@sonycom.com","sentAt":"2009-02-25T12:50:03Z","receivedAt":"2009-02-25T12:50:03Z","isPatch":false,"sender":{"key":"geert.uytterhoeven@sonycom.com","avatar":null},"body":"I accidentally managed to create a commit with an empty commit message using\n`git am' with a patch that didn't have a subject line. It didn't matter much,\nas I just wanted to squash it during a rebase anyway.\n\nHowever, during `git rebase -i', I got a corrupt list of commits. Instead of\nthe usual:\n\n| pick sha1 desc1\n| pick sha2 desc2\n\nI saw:\n\n| pick sha1 >sha2 desc2\n\nIf you have a commit with an empty commit message, you can also not fix this\nusing amend:\n\n| $ git commit --amend\n| fatal: commit has empty message\n| $\n\nIf you use `git rebase -i' to rebase one or more commits, _all_ of them with\nempty commit messages, you don't see any of the familiar `pick' lines, but just\n\n| noop\n\nand you `loose' all those commits as soon as you quit your editor.\n\nProbably the real offender is `git am', which allows empty commit messages,\nunlike `git commit'.\n\n\nWhile trying to create a clean test case, I also noticed you cannot use\n`git am' to create the first commit in a freshly initialized empty git\nrepository. It fails with:\n\n| $ git am patch\n| fatal: HEAD: not a valid SHA1\n| fatal: bad revision 'HEAD'\n| $\n\nI'm using 1.6.0.4, but I could reproduce the issues with 1.6.2.rc1.41.g3f74c.\n\nWith kind regards,\n\nGeert Uytterhoeven\nSoftware Architect\n\nSony Techsoft Centre Europe\nThe Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium\n\nPhone:    +32 (0)2 700 8453\nFax:      +32 (0)2 700 8622\nE-mail:   Geert.Uytterhoeven@sonycom.com\nInternet: http://www.sony-europe.com/\n\nA division of Sony Europe (Belgium) N.V.\nVAT BE 0413.825.160 · RPR Brussels\nFortis · BIC GEBABEBB · IBAN BE41293037680010\n"}]}