aboutsummaryrefslogtreecommitdiff
path: root/fetch.c
diff options
context:
space:
mode:
authorSven Verdoolaege <skimo@liacs.nl>2007-06-26 23:19:41 +0200
committerJunio C Hamano <gitster@pobox.com>2007-06-26 18:02:13 -0700
commit582c7393a47894ea299a82c2ae91fec3101e7559 (patch)
tree23243e4fdf2ae690765b38a2ea2460d589e8bfc8 /fetch.c
parentc7c84859ad586ae5670224e1abc4f846f7c3a9ae (diff)
downloadgit-582c7393a47894ea299a82c2ae91fec3101e7559.tar.gz
git-582c7393a47894ea299a82c2ae91fec3101e7559.tar.xz
Ignore submodule commits when fetching over dumb protocols
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@liacs.nl> Acked-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'fetch.c')
-rw-r--r--fetch.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fetch.c b/fetch.c
index 8e29d313f..6f1f420be 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_ISDIRLNK(entry.mode))
+ continue;
if (S_ISDIR(entry.mode)) {
struct tree *tree = lookup_tree(entry.sha1);
if (tree)