File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -116,18 +116,13 @@ fn create_fixup_commit<'a>(
116
116
let mut idx = repo. index ( ) ?;
117
117
idx. update_all ( & pathspecs, None ) ?;
118
118
idx. write ( ) ?;
119
- let commit_to_amend =
120
- select_commit_to_amend ( & repo, head_branch. upstream ( ) . ok ( ) , max_commits) ?;
121
- do_fixup_commit ( & repo, & head_branch, & commit_to_amend, squash) ?;
122
- Ok ( commit_to_amend)
123
119
} else {
124
120
println ! ( "Staged changes:" ) ;
125
121
print_diff ( Changes :: Staged ) ?;
126
- let commit_to_amend =
127
- select_commit_to_amend ( & repo, head_branch. upstream ( ) . ok ( ) , max_commits) ?;
128
- do_fixup_commit ( & repo, & head_branch, & commit_to_amend, squash) ?;
129
- Ok ( commit_to_amend)
130
122
}
123
+ let commit_to_amend = select_commit_to_amend ( & repo, head_branch. upstream ( ) . ok ( ) , max_commits) ?;
124
+ do_fixup_commit ( & repo, & head_branch, & commit_to_amend, squash) ?;
125
+ Ok ( commit_to_amend)
131
126
}
132
127
133
128
fn do_fixup_commit < ' a > (
You can’t perform that action at this time.
0 commit comments