Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
Fix extra linebreak after demo comments in help output (#795)
Maximilian Rooseaadf1314bad
diff --git a/docs/content/list.md b/docs/content/list.mdindex dc4344aa0..3c9aab74b 100644--- a/docs/content/list.md+++ b/docs/content/list.md@@ -18,7 +18,6 @@ Shows uncommitted changes, divergence from the default branch and remote, and op<img src="/assets/docs/light/wt-list.gif" alt="wt list demo" width="1600" height="900"></picture></figure>-The table renders progressively: branch names, paths, and commit hashes appear immediately, then status, divergence, and other columns fill in as background git operations complete. With `--full`, CI status fetches from the network — the table displays instantly and CI fills in as results arrive.## Examplesdiff --git a/docs/content/merge.md b/docs/content/merge.mdindex c09099d06..9138cd046 100644--- a/docs/content/merge.md+++ b/docs/content/merge.md@@ -18,7 +18,6 @@ Unlike `git merge`, this merges current into target (not target into current). S<img src="/assets/docs/light/wt-merge.gif" alt="wt merge demo" width="1600" height="900"></picture></figure>-## ExamplesMerge to the default branch:diff --git a/src/cli/mod.rs b/src/cli/mod.rsindex 2eee0b245..8a29bafe2 100644--- a/src/cli/mod.rs+++ b/src/cli/mod.rs@@ -413,7 +413,6 @@ To change which branch a worktree is on, use `git switch` inside that worktree.after_long_help = r#"Shows uncommitted changes, divergence from the default branch and remote, and optional CI status.<!-- demo: wt-list.gif 1600x900 -->-The table renders progressively: branch names, paths, and commit hashes appear immediately, then status, divergence, and other columns fill in as background git operations complete. With `--full`, CI status fetches from the network — the table displays instantly and CI fills in as results arrive.## Examples@@ -800,7 +799,6 @@ Removal runs in the background by default (returns immediately). Logs are writteafter_long_help = r#"Unlike `git merge`, this merges current into target (not target into current). Similar to clicking "Merge pull request" on GitHub, but locally. Target defaults to the default branch.<!-- demo: wt-merge.gif 1600x900 -->-## ExamplesMerge to the default branch:diff --git a/tests/integration_tests/help.rs b/tests/integration_tests/help.rsindex 753f2d9d2..b8e06078c 100644--- a/tests/integration_tests/help.rs+++ b/tests/integration_tests/help.rs@@ -22,6 +22,21 @@ fn snapshot_help(test_name: &str, args: &[&str]) {settings.bind(|| {let mut cmd = wt_command();cmd.args(args);++ // Check for double blank lines before snapshotting.+ // Double blanks indicate formatting issues (e.g., HTML comments like+ // `<!-- demo: file.gif -->` with blank lines on both sides).+ let output = cmd.output().expect("failed to run command");+ let stderr = String::from_utf8_lossy(&output.stderr);+ assert!(+ !stderr.contains("\n\n\n"),+ "Double blank line in help output for `wt {}`",+ args.join(" ")+ );++ // Re-run for snapshot (assert_cmd_snapshot needs the Command)+ let mut cmd = wt_command();+ cmd.args(args);assert_cmd_snapshot!(test_name, cmd);});}diff --git a/tests/snapshots/integration__integration_tests__help__help_list_long.snap b/tests/snapshots/integration__integration_tests__help__help_list_long.snapindex 02a7a09fa..fa3476c22 100644--- a/tests/snapshots/integration__integration_tests__help__help_list_long.snap+++ b/tests/snapshots/integration__integration_tests__help__help_list_long.snap@@ -65,7 +65,6 @@ Usage: [1m[36mwt list[0m [36m[OPTIONS][0mShows uncommitted changes, divergence from the default branch and remote, and optional CI status.-The table renders progressively: branch names, paths, and commit hashes appear immediately, then status, divergence, and other columns fill in as background git operations complete. With [2m--full[0m, CI status fetches from the network — the table displays instantly and CI fills in as results arrive.[1m[32mExamples[0mdiff --git a/tests/snapshots/integration__integration_tests__help__help_list_narrow_80.snap b/tests/snapshots/integration__integration_tests__help__help_list_narrow_80.snapindex 890936e69..993238c62 100644--- a/tests/snapshots/integration__integration_tests__help__help_list_narrow_80.snap+++ b/tests/snapshots/integration__integration_tests__help__help_list_narrow_80.snap@@ -67,7 +67,6 @@ Usage: [1m[36mwt list[0m [36m[OPTIONS][0mShows uncommitted changes, divergence from the default branch and remote, andoptional CI status.-The table renders progressively: branch names, paths, and commit hashes appearimmediately, then status, divergence, and other columns fill in as backgroundgit operations complete. With [2m--full[0m, CI status fetches from the network — thediff --git a/tests/snapshots/integration__integration_tests__help__help_md_merge.snap b/tests/snapshots/integration__integration_tests__help__help_md_merge.snapindex 1b59d8e28..04c1d9f78 100644--- a/tests/snapshots/integration__integration_tests__help__help_md_merge.snap+++ b/tests/snapshots/integration__integration_tests__help__help_md_merge.snap@@ -75,7 +75,6 @@ Global Options:Unlike `git merge`, this merges current into target (not target into current). Similar to clicking "Merge pull request" on GitHub, but locally. Target defaults to the default branch.<!-- demo: wt-merge.gif 1600x900 -->-## ExamplesMerge to the default branch:diff --git a/tests/snapshots/integration__integration_tests__help__help_merge_long.snap b/tests/snapshots/integration__integration_tests__help__help_merge_long.snapindex bafef5a1d..fe2491076 100644--- a/tests/snapshots/integration__integration_tests__help__help_merge_long.snap+++ b/tests/snapshots/integration__integration_tests__help__help_merge_long.snap@@ -76,7 +76,6 @@ Usage: [1m[36mwt merge[0m [36m[OPTIONS][0m [36m[TARGET][0mUnlike [2mgit merge[0m, this merges current into target (not target into current). Similar to clicking "Merge pull request" on GitHub, but locally. Target defaults to the default branch.-[1m[32mExamples[0mMerge to the default branch: