diff options
author | Russell Belfer <rb@github.com> | 2013-05-16 01:54:02 +0400 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2013-05-16 01:54:02 +0400 |
commit | dcb0f7c061554de06db5879361b22eab3517a4ee (patch) | |
tree | 2221b740034cf3bf6236daa60242bb966d7c76cd /src/index.c | |
parent | 55d3a39098bfc513b12ad6cb56658cb2f87e6a91 (diff) |
Fix checkout of submodules with no .gitmodules
It is possible for there to be a submodule in a repository with
no .gitmodules file (for example, if the user forgot to commit
the .gitmodules file). In this case, core Git will just create
an empty directory as a placeholder for the submodule but
otherwise ignore it. We were generating an error and stopping
the checkout. This makes our behavior match that of core git.
Diffstat (limited to 'src/index.c')
-rw-r--r-- | src/index.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/index.c b/src/index.c index 53edb4874..bdbe545bf 100644 --- a/src/index.c +++ b/src/index.c @@ -106,7 +106,7 @@ static void index_entry_reuc_free(git_index_reuc_entry *reuc); GIT_INLINE(int) index_entry_stage(const git_index_entry *entry) { - return (entry->flags & GIT_IDXENTRY_STAGEMASK) >> GIT_IDXENTRY_STAGESHIFT; + return GIT_IDXENTRY_STAGE(entry); } static int index_srch(const void *key, const void *array_member) |