File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
git-branchless-reword/src Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -61,10 +61,13 @@ pub enum InitialCommitMessages {
6161/// Open the user's configured commit editor seeded with the provided message.
6262#[ instrument]
6363pub fn edit_message ( git_run_info : & GitRunInfo , repo : & Repo , message : & str ) -> eyre:: Result < String > {
64- let mut editor = Editor :: new ( ) ;
65- let ( editor, editor_program) = match get_editor ( git_run_info, repo) ? {
66- Some ( editor_program) => ( editor. executable ( & editor_program) , editor_program) ,
67- None => ( & mut editor, "<default>" . into ( ) ) ,
64+ let ( mut editor, editor_program) = match get_editor ( git_run_info, repo) ? {
65+ Some ( editor_program) => {
66+ let mut editor = Editor :: new ( ) ;
67+ editor. executable ( & editor_program) ;
68+ ( editor, editor_program)
69+ }
70+ None => ( Editor :: new ( ) , "<default>" . into ( ) ) ,
6871 } ;
6972 if editor_program == ":" {
7073 // Special case in Git: treat `:` as a no-op editor.
You can’t perform that action at this time.
0 commit comments