diff options
author | Vicent Martà <vicent@github.com> | 2013-04-09 15:15:18 -0700 |
---|---|---|
committer | Vicent Martà <vicent@github.com> | 2013-04-09 15:15:18 -0700 |
commit | e9b7ff602b7f4b9a7de92eb241bc0578a520dda2 (patch) | |
tree | ad5caff8bd3574a31040beaf1739f3ba3b6c8d9e /src/diff.c | |
parent | fc12a6b545e26e673640288418202ac802a82a3f (diff) | |
parent | ad26434b3b8a5eafab8ec52b83aa99beaf48fb03 (diff) | |
download | libgit2-e9b7ff602b7f4b9a7de92eb241bc0578a520dda2.tar.gz |
Merge pull request #1460 from arrbee/fix-dirty-submodules-diff
Submodule diff tests and fixes
Diffstat (limited to 'src/diff.c')
-rw-r--r-- | src/diff.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/diff.c b/src/diff.c index 7152683e7..37c89f3f1 100644 --- a/src/diff.c +++ b/src/diff.c @@ -542,7 +542,11 @@ static int maybe_modified( unsigned int sm_status = 0; if (git_submodule_status(&sm_status, sub) < 0) return -1; - status = GIT_SUBMODULE_STATUS_IS_UNMODIFIED(sm_status) + + /* check IS_WD_UNMODIFIED because this case is only used + * when the new side of the diff is the working directory + */ + status = GIT_SUBMODULE_STATUS_IS_WD_UNMODIFIED(sm_status) ? GIT_DELTA_UNMODIFIED : GIT_DELTA_MODIFIED; /* grab OID while we are here */ |