0

I would like to add an option in magit-log-popup to ignore a list of remotes when using "Log all branches" (l b). What I'm trying to do is something like this git log HEAD --branches --remotes --not --remotes=remote1 --remotes=remote2. All my attempts to add this have failed and I wondered if anybody have a suggestion on how it could be done?

Tried variations of things like this (magit-define-popup-option 'magit-log-popup ?i "Ignore remotes" "--not --remotes=" #'read-from-minibuffer). Though I might expanded it later with a function, but it caused the log come up empty.

  • A better solution would be to make local branches of what should be tracked and use b L ("Log local branches"). – Leif Warland Nov 14 '18 at 7:13
0

Tried variations of things like this (magit-define-popup-option 'magit-log-popup ?i "Ignore remotes" "--not --remotes=" #'read-from-minibuffer). Though I might expanded it later with a function, but it caused the log come up empty.

This does not work because when you define "--not --remotes=" as a single argument, then it is—unsurprisingly—passed to Git as a single argument --not --remotes=VALUE. Git then errors out because it has no such argument.

You should be able to achieve what you want by adding two separate arguments --not and --remote= to the popup. You will have to make sure that they appear in the correct order in the popup and you will have to enable both separately.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.