diff options
author | Edward Thomson <ethomson@microsoft.com> | 2014-01-20 15:12:06 -0500 |
---|---|---|
committer | Edward Thomson <ethomson@microsoft.com> | 2014-01-20 17:09:31 -0500 |
commit | b554ca5dc1b95234589367eda269a94bdda3d6ae (patch) | |
tree | a6c270f95f21d4d42ea4a2543a45f00656e07afe /include | |
parent | d62bf0bf83df307b81affbf7b576985392203fad (diff) | |
download | libgit2-b554ca5dc1b95234589367eda269a94bdda3d6ae.tar.gz |
"Uninitialized" submodules are "unmodified"
Extend the "unmodified" submodule workdir test to include
uninitialized submodules, to prevent reporting submodules as
modified when they're not in the workdir at all.
Diffstat (limited to 'include')
-rw-r--r-- | include/git2/submodule.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/git2/submodule.h b/include/git2/submodule.h index 907e5a15f..af08ba6eb 100644 --- a/include/git2/submodule.h +++ b/include/git2/submodule.h @@ -97,7 +97,8 @@ typedef enum { (((S) & GIT_SUBMODULE_STATUS__INDEX_FLAGS) == 0) #define GIT_SUBMODULE_STATUS_IS_WD_UNMODIFIED(S) \ - (((S) & GIT_SUBMODULE_STATUS__WD_FLAGS) == 0) + (((S) & (GIT_SUBMODULE_STATUS__WD_FLAGS & \ + ~GIT_SUBMODULE_STATUS_WD_UNINITIALIZED)) == 0) #define GIT_SUBMODULE_STATUS_IS_WD_DIRTY(S) \ (((S) & (GIT_SUBMODULE_STATUS_WD_INDEX_MODIFIED | \ |