From: Junio C Hamano <gitster@pobox.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: Jeff King <peff@peff.net>,
git@vger.kernel.org,
Kaartic Sivaraam <kaartic.sivaraam@gmail.com>
Subject: Re: [PATCH v2 4/4] branch: make "-l" a synonym for "--list"
Date: Thu, 30 Aug 2018 11:48:55 -0700 [thread overview]
Message-ID: <xmqq4lfb667c.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <87wos8cjt8.fsf@evledraar.gmail.com> ("Ævar Arnfjörð Bjarmason"'s message of "Thu, 30 Aug 2018 10:58:27 +0200")
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
>> +-l::
>> --list::
>> List branches. With optional `<pattern>...`, e.g. `git
>> branch --list 'maint-*'`, list only the branches that match
>
> I think it's better to have something like this on top:
>
> diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt
> index 5552dfcec3..a03cb1ebc9 100644
> --- a/Documentation/git-branch.txt
> +++ b/Documentation/git-branch.txt
> @@ -163,6 +163,11 @@ This option is only applicable in non-verbose mode.
> This should not be confused with `git branch -l <branchname>`,
> which creates a branch named `<branchname>` with a reflog.
> See `--create-reflog` above for details.
> ++
> +
> +Until Git version 2.20 `-l` was the short form of
> +`--create-reflog`. As of version 2.19 using it would warn about a
> +future deprecation.
Doesn't your patch show a more grave issue with the current state of
'next'?
The sentence in the pre-context in your suggested patch says that
"--list" should not be confused with "git branch -l <branchname>",
but --list and -l are now synonyms in the new world order.
Worse yet, '-l' is no longer a way to create the branch with a
reflog; in the new world, you would say "--create-reflog" if you
want to do so. "git branch -l foo" would list branches that match
that pattern 'foo'.
In the SYNOPSIS section we still see "[-l]" listed; that also must
be replaced with "--create-reflog", or just dropped, as that is the
default.
I do not know if the documentation that is shipped in 2.20 should
talk about how the old world looked like, though. `-l` was a short
for `--create-reflog` is worth saying, but I do not see much value
in talking about the warning given in 2.19.
Thanks.
next prev parent reply other threads:[~2018-08-30 18:48 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-22 9:23 [PATCH v2 0/4] branch -l deprecation revisited Jeff King
2018-06-22 9:23 ` [PATCH v2 1/4] t3200: unset core.logallrefupdates when testing reflog creation Jeff King
2018-06-22 9:23 ` [PATCH v2 2/4] t: switch "branch -l" to "branch --create-reflog" Jeff King
2018-06-22 9:24 ` [PATCH v2 3/4] branch: deprecate "-l" option Jeff King
2018-06-22 22:34 ` Eric Sunshine
2018-06-22 22:43 ` Jeff King
2018-06-22 9:24 ` [PATCH v2 4/4] branch: make "-l" a synonym for "--list" Jeff King
2018-08-30 8:58 ` Ævar Arnfjörð Bjarmason
2018-08-30 18:48 ` Junio C Hamano [this message]
2018-08-30 19:53 ` Ævar Arnfjörð Bjarmason
2018-08-30 20:04 ` Jeff King
2018-08-30 20:29 ` Junio C Hamano
2018-08-30 20:50 ` Jeff King
2018-08-30 21:07 ` Ævar Arnfjörð Bjarmason
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=xmqq4lfb667c.fsf@gitster-ct.c.googlers.com \
--to=gitster@pobox.com \
--cc=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=kaartic.sivaraam@gmail.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).