diff --git a/builtin-fetch-pack.c b/builtin-fetch-pack.c index de1e8d136..6e98cafd0 100644 --- a/builtin-fetch-pack.c +++ b/builtin-fetch-pack.c @@ -309,7 +309,8 @@ static int find_common(int fd[2], unsigned char *result_sha1, } flushes--; } - return retval; + /* it is no error to fetch into a completely empty repo */ + return count ? retval : 0; } static struct commit_list *complete;