From 23f2ac8dfcc8e3d0d3fd7a2d383f85c71c510d86 Mon Sep 17 00:00:00 2001 From: Michael Gattozzi Date: Thu, 9 May 2024 13:49:38 -0400 Subject: [PATCH] fix: address review feedback --- cli/src/commands/git.rs | 2 +- cli/tests/cli-reference@.md.snap | 3 ++- cli/tests/test_git_push.rs | 7 ------- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/cli/src/commands/git.rs b/cli/src/commands/git.rs index 19ef027bf6..457855059e 100644 --- a/cli/src/commands/git.rs +++ b/cli/src/commands/git.rs @@ -220,7 +220,7 @@ pub struct GitPushArgs { /// correspond to missing local branches. #[arg(long)] deleted: bool, - /// Push branches that contain empty descriptions + /// Push branches with commits that contain empty descriptions #[arg(long)] allow_empty_description: bool, /// Push branches pointing to these commits (can be repeated) diff --git a/cli/tests/cli-reference@.md.snap b/cli/tests/cli-reference@.md.snap index 38e4a9d991..09970d0ccb 100644 --- a/cli/tests/cli-reference@.md.snap +++ b/cli/tests/cli-reference@.md.snap @@ -1,5 +1,6 @@ --- source: cli/tests/test_generate_md_cli_help.rs +description: "AUTO-GENERATED FILE, DO NOT EDIT. This cli reference is generated as an `insta` snapshot. MkDocs follows they symlink from docs/cli-reference.md to the snap. Unfortunately, `insta` unavoidably creates this header. Luckily, MkDocs ignores the header since it has the same format as Markdown headers. TODO: MkDocs may fail on Windows if symlinks are not enabled in the OS settings" --- @@ -930,7 +931,7 @@ By default, pushes any branches pointing to `remote_branches(remote=)..@ Possible values: `true`, `false` -* `--allow-empty-description` — Push branches that contain empty descriptions +* `--allow-empty-description` — Push branches with commits that contain empty descriptions Possible values: `true`, `false` diff --git a/cli/tests/test_git_push.rs b/cli/tests/test_git_push.rs index 59b0088cc7..65e2a568e5 100644 --- a/cli/tests/test_git_push.rs +++ b/cli/tests/test_git_push.rs @@ -642,13 +642,6 @@ fn test_git_push_no_description() { insta::assert_snapshot!(stderr, @r###" Error: Won't push commit 5b36783cd11c since it has no description "###); -} - -#[test] -fn test_git_allow_push_no_description() { - let (test_env, workspace_root) = set_up(); - test_env.jj_cmd_ok(&workspace_root, &["branch", "create", "my-branch"]); - test_env.jj_cmd_ok(&workspace_root, &["describe", "-m="]); test_env.jj_cmd_ok( &workspace_root, &[