提交 ebcce310 编写于 作者: J Johannes Schindelin 提交者: Junio C Hamano

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: NJohannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 013942f6
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册