File tree Expand file tree Collapse file tree 2 files changed +10
-8
lines changed
git-branchless-lib/src/core/rewrite Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -152,7 +152,6 @@ impl ToString for RebaseCommand {
152152 // the rewritten version of original_commit_oid.
153153 let cleanup_plan = vec ! [
154154 format!( "exec git commit --amend --no-edit --reuse-message {original_commit_oid}" ) ,
155- // FIXME This is causing "Skipping commit (was already applied upstream)" to be displayed for each fixup commit
156155 // FIXME I'm assuming that $(...) is not portable and will need to be changed
157156 "exec git branchless hook-skip-upstream-applied-commit $(git rev-parse @{1})" . to_string( ) ,
158157 format!( "exec git branchless hook-skip-upstream-applied-commit {original_commit_oid} $(git rev-parse HEAD)" )
Original file line number Diff line number Diff line change @@ -495,13 +495,16 @@ pub fn hook_skip_upstream_applied_commit(
495495) -> eyre:: Result < ( ) > {
496496 let repo = Repo :: from_current_dir ( ) ?;
497497 let commit = repo. find_commit_or_fail ( commit_oid) ?;
498- writeln ! (
499- effects. get_output_stream( ) ,
500- "Skipping commit (was already applied upstream): {}" ,
501- effects
502- . get_glyphs( )
503- . render( commit. friendly_describe( effects. get_glyphs( ) ) ?) ?
504- ) ?;
498+
499+ if let MaybeZeroOid :: Zero = rewritten_oid {
500+ writeln ! (
501+ effects. get_output_stream( ) ,
502+ "Skipping commit (was already applied upstream): {}" ,
503+ effects
504+ . get_glyphs( )
505+ . render( commit. friendly_describe( effects. get_glyphs( ) ) ?) ?
506+ ) ?;
507+ }
505508
506509 if let Some ( orig_head_reference) = repo. find_reference ( & "ORIG_HEAD" . into ( ) ) ? {
507510 let resolved_orig_head = repo. resolve_reference ( & orig_head_reference) ?;
You can’t perform that action at this time.
0 commit comments