Open mlcui-corp opened 5 days ago
https://github.com/martinvonz/jj/pull/4457 could be related in a way that both features will partially disable --ignore-working-copy
code paths.
We may need to be careful with Git imports in colocated repos. It seems like (at the moment) core.watchman.register_snapshot_trigger
does not automatically import changes from the underlying Git repo.
core.watchman.register_snapshot_trigger
does not automatically import changes from the underlying Git repo.
iirc, watchman doesn't monitor Git repo, so snapshot won't be triggered on ref change. If snapshot is triggered by working-copy change, Git refs will be imported as well.
Is your feature request related to a problem? Please describe.
Snapshotting the repository before commands is noticeably slow in large repos. For example, in my colocated checkout of https://chromium.googlesource.com/chromium/src/,
jj log
with Watchman enabled takes ~209ms, whereasjj log --ignore-working-copy
takes ~58ms.If
core.watchman.register_snapshot_trigger
is enabled, snapshotting before commands should not be necessary if we assume that background snapshotting completes before any command is run.The naive solution of adding
--ignore-working-copy
to every command has issues:jj new
, which would immediately cause a stale workspace: #4028Describe the solution you'd like
An option to skip snapshotting when there is a mechanism in place for automatic snapshots, like
core.watchman.register_snapshot_trigger
or similar mechanisms from virtual file systems.Describe alternatives you've considered
Adding
--ignore-working-copy
to common aliases likejj log
. (I have done this!)