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-06-27 18:38:27 +0400
committerRussell Belfer <rb@github.com>2013-06-27 18:38:27 +0400
commitc67ff958c4d8e37a717c77dd9cdb4bdfc88a6fd8 (patch)
tree23bb5db9b21586bf91197a31d82a9fb47731de84 /tests-clar/diff
parentc7974b49d04bc318d61a010d2c5d2e75095f410b (diff)
Fix bug marking submodule diffs as unmodified
There was a bug where submodules whose HEAD had not been moved were being marked as having an UNMODIFIED delta record instead of being left MODIFIED. This fixes that and fixes the tests to notice if a submodule has been incorrectly marked as UNMODIFIED.
Diffstat (limited to 'tests-clar/diff')
-rw-r--r--tests-clar/diff/submodules.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests-clar/diff/submodules.c b/tests-clar/diff/submodules.c
index 46fe6c21c..5de46732b 100644
--- a/tests-clar/diff/submodules.c
+++ b/tests-clar/diff/submodules.c
@@ -47,8 +47,10 @@ static void check_diff_patches(git_diff_list *diff, const char **expected)
for (d = 0; d < num_d; ++d, git_diff_patch_free(patch)) {
cl_git_pass(git_diff_get_patch(&patch, &delta, diff, d));
- if (delta->status == GIT_DELTA_UNMODIFIED && expected[d] == NULL)
+ if (delta->status == GIT_DELTA_UNMODIFIED) {
+ cl_assert(expected[d] == NULL);
continue;
+ }
if (expected[d] && !strcmp(expected[d], "<SKIP>"))
continue;