Skip to content

Commit 1f9ccc0

Browse files
jonathanlabclaude
andcommitted
fix: arr log/stacks now excludes immutable remote-tracking branches
The revset `trunk()..heads(trunk()..)` was including immutable remote-tracking branches that clutter the log. Now uses `mutable() & trunk()..heads(trunk()..)` to show only mutable changes. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent e1c3d47 commit 1f9ccc0

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

packages/core/src/jj.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -597,8 +597,10 @@ export class JJ {
597597
}
598598

599599
async getStacks(): Promise<Result<StackInfo[]>> {
600-
// Get all changes from trunk to all heads
601-
const allChanges = await this.list({ revset: "trunk()..heads(trunk()..)" });
600+
// Get all MUTABLE changes from trunk to all heads (excludes remote-tracking branches)
601+
const allChanges = await this.list({
602+
revset: "mutable() & trunk()..heads(trunk()..)",
603+
});
602604
if (!allChanges.ok) return allChanges;
603605

604606
// Get trunk ID
@@ -675,8 +677,10 @@ export class JJ {
675677
}
676678

677679
async getLog(): Promise<Result<LogResult>> {
678-
// Get ALL changes from trunk to all heads (all stacks)
679-
const listResult = await this.list({ revset: "trunk()..heads(trunk()..)" });
680+
// Get all MUTABLE changes from trunk to all heads (excludes remote-tracking branches)
681+
const listResult = await this.list({
682+
revset: "mutable() & trunk()..heads(trunk()..)",
683+
});
680684
if (!listResult.ok) return listResult;
681685

682686
const statusResult = await this.status();

0 commit comments

Comments
 (0)