-
Notifications
You must be signed in to change notification settings - Fork 319
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FR: jj file
subcommand for file operations
#3812
Comments
|
I am interested in adding a Also, I would appreciate some indication that this work would be accepted before I go and start doing it. |
That command will not be very useful until we support copies and renames (but maybe still a tiny bit useful?). Do you mean that you wanted to implement that feature too? Or do you see a use for the command that I'm not seeing? I think our canonical bug for copy/rename support is #3386. @torquestomp has started working on a design for it (and maybe I'll take that over from him). I don't think there's much work to parallelize in the beginning but maybe there will be a little later, I'm not sure. |
I am willing to start with the command stuff as that is going to be a good deal simpler. If I finish the command stuff I can take a crack at implementing the underlying thing as follow. Since git auto-detects copies, it seems like it would be useful as it stands. |
|
One command that I keep wondering about adding is a command that "moves" a file in one side of a conflict. When |
It seems like a regular
When would the source or destination be ignored? |
I think when it is in the .gitignore file. |
Ah, that kind of ignored path :) Makes sense. Good question. If we don't give such paths any special treatment, then we'd just update the commit as usual, and when update the working copy to match (as we always do at the end of a command), we'd leave the ignored file alone, which might mean that the file appears modified afterwards. For attempting to move an ignored-and-untracked file, the command would just error out because the file doesn't exist in the commit, but it would be nice if we printed an error if the command was run on the working-copy commit. |
Do folks want me to deprecate the existing |
Replying to myself, I realized that there's a natural way to implement this as part of normal If you If There could also be a Update: I have a bit of unease to picking the conflict base in what I describe above. Another option would be for More generally, I feel like a lot of |
Do we also rename I'm not sure about |
This also justifies a vague feeling I had that we could make One version of |
I am happy to rename |
https://github.com/fowles/jj/tree/file_list is built on top of https://github.com/fowles/jj/tree/file_cli (#3812), so I have that ready to go next |
I'll add them to the top-level issue. |
(This is all an aside) Another thing in common for In theory, commands like Perhaps It's also curious that most, but not all, of these potential |
I kind of like this concept. It reminds me of how some Git help (i don't remember where) was organized: commands that affect the graph and commands that affect files. |
iirc, someone said they like
maybe |
I wonder whether Or it could be Though, I feel like all of these are harder to remember than I'm slightly itching to add Unix-y aliases to all of these (e.g. I also initially considered Windows-y aliases ( |
Also, did we consciously decide to go with While |
I personally like |
I don't think we did. I'm fine with renaming it to
Probably better to have separate commands for query and mutation. That's an argument I've heard before at least. |
I expect
I like Unix-y aliases, but I would rather want them in top-level (i.e. |
Is your feature request related to a problem? Please describe.
jj cat
are not descriptive and quite unintuitive for the uninitiated.jj file
subcommand for uniformity as well.Describe the solution you'd like
Commands of forms like this should one day be grouped together under a single subcommand:
jj file print
(jj file show
?) (aliasjj file cat
)jj file move
/jj file rename
(aliasjj file mv
)jj file delete
(/jj file remove
?) (aliasjj file rm
)jj file track
/jj file untrack
jj file chmod
(butchmod
is a Unix-ism so we might want to use a different term)Describe alternatives you've considered
Additional context
N/A
The text was updated successfully, but these errors were encountered: