aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>2008-07-02 18:06:56 +0100
committerJunio C Hamano <gitster@pobox.com>2008-07-16 15:53:43 -0700
commitebcce310f2018b26a21b2926490209f5550620fe (patch)
tree421dff1240d01ee51fbedf58979cdeaab00a3aef
parent013942f637e2e0706b5a44e58a9d285bc57c5305 (diff)
downloadgit-ebcce310f2018b26a21b2926490209f5550620fe.tar.gz
git-ebcce310f2018b26a21b2926490209f5550620fe.tar.xz
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>
-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 de1e8d136..6e98cafd0 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;