-
Notifications
You must be signed in to change notification settings - Fork 26
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
Add very verbose option #22
Conversation
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.
thanks for your contribution. this seems useful indeed. i usually add it manually, or specify it via addopts
in pytest.ini.
i think the implementation can be nicer though: instead of an extra flag, perhaps the -v
flag could ‘rotate’ between nothing, --verbose
, and --verbose --verbose
instead. what do you think?
I've tried this (you can take a look at my best attempt in the most recent commit), but I don't think there is a way to do this within the The issue is that we need to maintain some state, which I tried to do by setting the I've never used |
same here, never used it extensively, and it's semi-deprecated in favour of let's settle for good enough. thanks! |
you're right, custom lisp functions don't seem to work at all for ‘switches’ (e.g. the (defun magit-invoke-popup-switch (event)
(interactive (list last-command-event))
(--if-let (magit-popup-lookup event :switches)
(progn
(setf (magit-popup-event-use it)
(not (magit-popup-event-use it)))
(magit-refresh-popup-buffer))
(user-error "%c isn't bound to any switch" event)))
(defun magit-invoke-popup-option (event)
(interactive (list last-command-event))
(--if-let (magit-popup-lookup event :options)
(progn
(if (magit-popup-event-use it)
(setf (magit-popup-event-use it) nil)
(let* ((arg (magit-popup-event-arg it))
(val (funcall
(magit-popup-event-fun it)
(concat arg (unless (string-match-p "=$" arg) ": "))
(magit-popup-event-val it))))
(setf (magit-popup-event-use it) t)
(setf (magit-popup-event-val it) val)))
(magit-refresh-popup-buffer))
(user-error "%c isn't bound to any option" event))) |
fwiw, #24 was merged with the original simpler idea: a |
Make the ‘-v’ option cycle between nothing, ‘--verbose’, and ‘--verbose --verbose’. This was suggested before (#22 (review)) but wasn't possible at the time of #22 because it seemed impossible due to magit-popup.el limitations. Now that the dispatch menu uses transient.el instead of magit-popup.el (#18, #26), it can be implemented after all
Make the ‘-v’ option cycle between nothing, ‘--verbose’, and ‘--verbose --verbose’. This was suggested before (#22 (review)) but wasn't possible at the time of #22 because it seemed impossible due to magit-popup.el limitations. Now that the dispatch menu uses transient.el instead of magit-popup.el (#18, #26), it can be implemented after all.
Make the ‘-v’ option cycle between nothing, ‘--verbose’, and ‘--verbose --verbose’. This was suggested before (#22 (review)) but wasn't possible at the time of #22 due to magit-popup.el limitations. Now that the dispatch menu uses transient.el instead of magit-popup.el (#18, #26), it can be implemented after all.
Make the ‘-v’ option cycle between nothing, ‘--verbose’, and ‘--verbose --verbose’. This was suggested before (#22 (review)) but wasn't possible at the time of #22 due to magit-popup.el limitations. Now that the dispatch menu uses transient.el instead of magit-popup.el (#18, #26), it can be implemented after all.
Pytest has an option for higher verbosity, which will display the full diff for objects that fail equality assertion (
-vv
). In my work, I've found the flag to be indispensable for TDD. This PR adds the-vv
flag as an option in the magit popup menu.