On Wed, Jan 11, 2012 at 1:31 PM, Jonathan Nieder [off-list ref] wrote:
Check this out:
mkdir -p test-repo/subdir
cd test-repo
git init
echo hi >subdir/hello.h
git add subdir/hello.h
git commit -m 'say hi'
git diff-index --abbrev HEAD -- '*.h'
This seems to fix this.
diff --git a/unpack-trees.c b/unpack-trees.c
index 7c9ecf6..5cf58b6 100644
--- a/unpack-trees.c
+++ b/unpack-trees.c
@@ -1042,6 +1042,7 @@ int unpack_trees(unsigned len, struct tree_desc
*t, struct unpack_trees_options
info.data = o;
info.show_all_errors = o->show_all_errors;
info.pathspec = o->pathspec;
+ info.pathspec->recursive = 1;
if (o->prefix) {
/*
Still scratching my head why this flag is zero by default, which would
affect all other places.. Or perhaps the right fix would be this
instead
diff --git a/tree-walk.c b/tree-walk.c
index f82dba6..0345938 100644
--- a/tree-walk.c
+++ b/tree-walk.c
@@ -634,7 +634,7 @@ enum interesting tree_entry_interesting(const
struct name_entry *entry,
* Match all directories. We'll try to
* match files later on.
*/
- if (ps->recursive && S_ISDIR(entry->mode))
+ if (S_ISDIR(entry->mode))
return entry_interesting;
}
@@ -662,7 +662,7 @@ match_wildcards:
* Match all directories. We'll try to match files
* later on.
*/
- if (ps->recursive && S_ISDIR(entry->mode))
+ if (S_ISDIR(entry->mode))
return entry_interesting;
}
return never_interesting; /* No matches */--
Duy