diff options
author | Russell Belfer <arrbee@arrbee.com> | 2012-03-22 21:44:36 +0400 |
---|---|---|
committer | Russell Belfer <arrbee@arrbee.com> | 2012-03-22 21:44:36 +0400 |
commit | 66142ae03134ef8a45e6bd304c6106a1685c3c99 (patch) | |
tree | 2a938d7439f419e4764e54040d787982efcffa71 /src/iterator.c | |
parent | 95340398a1821bd19da1bfe459ba1f375ed89404 (diff) |
New status fixes
This adds support for roughly-right tracking of submodules
(although it does not recurse into submodules to detect
internal modifications a la core git), and it adds support
for including unmodified files in diff iteration if requested.
Diffstat (limited to 'src/iterator.c')
-rw-r--r-- | src/iterator.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/iterator.c b/src/iterator.c index cc15b5f67..001bee7b0 100644 --- a/src/iterator.c +++ b/src/iterator.c @@ -427,7 +427,12 @@ static int workdir_iterator__update_entry(workdir_iterator *wi) /* detect submodules */ if (S_ISDIR(wi->entry.mode) && git_path_contains(&wi->path, DOT_GIT) == true) + { + size_t len = strlen(wi->entry.path); + assert(wi->entry.path[len - 1] == '/'); + wi->entry.path[len - 1] = '\0'; wi->entry.mode = S_IFGITLINK; + } return 0; } |