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 {
61
61
/// Open the user's configured commit editor seeded with the provided message.
62
62
#[ instrument]
63
63
pub 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 ( ) ) ,
68
71
} ;
69
72
if editor_program == ":" {
70
73
// Special case in Git: treat `:` as a no-op editor.
You can’t perform that action at this time.
0 commit comments