summaryrefslogtreecommitdiff
path: root/builtin/am.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2019-04-25 16:41:12 +0900
committerLibravatar Junio C Hamano <gitster@pobox.com>2019-04-25 16:41:12 +0900
commitdcd6a8c09a36a500c4e612a52eba1c6c5e298951 (patch)
tree79ed79645190bf1c49996f2b9aec5e349eb96400 /builtin/am.c
parentMerge branch 'jk/unused-params-even-more' (diff)
parentam: avoid diff_opt_parse() (diff)
downloadtgif-dcd6a8c09a36a500c4e612a52eba1c6c5e298951.tar.xz
Merge branch 'nd/diff-parseopt-4'
Fourth batch to teach the diff machinery to use the parse-options API. * nd/diff-parseopt-4: am: avoid diff_opt_parse() diff --no-index: use parse_options() instead of diff_opt_parse() range-diff: use parse_options() instead of diff_opt_parse() diff.c: allow --no-color-moved-ws diff-parseopt: convert --color-moved-ws diff-parseopt: convert --[no-]color-moved diff-parseopt: convert --inter-hunk-context diff-parseopt: convert --no-prefix diff-parseopt: convert --line-prefix diff-parseopt: convert --[src|dst]-prefix diff-parseopt: convert --[no-]abbrev diff-parseopt: convert --diff-filter diff-parseopt: convert --find-object diff-parseopt: convert -O diff-parseopt: convert --pickaxe-all|--pickaxe-regex diff-parseopt: convert -S|-G diff-parseopt: convert -l diff-parseopt: convert -z diff-parseopt: convert --ita-[in]visible-in-index diff-parseopt: convert --ws-error-highlight
Diffstat (limited to 'builtin/am.c')
-rw-r--r--builtin/am.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/am.c b/builtin/am.c
index 4fb107a9d1..3ba5723c2c 100644
--- a/builtin/am.c
+++ b/builtin/am.c
@@ -1501,11 +1501,11 @@ static int fall_back_threeway(const struct am_state *state, const char *index_pa
* review them with extra care to spot mismerges.
*/
struct rev_info rev_info;
- const char *diff_filter_str = "--diff-filter=AM";
repo_init_revisions(the_repository, &rev_info, NULL);
rev_info.diffopt.output_format = DIFF_FORMAT_NAME_STATUS;
- diff_opt_parse(&rev_info.diffopt, &diff_filter_str, 1, rev_info.prefix);
+ rev_info.diffopt.filter |= diff_filter_bit('A');
+ rev_info.diffopt.filter |= diff_filter_bit('M');
add_pending_oid(&rev_info, "HEAD", &our_tree, 0);
diff_setup_done(&rev_info.diffopt);
run_diff_index(&rev_info, 1);