Skip to content

Commit 33de9cd

Browse files
committed
wip
1 parent 1061fcc commit 33de9cd

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

src/git2_ops.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,9 @@ impl GitRepo {
129129
let remote_ref = format!("origin/{}", branch);
130130
if self.ref_exists(&remote_ref) {
131131
let sha = self.sha(&remote_ref).unwrap_or_default();
132-
let is_descendent = self.is_ancestor(&parent_branch, &remote_ref).unwrap_or(false);
132+
let is_descendent = self
133+
.is_ancestor(&parent_branch, &remote_ref)
134+
.unwrap_or(false);
133135
(sha, is_descendent, None)
134136
} else {
135137
// Neither local nor remote exists - use placeholder values

src/main.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -488,9 +488,7 @@ fn recur_tree(
488488
let is_dimmed = if display_authors.is_empty() {
489489
false
490490
} else {
491-
pr_author.is_some_and(|author| {
492-
!display_authors.contains(&author.to_string())
493-
})
491+
pr_author.is_some_and(|author| !display_authors.contains(&author.to_string()))
494492
};
495493

496494
// Check if branch is remote-only (not local)

src/sync.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -939,12 +939,13 @@ fn compute_sync_plan(
939939
// Check if local branch is ancestor of origin/<branch>
940940
let remote_ref = format!("{}/{}", DEFAULT_REMOTE, branch_name);
941941
if git_repo.ref_exists(&remote_ref)
942-
&& let Ok(true) = git_repo.is_ancestor(branch_name, &remote_ref) {
943-
local_changes.push(LocalChange::DeleteLocalBranch {
944-
name: branch_name.clone(),
945-
reason: DeleteReason::AncestorOfRemote,
946-
});
947-
}
942+
&& let Ok(true) = git_repo.is_ancestor(branch_name, &remote_ref)
943+
{
944+
local_changes.push(LocalChange::DeleteLocalBranch {
945+
name: branch_name.clone(),
946+
reason: DeleteReason::AncestorOfRemote,
947+
});
948+
}
948949
}
949950
}
950951

0 commit comments

Comments
 (0)