# [PATCH] Ignore submodule commits when fetching over dumb protocols

3 messages from 2007-06-26 to 2007-06-27. Participants: Sven Verdoolaege, Linus Torvalds, Junio C Hamano.
Thread: https://gitlist.dev/t/8736

## Sven Verdoolaege, 2007-06-26 21:19

Subject: [PATCH] Ignore submodule commits when fetching over dumb protocols
Message-ID: <20070626211940.GA27221@liacs.nl>
URL: https://gitlist.dev/e/20070626211940.GA27221%40liacs.nl

```
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>
---
 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

```

## Linus Torvalds, 2007-06-26 21:36

Subject: Re: [PATCH] Ignore submodule commits when fetching over dumb protocols
Message-ID: <alpine.LFD.0.98.0706261434540.8675@woody.linux-foundation.org>
URL: https://gitlist.dev/e/alpine.LFD.0.98.0706261434540.8675%40woody.linux-foundation.org
In-Reply-To: <20070626211940.GA27221@liacs.nl>

```


On Tue, 26 Jun 2007, Sven Verdoolaege wrote:
>
> Without this patch, the code would look for the submodule
> commits in the superproject and (needlessly) fail when it
> couldn't find them.

Acked-by: Linus Torvalds <torvalds@linux-foundation.org>

This should probably be put in the maintenance branch, since I think we've 
tried to make sure that the current 1.5.x series plumbing can handle 
superproject data even if it doesn't then have the porcelain to make it 
all easy..

		Linus

```

## Junio C Hamano, 2007-06-27 00:41

Subject: Re: [PATCH] Ignore submodule commits when fetching over dumb protocols
Message-ID: <7vzm2mw7na.fsf@assigned-by-dhcp.pobox.com>
URL: https://gitlist.dev/e/7vzm2mw7na.fsf%40assigned-by-dhcp.pobox.com
In-Reply-To: <alpine.LFD.0.98.0706261434540.8675@woody.linux-foundation.org>

```
Linus Torvalds <torvalds@linux-foundation.org> writes:

> Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
>
> This should probably be put in the maintenance branch, since I think we've 
> tried to make sure that the current 1.5.x series plumbing can handle 
> superproject data even if it doesn't then have the porcelain to make it 
> all easy..

Thanks, both.

```
