From c67ff958c4d8e37a717c77dd9cdb4bdfc88a6fd8 Mon Sep 17 00:00:00 2001 From: Russell Belfer Date: Thu, 27 Jun 2013 07:38:27 -0700 Subject: 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. --- tests-clar/diff/submodules.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tests-clar/diff/submodules.c') 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], "")) continue; -- cgit v1.2.1