* [PATCH] git fetch-pack: do not complain about "no common commits" in an empty repo
@ 2008-07-02 17:06 Johannes Schindelin
0 siblings, 0 replies; only message in thread
From: Johannes Schindelin @ 2008-07-02 17:06 UTC (permalink / raw)
To: Steffen Prohaska, gitster, git
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>
---
This patch was originally developed in the 4msysgit branch.
builtin-fetch-pack.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/builtin-fetch-pack.c b/builtin-fetch-pack.c
index f4dbcf0..2175c6d 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;
--
1.5.6.1.300.gca3f
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2008-07-02 17:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-02 17:06 [PATCH] git fetch-pack: do not complain about "no common commits" in an empty repo Johannes Schindelin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox