Skip to content

Commit dcf3841

Browse files
committed
fix(rewrite): Always use the original HEAD
We were losing the rewritten HEAD when a later batch of commands was run.
1 parent 5fe0ae8 commit dcf3841

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/rewrite/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ impl Executor {
362362
) -> Vec<(git2::Error, &'s str, Vec<&'s str>)> {
363363
let mut failures = Vec::new();
364364

365-
self.head_id = Some(repo.head_commit().id);
365+
self.head_id.get_or_insert_with(|| repo.head_commit().id);
366366

367367
let onto_id = script.batches[0].onto_mark();
368368
let labels = NamedLabels::new();

0 commit comments

Comments
 (0)