feat: add untrack feature#146
feat: add untrack feature#146istudyatuni merged 18 commits intoCretezy:mainfrom Spiegie:feat-add-untrack-feature
Conversation
|
I still need to impement logic to see, if the file is already ignored by a .gitignore. right now, the user decides if the file is added to .git/info/exclude |
|
git clean -ndX can help here but git clean is not implemented as subcommand in jj git |
|
I think depending on git is not a good idea. There is no way to query all ignored files with jj (yet). maybe we should just wait for jj to implement the improved untrack handling or the list ignored files feature maybe as subcommand. Till then, I mark my PR as complete and will come back, when things developed. |
|
@istudyatuni would you agree with this PR? I will try to add tests. |
|
I think the untrack and ignore part is to much for me to chew. I remove it from this PR and try to come back when I'm more experienced. |
|
For now, I reworked the logic like this: First get the current list of files. Now untrack the selected file. Then get the current list of files again. If no change is detected, the file is not ignored. This triggers a message-popup prompting the user to ignore the file. If a change is detected (before and after are not the same) I assume everything worked fine and no popup is triggered. The auto-exclude-logic is gone, because I needed to rely on a Git-Repository, which would be fine if I tested for it. But I don't think, I can pull this off. Unfortunately, now you can untrack a deleted file. This triggers no change in files, resulting in an unwanted popup. I need to figure out, how to get the state of the current selected file. |
|
Thank you very much :) |
suggested by istudyatuni Co-authored-by: Ilia <43654815+istudyatuni@users.noreply.github.com>
suggested by istudyatuni Co-authored-by: Ilia <43654815+istudyatuni@users.noreply.github.com>
suggested by istudyatuni Co-authored-by: Ilia <43654815+istudyatuni@users.noreply.github.com>
suggested by istudyatuni Co-authored-by: Ilia <43654815+istudyatuni@users.noreply.github.com>
|
i needed to bump the edition to 2024 becaue of rust-lang/rust#53667 |
|
sorry for not providing tests... I simply don't have the time right now. And thank you again for the reviews and suggestions. |
|
Edition will be also bumped in #149 , and since it requires formatting a lot of files, let's wait a bit for this |
|
I resolved the conflicts and moved to a branch other than main. |
|
Thanks! |
|
i needed to implement the special handling for deleted files, because untracking a deleted file does not trigger a change in the view. if no change is triggered, the message to ignore the file first gets displayed. |
|
I refactored code and it just checks the exit code of |
|
oh ok now I understand sorry and thank you for your patience |
closes #145
I want to include a option to retrack files but I'm not shure if I should do it in this PR.
also the code is not very clean yet.