Skip to content

Commit

Permalink
fix(init): update suggestion to set main branch
Browse files Browse the repository at this point in the history
Due to #338, the suggestion as provided may not actually work.
  • Loading branch information
arxanas committed Oct 4, 2022
1 parent 3184a52 commit a8d7911
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion git-branchless/src/commands/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ fn set_configs(
)?;
writeln!(
effects.get_output_stream(),
"If this is incorrect, run: git config branchless.core.mainBranch <branch>"
"If this is incorrect, run: git branchless init --main-branch <branch>"
)?;
main_branch_name
}
Expand Down
4 changes: 2 additions & 2 deletions git-branchless/tests/command/test_init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ fn test_init_basic() -> eyre::Result<()> {
insta::assert_snapshot!(stdout, @r###"
Created config file at <repo-path>/.git/branchless/config
Auto-detected your main branch as: master
If this is incorrect, run: git config branchless.core.mainBranch <branch>
If this is incorrect, run: git branchless init --main-branch <branch>
Installing hook: post-commit
Installing hook: post-merge
Installing hook: post-rewrite
Expand Down Expand Up @@ -551,7 +551,7 @@ fn test_init_core_hooks_path_warning() -> eyre::Result<()> {
insta::assert_snapshot!(stdout, @r###"
Created config file at <repo-path>/.git/branchless/config
Auto-detected your main branch as: master
If this is incorrect, run: git config branchless.core.mainBranch <branch>
If this is incorrect, run: git branchless init --main-branch <branch>
Installing hook: post-commit
Installing hook: post-merge
Installing hook: post-rewrite
Expand Down

0 comments on commit a8d7911

Please sign in to comment.