-
Notifications
You must be signed in to change notification settings - Fork 301
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
jj untrack foo~
fails
#4509
Comments
Since fileset is enabled by default, Maybe we can add a hint if the expression looks like an existing path. |
From a quick read of the linked page: |
Yeah, trailing
|
You can add this stuff to your global Git ignores in |
The message is now:
Hopefully this is a clearer message. If this is, might we close this issue? |
I accept that I'm the only one annoyed by the change in behaviour between the old 'jj untrack' and the new 'jj file untrack' and have worked around it by having my global git config ignore "*~" files. As for the actual change - I think this needs improvements in the documentation. |
FYI, I don't think it's a difference between
A second tilde followed by an expression would make the syntax correct, but it's probably not what. The error message is generated by the low-level parsing code without understanding what makes a useful expression. I think you can think of a
That page includes this:
In
I'm not arguing with this. The above is just to explain how it actually works. |
This sounds like a good idea to me, it's consistent with what we try to do in other similar cases. I just wanted to resurface it so that it doesn't get lost in the discussion. |
One (not fully thought through) possibility for improving the docs would be to change the URL in the error Samuel quoted in #4509 (comment) to link to a section, e.g. https://martinvonz.github.io/jj/latest/filesets/#syntax-error. Then, we could put a few examples into that section (mainly for unexpected syntax errors). I was originally going to suggest combining this with Yuya's idea I quoted in my previous message, but while doing both makes sense to me, maybe having the URL would work even without implementing an error specific to patterns that look like files. |
I just thought "meta character" is more abstract and easier to imagine than "operator". If we need a strict definition, maybe we can add a link to the grammar file?
I thought this would be a nice addition, but I think the current state (a hint with doc URL) is pretty good. We can improve the doc by adding more bad/good examples. (If I were new to jj, I would probably search the doc by error message.) |
Description
emacs writes backup files with a
~
(tilde) at the end. jj automatically picks them up if you forgot to ignore them in the.gitignore
file.I can't untrack them in the latest version any longer. (I think this worked when it was
jj untrack
, but now it doesn't withjj file untrack
, but perhaps I misremember.)Steps to Reproduce the Problem
Specifications
The text was updated successfully, but these errors were encountered: