Files
Erich Gubler 0734d2d658 Bug 2029829 - fix(jj): correct broken clean_directory impl. r=sfink
I doubt that this ever worked. At the time this code was written, `jj` 0.28.2 was the latest release. The [0.28.2 docs for `jj restore`] do not include a `-r` argument.

Comparing to the `git.py` sibling file, it seems the intent may have been to use `-f/--from`, i.e., "please discard anything in the current change at `$path`". Restoring the current change's contents to the parent change is the default behavior with no options, so all we need to do is provide the path to be cleared as a positional argument to narrow as desired.

Add an end-of-options sentinel (`--`) for good measure, to guard against file names with a leading `-`.

[0.28.2 docs for `jj restore`]: https://docs.jj-vcs.dev/v0.28.2/cli-reference/#jj-restore

Differential Revision: https://phabricator.services.mozilla.com/D292267
2026-06-04 15:29:50 +00:00
..
…