{"thread":{"id":"15826","subject":"git-am: can't apply to an empty repository","startedAt":"2008-10-08T13:24:27Z","lastAt":"2008-10-08T13:24:27Z","messageCount":1,"participants":["Imre Deak"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"92618","messageId":"500f3d130810080624g23b4ed1ckde5d63082dca9040@mail.gmail.com","threadId":"15826","inReplyTo":null,"subject":"git-am: can't apply to an empty repository","fromName":"Imre Deak","fromEmail":"imre.deak@gmail.com","sentAt":"2008-10-08T13:24:27Z","receivedAt":"2008-10-08T13:24:27Z","isPatch":false,"sender":{"key":"imre.deak@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1049948?v=4"},"body":"When trying to build a repository from mbox format patches I have the\nfollowing problem:\n\nCreating a hypothetical mbox patch:\n\n$ echo \"From: imre deak <imre.deak@gmail.com>\" > 1.patch\n$ touch a\n$ git diff --no-index /dev/null a >> 1.patch\n$ cat 1.patch\nFrom: imre deak <imre.deak@gmail.com>\ndiff --git a/a b/a\nnew file mode 100644\nindex 0000000..e69de29\n\nApply it to a newly created repository:\n\n$ git init\nInitialized empty Git repository in /home/imde/conv/git/.git/\n$ git am 1.patch\nfatal: HEAD: not a valid SHA1\nfatal: bad revision 'HEAD'\n\nIs this supposed to work at all?\n\n--Imre\n"}]}