{"thread":{"id":"10327","subject":"[PATCH] helpful error message when send-pack finds no refs in common.","startedAt":"2007-10-16T21:31:39Z","lastAt":"2007-10-16T21:31:39Z","messageCount":1,"participants":["Andrew Clausen"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"56139","messageId":"20071016213139.GF13454@econ.upenn.edu","threadId":"10327","inReplyTo":null,"subject":"[PATCH] helpful error message when send-pack finds no refs in common.","fromName":"Andrew Clausen","fromEmail":"clausen@econ.upenn.edu","sentAt":"2007-10-16T21:31:39Z","receivedAt":"2007-10-16T21:31:39Z","isPatch":true,"sender":{"key":"clausen@econ.upenn.edu","avatar":null},"body":"Hi all,\n\nPlease cc me, I'm not subscribed.\n\ngit-push fails when pushing into an empty repository if you don't specify\na branch:\n\n\tgit --bare init some-repo\n\n\tgit-push some-repo\n\nTo get this to work, you need to do\n\n\tgit-push some-repo master\n\nI attached a patch so that the error message suggests trying the latter.\n\nCheers,\nAndrew\n\n\n\n>From ee888ea1a7d2e75a0439569e36eabe4620e8f833 Mon Sep 17 00:00:00 2001\nDate: Tue, 16 Oct 2007 17:16:05 -0400\nSubject: [PATCH] helpful error message when send-pack finds no refs in common.\nSigned-off-by: Andrew Clausen <clausen@econ.upenn.edu>\n\n---\n send-pack.c |    3 ++-\n 1 files changed, 2 insertions(+), 1 deletions(-)\n\ndiff --git a/send-pack.c b/send-pack.c\nindex f74e66a..f0b0825 100644\n--- a/send-pack.c\n+++ b/send-pack.c\n@@ -204,7 +204,8 @@ static int send_pack(int in, int out, struct remote *remote, int nr_refspec, cha\n \t\treturn -1;\n \n \tif (!remote_refs) {\n-\t\tfprintf(stderr, \"No refs in common and none specified; doing nothing.\\n\");\n+\t\tfprintf(stderr,\n+\t\t\t\"No refs in common and none specified; doing nothing.\\n\"\t\t\t\"Perhaps you should specify a branch such as 'master'.\\n\");\n \t\treturn 0;\n \t}\n \n-- \n1.5.3.1\n\n"}]}