Skip to content

jj absorb makes a hidden revision visible #9948

Description

@dzaima

Description

When jj absorb modifies a revision which has a hidden descendant that's referred to by immutable_heads(), it makes the hidden revision visible and rebases it.

Steps to Reproduce the Problem

# setup
jj config set --repo 'revset-aliases."immutable_heads()"' 'builtin_immutable_heads() ~ tags(glob:backup/*)'

# commit to absorb into
echo foo > file
jj new

# add a hidden revision
jj new -o@- --no-edit -m 'hidden revision'
jj tag set -r '@-+~@' backup/whatever
jj abandon backup/whatever

# absorb
echo bar > file
jj log -r:: # there are only 2 visible commits
jj absorb
jj log -r:: # now there are 3 commits!

Expected Behavior

jj absorb should act like jj squash -f@ -t@- in this example, and not make hidden revisions visible

Actual Behavior

$ jj log -r::
@  rpsmomsr 2026-08-09 00:36:11 dzaima ee6e395d
│  (no description set)
○  vsuwznzt 2026-08-09 00:36:04 dzaima 136e9406
│  (no description set)
◆  zzzzzzzz root() 00000000
$ jj absorb
Absorbed changes into 1 revisions:
  vsuwznzt 74b133b8 (no description set)
Rebased 1 descendant commits.
Working copy  (@) now at: otpolmmv 1fdb4a73 (empty) (no description set)
Parent commit (@-)      : vsuwznzt 74b133b8 (no description set)
$ jj log -r::
@  otpolmmv 2026-08-09 00:45:24 dzaima 1fdb4a73
│  (no description set) (empty)
│ ○  nlrqqrty 2026-08-09 00:36:07 dzaima a1036b70
├─╯  hidden revision (empty)
○  vsuwznzt 2026-08-09 00:36:04 dzaima 74b133b8
│  (no description set)
◆  zzzzzzzz root() 00000000

Specifications

  • Platform: Linux
  • Version: Happens on 0.43.0 and 0.44.0, but not 0.42.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions