Re: [PATCH] branch: add '-' to delete previous branch
- From
Sergey Organov <sorganov@gmail.com>
- Date
- Apr 29, 2020, 20:26 UTC
- Message-ID
- <87imhihwbw.fsf@osv.gnss.ru>
- In-Reply-To
- <20200429195745.GC3920@syl.local>
Taylor Blau <me@ttaylorr.com> writes:
Show 13 quoted lines
> On Wed, Apr 29, 2020 at 10:50:41PM +0300, Sergey Organov wrote: >> Taylor Blau <me@ttaylorr.com> writes: >> >> [...] >> >> > In my opinion, it is fairly clear that 'git branch -D -' means "delete >> > the last branch", and not "delete a list of branches from stdin. >> >> Honestly, I'd never guess it'd "delete the last branch". No way. > > I'm having trouble understanding why. This is how 'git checkout -' > behaves, so I have no idea why 'git branch' wouldn't work the same > way.
Well, if I knew 'git checkout -' does this, then yes, it'd be obvious. The problem is that I didn't. Well, then, as I said in my original reaction, I'm probably too late on this.
BTW, it was not that easy to find it in the "git help checkout" even when I was specifically looking for it.
Thanks, -- Sergey