summaryrefslogtreecommitdiff
path: root/tests-clar/diff/submodules.c
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2013-10-15 15:10:07 -0700
committerRussell Belfer <rb@github.com>2013-10-15 15:10:07 -0700
commit10672e3e455eba2d4ca983070ed427caeeb24a6f (patch)
treee812af06091362849e9ecd279c5547e401cb0862 /tests-clar/diff/submodules.c
parent3ff1d123736e5686fb9ec16e65828d5b8ffa2b30 (diff)
downloadlibgit2-10672e3e455eba2d4ca983070ed427caeeb24a6f.tar.gz
Diff API cleanup
This lays groundwork for separating formatting options from diff creation options. This groups the formatting flags separately from the diff list creation flags and reorders the options. This also tweaks some APIs to further separate code that uses patches from code that just looks at git_diffs.
Diffstat (limited to 'tests-clar/diff/submodules.c')
-rw-r--r--tests-clar/diff/submodules.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests-clar/diff/submodules.c b/tests-clar/diff/submodules.c
index 24283e2fa..24545b2c7 100644
--- a/tests-clar/diff/submodules.c
+++ b/tests-clar/diff/submodules.c
@@ -22,7 +22,8 @@ static void check_diff_patches_at_line(
char *patch_text;
for (d = 0; d < num_d; ++d, git_patch_free(patch)) {
- cl_git_pass(git_patch_from_diff(&patch, &delta, diff, d));
+ cl_git_pass(git_patch_from_diff(&patch, diff, d));
+ cl_assert((delta = git_patch_get_delta(patch)) != NULL);
if (delta->status == GIT_DELTA_UNMODIFIED) {
cl_assert_at_line(expected[d] == NULL, file, line);
@@ -123,7 +124,7 @@ void test_diff_submodules__dirty_submodule_2(void)
cl_git_pass(git_submodule_reload_all(g_repo));
opts.flags = GIT_DIFF_INCLUDE_UNTRACKED |
- GIT_DIFF_INCLUDE_UNTRACKED_CONTENT |
+ GIT_DIFF_SHOW_UNTRACKED_CONTENT |
GIT_DIFF_RECURSE_UNTRACKED_DIRS |
GIT_DIFF_DISABLE_PATHSPEC_MATCH;
opts.old_prefix = "a"; opts.new_prefix = "b";