summaryrefslogtreecommitdiffstats
path: root/revision.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2007-11-19 01:16:37 +0100
committerJunio C Hamano <gitster@pobox.com>2007-11-19 01:16:37 +0100
commit5d3d1cacc139194672a6a184509bb620a19b2497 (patch)
tree872d798fe9d07c32ff768ca83a5df1450f09a212 /revision.c
parentMerge branch 'ds/checkout-upper' (diff)
parentFix rev-list when showing objects involving submodules (diff)
downloadgit-5d3d1cacc139194672a6a184509bb620a19b2497.tar.xz
git-5d3d1cacc139194672a6a184509bb620a19b2497.zip
Merge branch 'lt/rev-list-gitlink'
* lt/rev-list-gitlink: Fix rev-list when showing objects involving submodules
Diffstat (limited to 'revision.c')
-rw-r--r--revision.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/revision.c b/revision.c
index 8f0287fcc0..2a59035192 100644
--- a/revision.c
+++ b/revision.c
@@ -67,10 +67,17 @@ void mark_tree_uninteresting(struct tree *tree)
init_tree_desc(&desc, tree->buffer, tree->size);
while (tree_entry(&desc, &entry)) {
- if (S_ISDIR(entry.mode))
+ switch (object_type(entry.mode)) {
+ case OBJ_TREE:
mark_tree_uninteresting(lookup_tree(entry.sha1));
- else
+ break;
+ case OBJ_BLOB:
mark_blob_uninteresting(lookup_blob(entry.sha1));
+ break;
+ default:
+ /* Subproject commit - not in this repository */
+ break;
+ }
}
/*