Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>2008-07-02 21:06:56 +0400
committerJunio C Hamano <gitster@pobox.com>2008-07-02 22:54:22 +0400
commit8cb560fc470ee0d94e188d4e9deb14b0c8ac7a91 (patch)
tree46023f9009a6afdac3217982b3f1c042901712ec /builtin-fetch-pack.c
parentdc49308450eac06a66f136b6c49e193bef25a168 (diff)
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>
Diffstat (limited to 'builtin-fetch-pack.c')
-rw-r--r--builtin-fetch-pack.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin-fetch-pack.c b/builtin-fetch-pack.c
index f4dbcf069e..2175c6d0d6 100644
--- a/builtin-fetch-pack.c
+++ b/builtin-fetch-pack.c
@@ -309,7 +309,8 @@ done:
}
flushes--;
}
- return retval;
+ /* it is no error to fetch into a completely empty repo */
+ return count ? retval : 0;
}
static struct commit_list *complete;