From: Sergey Organov Date: Wed, 29 Apr 2020 19:50:41 GMT Subject: Re: [PATCH] branch: add '-' to delete previous branch Message-ID: <87v9likr5a.fsf@osv.gnss.ru> In-Reply-To: <20200429190013.GG83442@syl.local> Taylor Blau 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. "-" standing by itself in a command means stdin, stdout, or otherwise a typo. Using it for any other meaning is a blasphemy. Sure, nobody will die because of this, but it's /extremely/ confusing! BTW, what about mistyping: $ git branch -d - f my_branch for $ git branch -d -f my_branch or some such? No, it still doesn't look like a good idea to use isolated '-' as suggested by the patch. OTOH, for otherwise unusual @{-1}, @{-}, or @- I'd immediately realize I must consult the manual, so these would be fine with me. Thanks, -- Sergey