-
Notifications
You must be signed in to change notification settings - Fork 48
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
Disable automatic scans in remote repositories, add option to re-renable #157
Disable automatic scans in remote repositories, add option to re-renable #157
Conversation
Hi again, Thanks, this seems like a good idea. Will target for v1.8. |
Having heard from another user today who had problems with misbehavior over TRAMP, I suspect that this new option should probably be disabled by default. What do you think? |
@alphapapa I found it to be fairly intrusive when working with remote repos over TRAMP, so I'd also be OK with not scanning them by default. Would you like me to change the default in this PR? |
@projectgus Seems like a good idea to me. Thanks. |
@alphapapa Sorry I forgot about this PR! Have swapped the default, updated the docs to mention, and re-tested. |
Hi there, this looks like it would close #178 . Is there anything left pending for this (happy to help if I can) 🤔. |
I appreciate your patience, as the past few weeks have been very busy for me. Regarding this PR, I'm not especially happy with the size of the diff, caused by the change in indentation of a large form. As well, given the recent change adding caching of branch-diff items which affects this diff's range, this change would need to be rebased. And the option's docstring needs to be rewritten to follow documentation guidelines, be generally more concise, and explain its interaction with other options more clearly. Finally, I'm not entirely sure about the name of the option, and maybe the option itself. It might be good to consider if this is the best way to handle the issue. For example, since a remote system might not have the same scanners installed, it might be good to address that problem in a unified way, e.g. testing for the scanner's presence and falling back to Sometimes it's best to discuss a problem and potential solutions in an issue before writing code and submitting a PR. That way the time of the patch submitter isn't wasted writing code that may not be merged. |
Thanks @alphapapa . Lets discuss in the related issue. |
Hi @alphapapa, Thanks for the review comments, and absolutely no problem with being busy. I fully support you not looking at this PR again until you have time (if ever!)
I agree that this doesn't fully resolve the issue linked there, all it does is prevents errors popping up automatically for remote repos if the scanner isn't found. The checking/fallback approach you mention seems like it could be a better long term fix.
Have rebased again just now, and re-tested.
I haven't tried to address this, any alternative factoring that I can think of is a bigger change in terms of overall code structure and I'm not confident I'd avoid regressions. I'm happy to have a go at it if it'd be useful, though.
I've rewritten the docstring to be more concise. I don't know which documentation guidelines you're referring to, but if you want me to make more changes then let me know.
Agreed (insert joke about only one hard problem in computer science here).
I would say in my defence that I did look at the issues before sending this patch, I originally based it on this discussion in #132 where you said an option like this "seems like a good idea", and I saw you 👍 someone else's older comment that they'd try to implement it. Then I kept updating the PR based on your initial positive comments above. Of course, quite a bit of time has passed and it's reasonable to want to go a different way. My main reason for writing this code was to "scratch my own itch", and my straight.el is updated to use my fork so my personal problem is solved indefinitely. In particular, I fully appreciate not wanting to commit to a config option if it might end up replaced in a future release. So, needless to say, if you prefer to close this and approach it another way, or leave it to the side while you get on with more rewarding parts of life, then it's fine by me. Alternatively, if you've specific requests for changes then I'm happy to make those changes in this PR. Up to you. |
Thanks for the kind words and your understanding.
Probably so. In lieu of that an option like this could still be helpful.
Probably what's needed is a refactoring. The branch-diff to-do list was an add-on, not part of the original design. It would be better if the system supported any number of such scans/sections.
The Elisp manual appendices have some helpful guidelines.
Of course. :)
I didn't mean that as a criticism; more as a defense of myself not wanting to merge the code as-is. :)
Thanks, I'm glad to hear that.
I'm pretty busy right now, so I'll probably defer this for a while; and if a refactoring more suitable for the long term comes up in the meantime, I might merge that instead. Either way, I appreciate your contribution and goodwill. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you'll address these minor issues, I'll merge it. Please also add a changelog entry. Thanks.
@alphapapa Thanks for the pointers, especially to the appendix in the Emacs Lisp manual - I'd never noticed this. PTAL when you get the time. |
(Sorry for the extra pushes, just fiddling with wording.) |
Merged with a few small changes in additional commits. Thanks, Angus! |
New option
magit-todos-update-remote
controls whether todos are automatically updated in remote repos (accessed via TRAMP). Defaults to disabled.New option was suggested in #132 (although not a fix for that issue), and is disabled by default as suggested in #157 (comment).
Thanks for developing magit-todos, it's very handy! 😁