Skip to content

Commit

Permalink
When stack fully emptied, disreguard old PR information
Browse files Browse the repository at this point in the history
  • Loading branch information
Caleb-T-Owens committed Jan 17, 2025
1 parent 53dec53 commit e654da6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions crates/gitbutler-stack/src/stack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,11 @@ impl Stack {
}

if self.heads.iter().all(|branch| branch.archived) {
// Remove previous PR information so it looks like we started a new stack
for head in self.heads.iter_mut() {
head.pr_number = None;
}

let new_head = self.make_new_empty_reference(ctx, false)?;
self.heads.push(new_head);
}
Expand Down

0 comments on commit e654da6

Please sign in to comment.