Skip to content

Commit 9a619e0

Browse files
committed
More helpful docs for the archived flag in WorkspaceStack
Clarify what it is and isn't to be sure we use it correctly when the time comes.
1 parent 52903a6 commit 9a619e0

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

crates/but-core/src/ref_metadata.rs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -158,13 +158,11 @@ pub struct WorkspaceStack {
158158
pub struct WorkspaceStackBranch {
159159
/// The name of the branch.
160160
pub ref_name: gix::refs::FullName,
161-
/// Archived represents the state when series/branch has been integrated and is below the merge base with the current target branch.
162-
/// This would occur when the branch has been merged at the remote and the workspace has been updated with that change.
163-
///
164-
/// Note that this is a cache to help speed up certain operations.
165-
/// NOTE: This is more like a proof of concept and for backwards compatibility - maybe we will make it go away.
166-
// TODO: given that most operations require a graph walk, will this really be necessary if a graph cache is used consistently?
167-
// Staleness can be a problem if targets can be changed after the fact. At least we'd need to recompute it.
161+
/// If `true`, the branch is now underneath the lower-base of the workspace after a workspace update.
162+
/// This means it's not interesting anymore, by all means, but we'd still have to keep it available and list
163+
/// these segments as being part of the workspace when creating PRs. Their descriptions contain references
164+
/// to archived segments, which simply shouldn't disappear just yet.
165+
/// However, they may disappear once the whole stack has been integrated and the workspace has moved past it.
168166
pub archived: bool,
169167
}
170168

0 commit comments

Comments
 (0)