Thread (72 messages) flat view 72 messages, 20 authors, 2016-06-15
STALE3709d

[PATCH 02/12] Do not complain about "no common commits" in an empty repo

From: Steffen Prohaska <hidden>
Date: 2016-06-15 22:44:52
Subsystem: the rest · Maintainer: Linus Torvalds

Possibly related (same subject, not in this thread)

From: Johannes Schindelin <redacted>

If the repo is empty, we know that already, thank you very much.
So shut fetch-pack up about that case.

Fixes issue 3, too.

Signed-off-by: Johannes Schindelin <redacted>
Signed-off-by: Steffen Prohaska <redacted>
---
 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.255.g32571
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help