Sometime after Git 1.7.3.2, sparse checkouts stopped working for me. My
sparse-checkout file looks something like:
*
!DirA/
!DirB/
DirC/
I have restored some lines of code that were removed in November 2010.
This resolves the sparse checkout issue for me, but my guess is the
solution is not implemented properly.
Can anyone confirm the issue and describe why those lines were removed?
Thanks.
Josh
---
dir.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/dir.c b/dir.c
index 6e4494e..3f057b6 100644
--- a/dir.c
+++ b/dir.c
@@ -507,7 +507,10 @@ int excluded_from_list(const char *pathname,
int to_exclude = x->to_exclude;
if (x->flags & EXC_FLAG_MUSTBEDIR) {
- if (*dtype == DT_UNKNOWN)
+ if (!prefixcmp(pathname, exclude) &&
+ pathname[x->patternlen] == '/')
+ return to_exclude;
+ else if (*dtype == DT_UNKNOWN)
*dtype = get_dtype(NULL, pathname, pathlen);
if (*dtype != DT_DIR)
continue;
--
1.7.6.msysgit.1
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html