[PATCH] Ignore submodule commits when fetching over dumb protocols

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Without this patch, the code would look for the submodule
commits in the superproject and (needlessly) fail when it
couldn't find them.

Signed-off-by: Sven Verdoolaege <skimo@xxxxxxxx>
---
 fetch.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/fetch.c b/fetch.c
index dda33e5..811be87 100644
--- a/fetch.c
+++ b/fetch.c
@@ -46,6 +46,9 @@ static int process_tree(struct tree *tree)
 	while (tree_entry(&desc, &entry)) {
 		struct object *obj = NULL;
 
+		/* submodule commits are not stored in the superproject */
+		if (S_ISGITLINK(entry.mode))
+			continue;
 		if (S_ISDIR(entry.mode)) {
 			struct tree *tree = lookup_tree(entry.sha1);
 			if (tree)
-- 
1.5.2.2.549.gaeb59
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux