From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Felipe Contreras <felipe.contreras@gmail.com>
Cc: git@vger.kernel.org, Jeff King <peff@peff.net>,
Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH 1/4] merge: simplify initialization
Date: Tue, 15 Jun 2021 21:27:56 +0200 [thread overview]
Message-ID: <87sg1iyl92.fsf@evledraar.gmail.com> (raw)
In-Reply-To: <20210613225836.1009569-2-felipe.contreras@gmail.com>
On Sun, Jun 13 2021, Felipe Contreras wrote:
> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
> ---
> builtin/merge-file.c | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/builtin/merge-file.c b/builtin/merge-file.c
> index 06a2f90c48..0186f4156a 100644
> --- a/builtin/merge-file.c
> +++ b/builtin/merge-file.c
> @@ -28,7 +28,7 @@ int cmd_merge_file(int argc, const char **argv, const char *prefix)
> const char *names[3] = { NULL, NULL, NULL };
> mmfile_t mmfs[3];
> mmbuffer_t result = {NULL, 0};
> - xmparam_t xmp = {{0}};
> + xmparam_t xmp = { .level = XDL_MERGE_ZEALOUS_ALNUM };
> int ret = 0, i = 0, to_stdout = 0;
> int quiet = 0;
> struct option options[] = {
> @@ -48,10 +48,6 @@ int cmd_merge_file(int argc, const char **argv, const char *prefix)
> OPT_END(),
> };
>
> - xmp.level = XDL_MERGE_ZEALOUS_ALNUM;
> - xmp.style = 0;
> - xmp.favor = 0;
> -
> if (startup_info->have_repository) {
> /* Read the configuration file */
> git_config(git_xmerge_config, NULL);
Looks good, maybe we can fix the similar code in ll_xdl_merge() while
we're at it?
Also, not a problem in your commit, but we check for that constant in
only one place, as:
XDL_MERGE_ZEALOUS < level
Urgh, do you know if there's some reason we're not doing level ==
XDL_MERGE_ZEALOUS_ALNUM, or at least level >= XDL_MERGE_ZEALOUS_ALNUM
there?
next prev parent reply other threads:[~2021-06-15 19:35 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-13 22:58 [PATCH 0/4] merge: cleanups and fix Felipe Contreras
2021-06-13 22:58 ` [PATCH 1/4] merge: simplify initialization Felipe Contreras
2021-06-15 19:27 ` Ævar Arnfjörð Bjarmason [this message]
2021-06-17 22:35 ` Felipe Contreras
2021-06-13 22:58 ` [PATCH 2/4] merge: fix Yoda conditions Felipe Contreras
2021-06-13 22:58 ` [PATCH 3/4] xdiff/xmerge: simplify xdl_recs_copy_0 Felipe Contreras
2021-06-13 22:58 ` [PATCH 4/4] xdiff/xmerge: fix chg0 initialization Felipe Contreras
2021-06-14 15:34 ` Elijah Newren
2021-06-15 7:51 ` Felipe Contreras
2021-06-15 15:21 ` Elijah Newren
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87sg1iyl92.fsf@evledraar.gmail.com \
--to=avarab@gmail.com \
--cc=felipe.contreras@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).