{"thread":{"id":"14261","subject":"[PATCH] git fetch-pack: do not complain about \"no common commits\" in an empty repo","startedAt":"2008-07-02T17:06:56Z","lastAt":"2008-07-02T17:06:56Z","messageCount":1,"participants":["Johannes Schindelin"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"82000","messageId":"alpine.DEB.1.00.0807021806250.9925@racer","threadId":"14261","inReplyTo":null,"subject":"[PATCH] git fetch-pack: do not complain about \"no common commits\" in an empty repo","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-07-02T17:06:56Z","receivedAt":"2008-07-02T17:06:56Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"\nIf the repo is empty, it is obvious that there are no common commits\nwhen fetching from _anywhere_.\n\nSo there is no use in saying it in that case, and it can even be\nannoying.  Therefore suppress the message unilaterally if the repository\nis empty prior to the fetch.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n\n\tThis patch was originally developed in the 4msysgit branch.\n\n builtin-fetch-pack.c |    3 ++-\n 1 files changed, 2 insertions(+), 1 deletions(-)\n\ndiff --git a/builtin-fetch-pack.c b/builtin-fetch-pack.c\nindex f4dbcf0..2175c6d 100644\n--- a/builtin-fetch-pack.c\n+++ b/builtin-fetch-pack.c\n@@ -309,7 +309,8 @@ done:\n \t\t}\n \t\tflushes--;\n \t}\n-\treturn retval;\n+\t/* it is no error to fetch into a completely empty repo */\n+\treturn count ? retval : 0;\n }\n \n static struct commit_list *complete;\n-- \n1.5.6.1.300.gca3f\n"}]}