http-push: do not get confused by submodules
When encountering submodules in a tree, http-push should not try sending the respective object. Instead, it should ignore it. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
add8e8cee5
commit
1bbeb4c690
13
http-push.c
13
http-push.c
@ -1634,12 +1634,19 @@ static struct object_list **process_tree(struct tree *tree,
|
|||||||
|
|
||||||
init_tree_desc(&desc, tree->buffer, tree->size);
|
init_tree_desc(&desc, tree->buffer, tree->size);
|
||||||
|
|
||||||
while (tree_entry(&desc, &entry)) {
|
while (tree_entry(&desc, &entry))
|
||||||
if (S_ISDIR(entry.mode))
|
switch (object_type(entry.mode)) {
|
||||||
|
case OBJ_TREE:
|
||||||
p = process_tree(lookup_tree(entry.sha1), p, &me, name);
|
p = process_tree(lookup_tree(entry.sha1), p, &me, name);
|
||||||
else
|
break;
|
||||||
|
case OBJ_BLOB:
|
||||||
p = process_blob(lookup_blob(entry.sha1), p, &me, name);
|
p = process_blob(lookup_blob(entry.sha1), p, &me, name);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
/* Subproject commit - not in this repository */
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
free(tree->buffer);
|
free(tree->buffer);
|
||||||
tree->buffer = NULL;
|
tree->buffer = NULL;
|
||||||
return p;
|
return p;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user