Re: [PATCH] branch: issue "-l" deprecation warning after pager starts
- From
Kaartic Sivaraam <kaartic.sivaraam@gmail.com>
- Date
- May 26, 2018, 19:39 UTC
- Message-ID
- <1527363575.10290.3.camel@gmail.com>
- In-Reply-To
- <20180525024002.GA1998@sigill.intra.peff.net>
On Friday 25 May 2018 08:10 AM, Jeff King wrote:
Show 13 quoted lines
> Subject: [PATCH] branch: customize "-l" warning in list mode > > People mistakenly use "git branch -l", thinking that it > triggers list mode. It doesn't, but the lack of non-option > arguments in that command does (and the "-l" becomes a > silent noop). > > Since afc968e579 (branch: deprecate "-l" option, 2018-03-26) > > we've warned that "-l" is going away. But the warning text > is primarily aimed at people who _meant_ to use "-l", as in > "git branch -l foo". People who mistakenly said "git branch > -l" may be left puzzled. >
So, this patch is to improve the user experience of people who use "git branch -l" for listing and not for the people who forget to give a new branch name argument for "-l". In that case, this makes sense.
BTW, I hope people don't start wondering why "git branch -d" doesn't trigger list mode ;-)
> + warning("the '-l' option is an alias for '--create-reflog' and");
> + warning("has no effect in list mode. This option will soon be");
> + warning("removed and you should omit it (or use '--list' instead).");I suppose s/alias/deprecated alias/ makes the point that '-l' will be removed more stronger.
-- Sivaraam