jj-sparse-edit(1)

πŸ’… jj-sparse-edit(1) β€” General Commands Manual energy

okay bestie, welcome to jj-sparse-edit, straight outta the General Commands Manual. this is the page that opens up an editor so you can ✨change which patterns are actually present in your working copy✨. sounds lowkey simple, and it is β€” but there's a whole lil' world of global options down there too, so let's get into it 🫢


🌸 NAME

jj-sparse-edit β€” start an editor to update the patterns that are present in the working copy πŸ’–


✨ SYNOPSIS

jj sparse edit [-R|--repository] [--ignore-working-copy]
[--no-integrate-operation] [--ignore-immutable] [--at-operation]
[--debug] [--color] [--quiet] [--no-pager] [--config] [--config-file]
[-h|--help]

πŸ¦‹ DESCRIPTION

so basically: it starts an editor πŸ“ and you use it to update the patterns that are present in the working copy. that's the whole vibe. the working copy only shows the stuff you said you want, and this is where you edit that list. iconic. periodt πŸ’…


πŸŽ€ OPTIONS

  • -h, --help β€” prints the help. note that it's the summary version with -h, so if you want the full tea, you know what to do 😌

🌈 GLOBAL OPTIONS

these ones apply across the board, not just here. main character options, fr fr:

  • -R, --repository <REPOSITORY> β€” the path to the repo you wanna operate on πŸ—‚οΈ by default Jujutsu goes looking for the closest .jj/ directory in an ancestor of wherever your current working directory is.
  • --ignore-working-copy β€” don't snapshot the working copy, and don't update it πŸ™ˆ by default Jujutsu snapshots the working copy at the beginning of every command. it also updates the working copy at the end of the command if that command modified the working-copy commit (@). so if you'd rather skip the snapshotting and just see a possibly stale working-copy commit, this is your girl. useful for stuff like a command prompt, especially if you've got another process committing the working copy. psst: loading the repo at a specific operation with --at-operation implies --ignore-working-copy πŸ‘€
  • --no-integrate-operation β€” run the command like normal but don't integrate any operations πŸŒͺ️ when you pass this, the operations still get created like usual, they just don't get integrated into the operation log. the working copy also doesn't get updated. the command will print the resulting operation ID for you. you can hand that ID to e.g. jj --at-op to inspect the resulting repo state, or pass it to jj op restore to restore the repo to that state. you can also pass the ID to jj op integrate to integrate the operation. ⚠️ careful though: this does not prevent side effects outside the repo. like, jj git push --no-integrate-operation will still perform the push. no cap.
  • --ignore-immutable β€” allow rewriting immutable commits πŸ”“ by default Jujutsu prevents rewriting commits in the configured set of immutable commits. this option disables that check and lets you rewrite any commit but the root commit. heads up: this option only affects the check. it does not affect the immutable_heads() revset or the immutable template keyword. iykyk.
  • --at-operation <AT_OPERATION> β€” the operation to load the repo at ⏳ by default, Jujutsu loads the repo at the most recent operation, or at the merge of the divergent operations if there are any.

you can use --at-op=<operation ID> to see what the repo looked like at an earlier operation. for example, jj --at-op=<operation ID> st will show you what jj st would have shown you when the given operation had just finished. --at-op=@ is pretty much the same as the default, except that divergent operations will never be merged.

use jj op log to find the operation ID you want πŸ•΅οΈ any unambiguous prefix of the operation ID is enough.

when loading the repo at an earlier operation, the working copy will be ignored, as if --ignore-working-copy had been specified.

and yes, it is possible to run mutating commands when loading the repo at an earlier operation. doing that is equivalent to having run concurrent commands starting at the earlier operation. there's rarely a reason to do that, but it is possible. πŸ’€

  • --debug β€” enable debug logging πŸ›
  • --color <WHEN> β€” when to colorize output 🎨 possible values:
    • always
    • never
    • debug
    • auto
  • --quiet β€” silence non-primary command output 🀫 for example, jj file list will still list files, but it won't tell you if the working copy was snapshotted or if descendants were rebased. warnings and errors will still be printed though, so no hiding those.
  • --no-pager β€” disable the pager πŸ“„
  • --config <NAME=VALUE> β€” additional configuration options (can be repeated) 🧾 the name should be specified as TOML dotted keys. the value should be specified as a TOML expression. if the string value isn't enclosed by any TOML constructs (such as array notation), quotes can be omitted.
  • --config-file <PATH> β€” additional configuration files (can be repeated) πŸ“

and that's the whole page, bestie πŸŽ€ the footer's lil' tag says the source is edit and the manual is jj-sparse-edit(1) β€” so go forth, edit those patterns, and slay πŸ’œπŸ¦‹βœ¨

πŸ“¦ where this page comes from