-
Notifications
You must be signed in to change notification settings - Fork 370
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: Make jj file untrack
work with files that are not ignored
#5225
Comments
One alternative could be to save a negative pattern to the sparse checkout rather than modify any ignore files.
|
Maybe dup of #3493 ? iirc, there were other related discussion about newly-unignored files on |
It's very similar. The only difference is that I think it'd be best to not use a git ignore file, since the list of files that have been "jj untracked" is jujutsu specific so I don't think it should change the git config (since git does not auto-track any files). Maybe both could be combined? e.g. |
That probably depends on user's workflow. I would add it to .gitignore or global ignore if the file isn't supposed to be version controlled.
+1 |
Is your feature request related to a problem? Please describe.
Currently, if you do
jj file untrack
on a file that is not being ignored, the command is effectively a "no op" since the files are immediately, automatically and silently tracked again. This is extremely surprising and also makes keeping files outside of the repo (but in the working directory) harder than it could be.Describe the solution you'd like
When the using
jj file untrack
on a file is not already gitignored, jujutsu should store the fact that the user explicitly requested to untrack that file, and not track it automatically until the user usedjj file track
to track it again.How to store that information is debatable. I think it should not be added to the "public" .gitignore, to avoid sharing with others the existence of that untracked file. It could perhaps be stored in
.git/info/exclude
(which IMHO would be a much better solution than storing it in the public gitignore). But given that .git does not automatically track any files, maybe it would make more sense to store this info in an "jujutsu specific", local ignore file (e.g..jj/info/exclude
)?Describe alternatives you've considered
I think this behavior should be automatic, but an alternative would be to require the user triggering this behavior by adding a flag to
jj file untrack
(e.g.jj file untrack --save
). I think this might only make sense if jj updated the git exclude file (but not if it created it's one jj specific file to store the list of untracked files). Also, this would still result injj file untrack
(without the flag) having surprising "no op" behavior.Additional context
This is related to #323.
The text was updated successfully, but these errors were encountered: