From 726d345a95c290e1f6800ae172e92ff710630d9c Mon Sep 17 00:00:00 2001 From: Ilya Grigoriev Date: Fri, 22 Nov 2024 20:12:38 -0800 Subject: [PATCH] cli `git push`: short alias -N for --allow-new I commonly end up typing it. It's long and hard to complete --- cli/src/commands/git/push.rs | 2 +- cli/tests/cli-reference@.md.snap | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/src/commands/git/push.rs b/cli/src/commands/git/push.rs index c536437a7d..d3608bf86f 100644 --- a/cli/src/commands/git/push.rs +++ b/cli/src/commands/git/push.rs @@ -118,7 +118,7 @@ pub struct GitPushArgs { /// Allow pushing new bookmarks /// /// Newly-created remote bookmarks will be tracked automatically. - #[arg(long, conflicts_with = "what")] + #[arg(long, short = 'N', conflicts_with = "what")] allow_new: bool, /// Allow pushing commits with empty descriptions #[arg(long)] diff --git a/cli/tests/cli-reference@.md.snap b/cli/tests/cli-reference@.md.snap index 65f7a86caa..1a058576ff 100644 --- a/cli/tests/cli-reference@.md.snap +++ b/cli/tests/cli-reference@.md.snap @@ -1174,7 +1174,7 @@ Before the command actually moves, creates, or deletes a remote bookmark, it mak * `--deleted` — Push all deleted bookmarks Only tracked bookmarks can be successfully deleted on the remote. A warning will be printed if any untracked bookmarks on the remote correspond to missing local bookmarks. -* `--allow-new` — Allow pushing new bookmarks +* `-N`, `--allow-new` — Allow pushing new bookmarks Newly-created remote bookmarks will be tracked automatically. * `--allow-empty-description` — Allow pushing commits with empty descriptions