Skip to content

Commit 0f4e102

Browse files
committed
fix: describe merge order as FIFO, not 'bottom-first'
A 'stack' evokes LIFO (pop the top first), so 'bottom-first' reads as contradictory. The order is unchanged — the first/base PR merges first — but the PR-body caption and README now frame it as FIFO (#1 first) to avoid confusion.
1 parent 59b8730 commit 0f4e102

2 files changed

Lines changed: 15 additions & 12 deletions

File tree

README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,11 @@ git stack submit # refresh the PRs
106106

107107
### Landing a stack
108108

109-
PRs merge **bottom-first**. After the bottom PR lands, run `git stack sync` — it
110-
detects the merged PR, reparents the branches above onto trunk, and rebases
109+
PRs merge in **FIFO order** — the oldest PR (`#1`, at the base of the stack)
110+
merges first, then the next, and so on. After a PR lands, run `git stack sync`
111+
it detects the merged PR, reparents the branches above onto trunk, and rebases
111112
them; then `git stack submit` retargets their PR bases and refreshes the stack
112-
list. Each PR body shows live approval/merge-state emojis (✅/🔴/⏳ while open,
113+
list. Each PR body shows live approval/merge-state emojis (✅/♻️/⏳ while open,
113114
🟣/⚫ once merged/closed) as of the last submit.
114115

115116
### Editing a branch in the middle of a stack
@@ -160,11 +161,11 @@ top, followed by that branch's `describe` text under a divider:
160161
```markdown
161162
### 📚 Stacked PR · 2 of 3
162163

163-
Merge in order, bottom to top:
164+
Part of a stack. The PRs merge in FIFO order — the numbered order below, #1 first.
164165

165-
1. [#10 `api`](…/pull/10)`main`
166-
2. **[#11 `service`](…/pull/11)`api`** 👈 **this PR**
167-
3. [#12 `ui`](…/pull/12)`service`
166+
1. 🟣 [#10 `api`](…/pull/10)`main`
167+
2. ♻️🟢 **[#11 `service`](…/pull/11)`api`** 👈 **this PR**
168+
3. ⏳🟢 [#12 `ui`](…/pull/12)`service`
168169

169170
---
170171

src/render.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,10 @@ pub fn nav_block(line: &[Entry], current: &str, trunk: &str) -> String {
7171
total
7272
),
7373
String::new(),
74-
"Part of a stack (listed bottom → top). PRs merge bottom-first; merging one \
75-
supersedes the PRs above it until the author runs `git stack sync` (rebases the \
76-
rest onto the merged base) and `git stack submit` (retargets their PRs)."
74+
"Part of a stack. The PRs merge in FIFO order — the numbered order below, #1 \
75+
first. Merging one supersedes the PRs after it until the author runs \
76+
`git stack sync` (rebases the rest onto the merged base) and `git stack submit` \
77+
(retargets their PRs)."
7778
.to_string(),
7879
String::new(),
7980
];
@@ -260,9 +261,10 @@ mod tests {
260261
assert!(nav.contains("3. ⏳🟢 [#12 `ui`]"), "{nav}");
261262
assert!(nav.contains("👈 **this PR**"));
262263
assert!(nav.contains("2 of 3"));
264+
assert!(nav.contains("FIFO"), "merge order described as FIFO");
263265
assert!(
264-
!nav.contains("Merge in order"),
265-
"old misleading caption removed"
266+
!nav.contains("bottom-first"),
267+
"confusing bottom-first wording removed"
266268
);
267269
}
268270
}

0 commit comments

Comments
 (0)