@matheusbsbs / matheus-bagliano / commits / 8cb560fc47
Fork 0

git fetch-pack: do not complain about "no common commits" in an empty repo

If the repo is empty, it is obvious that there are no common commits when fetching from _anywhere_. So there is no use in saying it in that case, and it can even be annoying. Therefore suppress the message unilaterally if the repository is empty prior to the fetch. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Johannes Schindelin committed Jul 2, 2008 at 18:06 UTC 8cb560fc470ee0d94e188d4e9deb14b0c8ac7a91
1 file changed +2 -1
builtin-fetch-pack.c
+2 -1
@@ -309,7 +309,8 @@ done:
309 }
310 flushes--;
311 }
312 - return retval;
312 + /* it is no error to fetch into a completely empty repo */
313 + return count ? retval : 0;
314 }
315
316 static struct commit_list *complete;