Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2013-05-16 01:54:02 +0400
committerRussell Belfer <rb@github.com>2013-05-16 01:54:02 +0400
commitdcb0f7c061554de06db5879361b22eab3517a4ee (patch)
tree2221b740034cf3bf6236daa60242bb966d7c76cd /src/index.c
parent55d3a39098bfc513b12ad6cb56658cb2f87e6a91 (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.c2
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)