Re: [PATCH] branch -l: print useful info whilst rebasing a non-local branch
- From
Kaartic Sivaraam <kaartic.sivaraam@gmail.com>
- Date
- Mar 25, 2018, 06:54 UTC
- Message-ID
- <75722545-fe6e-322e-0485-70ec6b606cbf@gmail.com>
- In-Reply-To
- <20180325043337.GA32465@sigill.intra.peff.net>
On Sunday 25 March 2018 10:03 AM, Jeff King wrote:
Show 5 quoted lines
> ... > but I'd prefer to avoid those kinds of magic rules if we can. They're > very hard to explain to the user, and can be quite baffling when they go > wrong. >
I fell the same too.
Show 17 quoted lines
> IMHO we should do one of: > > 1. Nothing. ;) > > 2. Complain about "-l" in list mode to help educate users about the > current craziness. > > 3. Drop "-l" (probably with a deprecation period); it seems unlikely > to me that anybody uses it for branch creation, and this would at > least reduce the confusion (then it would just be "so why don't we > have -l" instead of "why is -l not what I expect"). > > 4. Repurpose "-l" as a shortcut for --list (also after a deprecation > period). This is slightly more dangerous in that it may confuse > people using multiple versions of Git that cross the deprecation > line. But that's kind of what the deprecation period is for... >
I think we should do 2 as a short term fix for sure. For the long term, I would prefer 4 as I think most users would expect "-l" to be a shortcut for "--list" particularly given the current situation that "git branch -l" lists all the branch names.
That said, I would not mind considering 3 if 4 has more bad consequences than the good it does (but I heavily doubt it ;-) ).
I don't consider 1 to be an option ;-)
-- Kaartic