FR: commit only a certain path or directory, or exclude some changes from commit, also, allow status to reflect changes in a path or directory
Is your feature request related to a problem? Please describe. sometimes working with users have independent changes (from my changes) and who don't use git or jujutsu, and copy their changes in a separate folder; so basically, we have other users changes in one folder, and my changes in another folder, I want to commit their changes in one folder, while still have my changes uncommitted in workspace
Describe the solution you'd like allow "jj st dir" to find changes in "dir" allow "jj ci -m msg dir" to commit changes on dir only ignoring other changes
Describe alternatives you've considered maybe some branching may help, but I would expected to be too complex to maintain. and I'm not familiar with git or jj branching; however adding above two features (jj st dir and jj ci dir) are generic enough and can be useful for the average user
Additional context Add any other context or screenshots about the feature request here.
jj ci -m msg dir should work since #2133, which was released in 0.10.0. Before that version, there was jj split, which is almost equivalent.
To list changed files in a specific directory, use jj diff -s dir. Maybe we could add the option to filter jj st by paths too.
I guess https://github.com/martinvonz/jj/pull/2312 is a little imprecise: it's really meant to answer "how do I interactively commit certain changes", but the heading as written implies that it would answer how to non-interactively commit a subset of files as well. (Which it does, if only you have the patience to toggle all the files in the diff editor...)
another motivation to support "jj st dir" is to make it faster to get what changed in a local directory instead of scanning entire repo for changes.
Thanks for the quick response, both jj ci -m msg dir and jj diff -s dir worked for me.