git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Jean-Noël Avila" <jn.avila@free.fr>
Cc: Lucas Seiki Oshiro <lucasseikioshiro@gmail.com>,
	 git@vger.kernel.org, Elijah Newren <newren@gmail.com>
Subject: Re: [GSoC][PATCH v2] merge-strategies.adoc: detail submodule merge
Date: Fri, 21 Feb 2025 10:07:55 -0800	[thread overview]
Message-ID: <xmqqy0xz9nno.fsf@gitster.g> (raw)
In-Reply-To: <70b76a89-00a4-4ba6-92f2-4fb46981317d@free.fr> ("Jean-Noël Avila"'s message of "Fri, 21 Feb 2025 11:17:41 +0100")

Jean-Noël Avila <jn.avila@free.fr> writes:

>> @@ -95,6 +102,13 @@ recursive::
>>  	renames.  It does not make use of detected copies.  This was
>>  	the default strategy for resolving two heads from Git v0.99.9k
>>  	until v2.33.0.
>> +
>> +        In the case where the path is a submodule, if the submodule commit
>> +        used on one side of the merge is a descendant of the submodule
>> +        commit used on the other side of the merge, Git attempts to
>> +        fast-forward to the descendant. Otherwise, Git will treat this case
>> +        as a conflict, suggesting as a resolution a submodule commit that
>> +        is descendant of the conflicting ones, if one exists.
>>  +
>>  The 'recursive' strategy takes the same options as 'ort'.  However,
>>  there are three additional options that 'ort' ignores (not documented
>
>
> If both chunks are meant to be kept identical, I would recommend to
> define an attribute (see
> https://docs.asciidoctor.org/asciidoc/latest/attributes/custom-attributes/)
> and use it at both sites.

Wouldn't it be a bit awkward to maintain a six-line paragraph as a
custom attribute, though [*1*]?  Would the resulting text become
like (without indentation) this?

  :submodule-merge: \
  In the case where the path is a submodule, if the submodule commit \
  used on one side of the merge is a descendant of the submodule \
  commit used on the other side of the merge, Git attempts to \
  fast-forward to the descendant. Otherwise, Git will treat this case \
  as a conflict, suggesting as a resolution a submodule commit that \
  is descendant of the conflicting ones, if one exists.

  recursive::
          ...
          the default strategy for resolving two heads from Git v0.99.9k
          until v2.33.0.
  +
  {submodule-merge}
  +
  The 'recursive strategy takes the same options as ...


Just as in C preprocessor macros in *.h files, I am reluctant to
force our people to edit long multi-line text while not forgetting
to lose the backslash for line continuation (or misplace existing
ones when wrapping lines).

And of course a 6-line paragraph is not large enough to put in a
separate file to be included.

Hmph...

Thanks.



[Reference]

*1* 
https://github.com/asciidoctor/asciidoctor/issues/1341#issuecomment-101841014

  reply	other threads:[~2025-02-21 18:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-20 15:12 [GSoC][PATCH v2] merge-strategies.adoc: detail submodule merge Lucas Seiki Oshiro
2025-02-20 18:46 ` D. Ben Knoble
2025-02-20 19:12 ` Junio C Hamano
2025-02-21 10:17 ` Jean-Noël Avila
2025-02-21 18:07   ` Junio C Hamano [this message]
2025-02-22 19:36     ` Lucas Seiki Oshiro
2025-02-22 22:17       ` Junio C Hamano
2025-02-24 17:31         ` D. Ben Knoble
2025-02-21 21:56 ` 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=xmqqy0xz9nno.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=jn.avila@free.fr \
    --cc=lucasseikioshiro@gmail.com \
    --cc=newren@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.
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).