diff options
author | Russell Belfer <rb@github.com> | 2012-10-08 15:19:00 -0700 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2012-10-08 15:22:40 -0700 |
commit | 5d1308f25ff36d03f0a22451642cc0f2a931daae (patch) | |
tree | 1d9c581f1a2b756a35c95f15077630a9fac34a2c /include/git2/submodule.h | |
parent | 71966e2f1bdfb75b7e57942d572ea089ce32e463 (diff) | |
download | libgit2-5d1308f25ff36d03f0a22451642cc0f2a931daae.tar.gz |
Add test for diffs with submodules and bug fixes
The adds a test for the submodule diff capabilities and then
fixes a few bugs with how the output is generated. It improves
the accuracy of OIDs in the diff delta object and makes the
submodule output more closely mirror the OIDs that will be used
by core git.
Diffstat (limited to 'include/git2/submodule.h')
-rw-r--r-- | include/git2/submodule.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/include/git2/submodule.h b/include/git2/submodule.h index 28057d26f..b00fad2d4 100644 --- a/include/git2/submodule.h +++ b/include/git2/submodule.h @@ -120,8 +120,15 @@ typedef enum { } git_submodule_status_t; #define GIT_SUBMODULE_STATUS_IS_UNMODIFIED(S) \ - (((S) & ~(GIT_SUBMODULE_STATUS_IN_HEAD | GIT_SUBMODULE_STATUS_IN_INDEX | \ - GIT_SUBMODULE_STATUS_IN_CONFIG | GIT_SUBMODULE_STATUS_IN_WD)) == 0) + (((S) & ~(GIT_SUBMODULE_STATUS_IN_HEAD | \ + GIT_SUBMODULE_STATUS_IN_INDEX | \ + GIT_SUBMODULE_STATUS_IN_CONFIG | \ + GIT_SUBMODULE_STATUS_IN_WD)) == 0) + +#define GIT_SUBMODULE_STATUS_IS_WD_DIRTY(S) \ + (((S) & (GIT_SUBMODULE_STATUS_WD_INDEX_MODIFIED | \ + GIT_SUBMODULE_STATUS_WD_WD_MODIFIED | \ + GIT_SUBMODULE_STATUS_WD_UNTRACKED)) != 0) /** * Lookup submodule information by name or path. |