On Thu, May 17 2018, Kaartic Sivaraam wrote:
> On Thursday 17 May 2018 11:31 AM, Junio C Hamano wrote:
>> * jk/branch-l-0-deprecation (2018-03-26) 3 commits
>> The "-l" option in "git branch -l" is an unfortunate short-hand for
>> "--create-reflog", but many users, both old and new, somehow expect
>> it to be something else, perhaps "--list". This step deprecates
>> the short-hand and warns about the future removal of the it when it
>> is used.
>> Will cook in 'next'.
>> Perhaps merge to 'master' immediately after 2.18 release?
> I still have a slight feeling that we shouldn't list the branches for
> "git branch -l" during the deprecation period. If feel this because
> i) It would avoid confusions for the users during the
> deprecation period
> ii) The warning message seems to add to the confusion:
> $ git branch -l
> warning: the '-l' alias for '--create-reflog' is deprecated;
> warning: it will be removed in a future version of Git
> * master
> If there are ample branches, the warning message might be
> hidden out of screen but we shouldn't rely on that, I
Also if we have lots of branches, depending on your pager settings you
won't see this at all, I have:
PAGER=less LESS="--IGNORE-CASE --LONG-PROMPT --QUIET --chop-long-lines
--RAW-CONTROL-CHARS --no-init --quit-if-one-screen"
I've ended up with that $LESS setting via hackery over the years, so
maybe I'm doing something retarded, minimal test case:
PAGER=less LESS="--no-init --quit-if-one-screen" git branch -l
So with those two options I don't get the stderr output at all, but if I
remove either one of those options once I quit the pager I get the
output at the end.
So I think this is probably OK for most users, if the have very few
branches they'll see it, and then if they use default pager settings
they'll see the stderr output once they quit the pager. I don't know how
common my (mis)configuration is.