Re: [PATCH] branch: allow "-" as a short-hand for "previous branch"
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Aug 13, 2022, 22:28 UTC
- Message-ID
- <xmqqczd393s7.fsf@gitster.g>
- In-Reply-To
- <be21e2ba-1c57-a5aa-a986-64413f3983c3@gmail.com>
Rubén Justo <rjusto@gmail.com> writes:
> Previous to this, I thought about making also a "git diff -", > ... > Also discarded the "git diff -" change, because of so many flags and > conditions "diff" has. So I only sent the "branch -" patch.
Yeah, that is why the approach Johannes showed, i.e. instead of making "in this context but not in that context, '-' means 'previous'" changes to random commands, teaching anybody that takes @{-1} to understand that '-' means 'previous' everywhere, appears very tempting.