From: Phillip Wood <phillip.wood123@gmail.com>
To: Felipe Contreras <felipe.contreras@gmail.com>, git@vger.kernel.org
Cc: "David Aguilar" <davvid@gmail.com>,
"Junio C Hamano" <gitster@pobox.com>,
"Sergey Organov" <sorganov@gmail.com>,
"Bagas Sanjaya" <bagasdotme@gmail.com>,
"Elijah Newren" <newren@gmail.com>,
"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
"Denton Liu" <liu.denton@gmail.com>
Subject: Re: [PATCH 5/7] xdiff: rename XDL_MERGE_STYLE_DIFF3
Date: Thu, 10 Jun 2021 10:21:42 +0100 [thread overview]
Message-ID: <3168eb15-25a6-a3eb-a498-8effa0c79855@gmail.com> (raw)
In-Reply-To: <20210609192842.696646-6-felipe.contreras@gmail.com>
On 09/06/2021 20:28, Felipe Contreras wrote:
The subject would make more sense as 'xdiff: rename XDL_MERGE_DIFF3 to
XDL_MERGE_STYLE_DIFF3' rather than using the new name of the constant alone.
> If we don't specify we are talking about a style, XDL_MERGE_MINIMAL
> could be confused with a valid value instead of XDL_MERGE_DIFF3, which
> it isn't.
I don't object to the rename but what is the source of the confusion
with XDL_MERGE_MINIMAL?
Best Wishes
Phillip
> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
> ---
> builtin/merge-file.c | 2 +-
> xdiff-interface.c | 2 +-
> xdiff/xdiff.h | 2 +-
> xdiff/xmerge.c | 4 ++--
> 4 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/builtin/merge-file.c b/builtin/merge-file.c
> index 06a2f90c48..a4097a596f 100644
> --- a/builtin/merge-file.c
> +++ b/builtin/merge-file.c
> @@ -33,7 +33,7 @@ int cmd_merge_file(int argc, const char **argv, const char *prefix)
> int quiet = 0;
> struct option options[] = {
> OPT_BOOL('p', "stdout", &to_stdout, N_("send results to standard output")),
> - OPT_SET_INT(0, "diff3", &xmp.style, N_("use a diff3 based merge"), XDL_MERGE_DIFF3),
> + OPT_SET_INT(0, "diff3", &xmp.style, N_("use a diff3 based merge"), XDL_MERGE_STYLE_DIFF3),
> OPT_SET_INT(0, "ours", &xmp.favor, N_("for conflicts, use our version"),
> XDL_MERGE_FAVOR_OURS),
> OPT_SET_INT(0, "theirs", &xmp.favor, N_("for conflicts, use their version"),
> diff --git a/xdiff-interface.c b/xdiff-interface.c
> index 609615db2c..64e2c4e301 100644
> --- a/xdiff-interface.c
> +++ b/xdiff-interface.c
> @@ -307,7 +307,7 @@ int git_xmerge_config(const char *var, const char *value, void *cb)
> if (!value)
> die("'%s' is not a boolean", var);
> if (!strcmp(value, "diff3"))
> - git_xmerge_style = XDL_MERGE_DIFF3;
> + git_xmerge_style = XDL_MERGE_STYLE_DIFF3;
> else if (!strcmp(value, "merge"))
> git_xmerge_style = 0;
> /*
> diff --git a/xdiff/xdiff.h b/xdiff/xdiff.h
> index 7a04605146..45883f5eb3 100644
> --- a/xdiff/xdiff.h
> +++ b/xdiff/xdiff.h
> @@ -64,7 +64,7 @@ extern "C" {
> #define XDL_MERGE_FAVOR_UNION 3
>
> /* merge output styles */
> -#define XDL_MERGE_DIFF3 1
> +#define XDL_MERGE_STYLE_DIFF3 1
>
> typedef struct s_mmfile {
> char *ptr;
> diff --git a/xdiff/xmerge.c b/xdiff/xmerge.c
> index 1659edb453..f6916a4ba4 100644
> --- a/xdiff/xmerge.c
> +++ b/xdiff/xmerge.c
> @@ -230,7 +230,7 @@ static int fill_conflict_hunk(xdfenv_t *xe1, const char *name1,
> size += xdl_recs_copy(xe1, m->i1, m->chg1, needs_cr, 1,
> dest ? dest + size : NULL);
>
> - if (style == XDL_MERGE_DIFF3) {
> + if (style == XDL_MERGE_STYLE_DIFF3) {
> /* Shared preimage */
> if (!dest) {
> size += marker_size + 1 + needs_cr + marker3_size;
> @@ -482,7 +482,7 @@ static int xdl_do_merge(xdfenv_t *xe1, xdchange_t *xscr1,
> int style = xmp->style;
> int favor = xmp->favor;
>
> - if (style == XDL_MERGE_DIFF3) {
> + if (style == XDL_MERGE_STYLE_DIFF3) {
> /*
> * "diff3 -m" output does not make sense for anything
> * more aggressive than XDL_MERGE_EAGER.
>
next prev parent reply other threads:[~2021-06-10 9:22 UTC|newest]
Thread overview: 69+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-09 19:28 [PATCH 0/7] Make diff3 the default conflict style Felipe Contreras
2021-06-09 19:28 ` [PATCH 1/7] test: add merge style config test Felipe Contreras
2021-06-09 19:42 ` Eric Sunshine
2021-06-09 20:29 ` Felipe Contreras
2021-06-10 9:18 ` Phillip Wood
2021-06-10 13:26 ` Felipe Contreras
2021-06-10 14:54 ` Phillip Wood
2021-06-10 16:34 ` Felipe Contreras
2021-06-10 14:58 ` Phillip Wood
2021-06-10 16:47 ` Felipe Contreras
2021-06-11 9:19 ` Phillip Wood
2021-06-11 14:39 ` Felipe Contreras
2021-06-09 19:28 ` [PATCH 2/7] merge-tree: fix merge.conflictstyle handling Felipe Contreras
2021-06-09 19:28 ` [PATCH 3/7] notes: " Felipe Contreras
2021-06-09 19:28 ` [PATCH 4/7] checkout: " Felipe Contreras
2021-06-10 9:32 ` Phillip Wood
2021-06-10 14:11 ` Felipe Contreras
2021-06-10 14:50 ` Phillip Wood
2021-06-10 16:32 ` Felipe Contreras
2021-06-11 9:18 ` Phillip Wood
2021-06-11 14:34 ` Felipe Contreras
2021-06-11 9:18 ` Phillip Wood
2021-06-09 19:28 ` [PATCH 5/7] xdiff: rename XDL_MERGE_STYLE_DIFF3 Felipe Contreras
2021-06-10 9:21 ` Phillip Wood [this message]
2021-06-10 13:33 ` Felipe Contreras
2021-06-11 3:17 ` Junio C Hamano
2021-06-11 13:42 ` Felipe Contreras
2021-06-09 19:28 ` [PATCH 6/7] xdiff: simplify style assignments Felipe Contreras
2021-06-10 9:26 ` Phillip Wood
2021-06-10 13:50 ` Felipe Contreras
2021-06-09 19:28 ` [PATCH 7/7] xdiff: make diff3 the default conflictStyle Felipe Contreras
2021-06-10 6:41 ` Johannes Sixt
2021-06-10 7:53 ` Đoàn Trần Công Danh
2021-06-10 13:18 ` Felipe Contreras
2021-06-10 13:18 ` Felipe Contreras
2021-06-10 13:49 ` Jeff King
2021-06-10 16:00 ` Felipe Contreras
2021-06-10 16:31 ` Jeff King
2021-06-11 1:20 ` Junio C Hamano
2021-06-11 6:23 ` Johannes Sixt
2021-06-11 6:43 ` Junio C Hamano
2021-06-11 7:02 ` Johannes Sixt
2021-06-11 7:14 ` Junio C Hamano
2021-06-11 11:51 ` Sergey Organov
2021-06-11 15:32 ` Felipe Contreras
2021-06-11 15:52 ` Sergey Organov
2021-06-11 16:36 ` Felipe Contreras
[not found] ` <CABPp-BHRQSF2_aYTBfpfnW4Bh3Hz7vLFj_QNGj8R4WeCS6_utw@mail.gmail.com>
2021-06-11 17:57 ` Felipe Contreras
2021-06-11 19:02 ` Elijah Newren
2021-06-11 21:05 ` Felipe Contreras
2021-06-11 21:40 ` Elijah Newren
2021-06-13 14:34 ` Felipe Contreras
2021-06-11 16:41 ` Johannes Sixt
2021-06-11 17:21 ` Felipe Contreras
2021-06-11 17:40 ` Sergey Organov
2021-06-11 18:10 ` Felipe Contreras
2021-06-11 18:22 ` Sergey Organov
2021-06-11 14:28 ` Felipe Contreras
2021-06-11 14:25 ` Felipe Contreras
2021-06-11 16:53 ` Johannes Sixt
[not found] ` <CABPp-BH0aRiSUw03nSK6jHRNQ+zcpUzr6WjeJ5GpdUCqCKxbag@mail.gmail.com>
2021-06-11 17:32 ` Felipe Contreras
2021-06-11 17:57 ` Elijah Newren
2021-06-11 18:28 ` Felipe Contreras
2021-06-11 14:20 ` Felipe Contreras
2021-06-11 14:09 ` Felipe Contreras
2021-06-10 9:40 ` Phillip Wood
2021-06-10 14:19 ` Felipe Contreras
2021-06-17 17:40 ` [PATCH 0/7] Make diff3 the default conflict style Phillip Wood
2021-06-17 18:24 ` Felipe Contreras
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3168eb15-25a6-a3eb-a498-8effa0c79855@gmail.com \
--to=phillip.wood123@gmail.com \
--cc=avarab@gmail.com \
--cc=bagasdotme@gmail.com \
--cc=davvid@gmail.com \
--cc=felipe.contreras@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=liu.denton@gmail.com \
--cc=newren@gmail.com \
--cc=phillip.wood@dunelm.org.uk \
--cc=sorganov@gmail.com \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).