diff options
author | Russell Belfer <rb@github.com> | 2013-05-15 14:54:02 -0700 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2013-05-15 14:54:02 -0700 |
commit | dcb0f7c061554de06db5879361b22eab3517a4ee (patch) | |
tree | 2221b740034cf3bf6236daa60242bb966d7c76cd /include/git2/index.h | |
parent | 55d3a39098bfc513b12ad6cb56658cb2f87e6a91 (diff) | |
download | libgit2-dcb0f7c061554de06db5879361b22eab3517a4ee.tar.gz |
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 'include/git2/index.h')
-rw-r--r-- | include/git2/index.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/git2/index.h b/include/git2/index.h index d23c3a8ea..bde38a9dd 100644 --- a/include/git2/index.h +++ b/include/git2/index.h @@ -57,6 +57,8 @@ GIT_BEGIN_DECL #define GIT_IDXENTRY_EXTENDED_FLAGS (GIT_IDXENTRY_INTENT_TO_ADD | GIT_IDXENTRY_SKIP_WORKTREE) +#define GIT_IDXENTRY_STAGE(E) (((E)->flags & GIT_IDXENTRY_STAGEMASK) >> GIT_IDXENTRY_STAGESHIFT) + /** Time used in a git index entry */ typedef struct { git_time_t seconds; |