Re: [PATCH v2 2/3] rev-parse: add @{p} as a synonym for @{push}
- From
Jeff King <peff@peff.net>
- Date
- Mar 27, 2017, 02:53 UTC
- Message-ID
- <20170327025346.cwig3ulmyqcgqx7n@sigill.intra.peff.net>
- In-Reply-To
- <20170326121654.22035-3-avarab@gmail.com>
On Sun, Mar 26, 2017 at 12:16:53PM +0000, Ævar Arnfjörð Bjarmason wrote:
Show 6 quoted lines
> Add @{p} as a shorthand for @{push} for consistency with the @{u}
> shorthand for @{upstream}.
>
> This wasn't added when @{push} was introduced in commit
> adfe5d0434 ("sha1_name: implement @{push} shorthand", 2015-05-21), but
> it can be added without any ambiguity and saves the user some typing.It _can_ be added, but it was intentionally avoided at the time because there was discussion of adding other p-words, including:
- @{pull} as a synonym for @{upstream} (and to better match @{push}) - @{publish}, which was some similar-ish system that was based on
per-branch config, but the patches were never merged.It's been a few years with neither of those things happening, so in a sense it may be safe to add it now. OTOH, if users are not clamoring for @{p} and it is just being added "because we can", maybe that is not a good reason.
> -'<branchname>@\{push\}', e.g. 'master@\{push\}', '@\{push\}'::
> - The suffix '@\{push}' reports the branch "where we would push to" if
> +'<branchname>@\{push\}', e.g. 'master@\{push\}', '@\{p\}'::
> + The suffix '@\{push}' (short form '@\{push}') reports the branch "where we would push to" ifDid you mean to say "short form '@\{p}'"?-Peff