summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: add8e8c)
raw | patch | inline | side by side (parent: add8e8c)
author | Johannes Schindelin <Johannes.Schindelin@gmx.de> | |
Thu, 14 Feb 2008 23:32:32 +0000 (23:32 +0000) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 16 Feb 2008 07:21:56 +0000 (23:21 -0800) |
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>
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>
http-push.c | patch | blob | history |
diff --git a/http-push.c b/http-push.c
index 386b806f3ec62c183752e5ec5b19920fc9bd4cf0..14ef652ca76a6abab44e5f5e5b3265c3cdb34506 100644 (file)
--- a/http-push.c
+++ b/http-push.c
init_tree_desc(&desc, tree->buffer, tree->size);
- while (tree_entry(&desc, &entry)) {
- if (S_ISDIR(entry.mode))
+ while (tree_entry(&desc, &entry))
+ switch (object_type(entry.mode)) {
+ case OBJ_TREE:
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);
- }
+ break;
+ default:
+ /* Subproject commit - not in this repository */
+ break;
+ }
+
free(tree->buffer);
tree->buffer = NULL;
return p;