Re: [PATCH v3 2/2] merge-tree: add a new --dry-run flag
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 15, 2025, 13:07 UTC
- Message-ID
- <xmqqbjru3tu8.fsf@gitster.g>
- In-Reply-To
- <f11824317a8050764fe35698039f863dd842b0c2.1747182288.git.gitgitgadget@gmail.com>
"Elijah Newren via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 6 quoted lines
> +--dry-run:: > + Disable all output from the program. Useful when you are only > + interested in the exit status. Allows merge-tree to exit > + early when it finds a conflict, and allows it to avoid writing > + most objects created by merges. > +
OK.
Show 15 quoted lines
> @@ -583,6 +593,18 @@ int cmd_merge_tree(int argc, > argc = parse_options(argc, argv, prefix, mt_options, > merge_tree_usage, PARSE_OPT_STOP_AT_NON_OPTION); > > + if (dry_run && o.show_messages == -1) > + o.show_messages = 0; > + o.merge_options.mergeability_only = dry_run; > + die_for_incompatible_opt2(dry_run, "--dry-run", > + o.show_messages, "--messages"); > + die_for_incompatible_opt2(dry_run, "--dry-run", > + o.name_only, "--name-only"); > + die_for_incompatible_opt2(dry_run, "--dry-run", > + o.use_stdin, "--stdin"); > + die_for_incompatible_opt2(dry_run, "--dry-run", > + !line_termination, "-z");
Ah, I missed this one. Would have been caught in the previous round if we had test coverage for incompatible options.
This round looks quite sensible to me. Queued. Thanks.