git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2 4/4] branch: make "-l" a synonym for "--list"

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Aug 30, 2018, 21:07 UTC
Message-ID
<87h8jbd0lv.fsf@evledraar.gmail.com>
In-Reply-To
<20180830205033.GA27399@sigill.intra.peff.net>
On Thu, Aug 30 2018, Jeff King wrote:
Show 21 quoted lines
> On Thu, Aug 30, 2018 at 01:29:53PM -0700, Junio C Hamano wrote:
>
>> >> > 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.
>> >>
>> >> I'm anticipating that there will be users in the wild with similar -l
>> >> invocations, noting this helps them, because they'll be wondering what
>> >> some script that does "git branch -l <name>" is trying to do while
>> >> reading our docs.
>> >
>> > I don't have a strong opinion either way. If we do mention it, it should
>> > probably be short ("Until Git v2.20, the `-l` option was a synonym for
>> > `--create-reflog").
>>
>> I agree that the short one would of course be good.  I am on the
>> fence about mentioning the warning only given in 2.19.
>
> Yeah, I was confused about that part of the thread. Is there something
> proposed to (additionally) go into v2.19? Ævar, can you elaborate?

The patch I proposed was badly worded and on reflection I don't think it's useful to include this, but FWIW what I meant was:

 * 1. <2.19: -l is --create-reflog
 * 2. =2.19: -l is --create-reflog, but will spew a warning to stderr about futre deprecation
 * 3. >2.19: -l is --list

I.e. should we in >2.19 docs say that -l used to mean something different <= 2.19? Yeah, but it's probably worthless information to say that it used to warn in that one release, since the actionable thing to do with this information is to change it to --create-reflog, and unlike going from >2.19 to <2.19 running =2.19 isn't silently going to treat the -l option in a way you might not expect.

Previous: Jeff King
Message 14 of 14 in “branch -l deprecation revisited”
  1. 0/4 branch -l deprecation revisitedJeff King, Jun 22, 2018
  2. 1/4 t3200: unset core.logallrefupdates when testing reflog creationJeff King, Jun 22, 2018
  3. 2/4 t: switch "branch -l" to "branch --create-reflog"Jeff King, Jun 22, 2018
  4. 3/4 branch: deprecate "-l" optionJeff King, Jun 22, 2018
  5. Eric SunshineJun 22, 2018
  6. Jeff KingJun 22, 2018
  7. 4/4 branch: make "-l" a synonym for "--list"Jeff King, Jun 22, 2018
  8. Ævar Arnfjörð BjarmasonAug 30, 2018
  9. Junio C HamanoAug 30, 2018
  10. Ævar Arnfjörð BjarmasonAug 30, 2018
  11. Jeff KingAug 30, 2018
  12. Junio C HamanoAug 30, 2018
  13. Jeff KingAug 30, 2018
  14. Ævar Arnfjörð BjarmasonAug 30, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.