From: Derrick Stolee <stolee@gmail.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
"Junio C Hamano" <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] merge: allow to pretend a merge into detached HEAD is made into a branch
Date: Mon, 20 Dec 2021 10:36:28 -0500 [thread overview]
Message-ID: <b52be977-f03c-7915-68c8-f1842e920184@gmail.com> (raw)
In-Reply-To: <211218.86sfuqw6ii.gmgdl@evledraar.gmail.com>
On 12/18/2021 5:27 AM, Ævar Arnfjörð Bjarmason wrote:
>
> On Fri, Dec 17 2021, Junio C Hamano wrote:
>
>> + OPT_STRING(0, "detached", &detached_head_name, N_("name"),
>> + N_("use <name> instead of detached HEAD")),
>> [...]
>> + OPT_STRING(0, "detached", &detached_head_name, N_("name"),
>> + N_("use <name> instead of detached HEAD")),
>
> Maybe OPT_STRING_F and PARSE_OPT_NONEG, or does --no-detached make
> sense?
While sometimes undocumented, these "--no-" options allows calling an
alias that might have the positive version included while disabling the
option.
git alias merge-main merge <lots-of-custom-things> --detached-head-name=main
git merge-main --no-detached-head-name
So, I think using the standard OPT_STRING here is fine.
Thanks,
-Stolee
next prev parent reply other threads:[~2021-12-20 15:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-18 0:56 [PATCH] merge: allow to pretend a merge into detached HEAD is made into a branch Junio C Hamano
2021-12-18 8:24 ` Sergey Organov
2021-12-20 15:55 ` Junio C Hamano
2021-12-20 22:53 ` [PATCH v2] merge: allow to pretend a merge is made into a different branch Junio C Hamano
2021-12-21 13:52 ` Derrick Stolee
2021-12-18 10:27 ` [PATCH] merge: allow to pretend a merge into detached HEAD is made into a branch Ævar Arnfjörð Bjarmason
2021-12-20 15:36 ` Derrick Stolee [this message]
2021-12-20 15:57 ` Junio C Hamano
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=b52be977-f03c-7915-68c8-f1842e920184@gmail.com \
--to=stolee@gmail.com \
--cc=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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).