MCPcopy Create free account
hub / github.com/libgit2/pygit2 / checkout_notify_flags

Method checkout_notify_flags

pygit2/callbacks.py:276–295  ·  view source on GitHub ↗

Returns a bit mask of the notifications to receive from a checkout (a combination of enums.CheckoutNotify constants). By default, if you override `checkout_notify`, all notifications will be enabled. You can fine tune the notification types to enable by over

(self)

Source from the content-addressed store, hash-verified

274 super().__init__()
275
276 def checkout_notify_flags(self) -> CheckoutNotify:
277 """
278 Returns a bit mask of the notifications to receive from a checkout
279 (a combination of enums.CheckoutNotify constants).
280
281 By default, if you override `checkout_notify`, all notifications will
282 be enabled. You can fine tune the notification types to enable by
283 overriding `checkout_notify_flags`.
284
285 Please note that the flags are only sampled once when checkout begins.
286 You cannot change the flags while a checkout is in progress.
287 """
288 if type(self).checkout_notify == CheckoutCallbacks.checkout_notify:
289 # If the user hasn't overridden the notify function,
290 # filter out all notifications.
291 return CheckoutNotify.NONE
292 else:
293 # If the user provides their own notify function,
294 # enable all notifications by default.
295 return CheckoutNotify.ALL
296
297 def checkout_notify(
298 self,

Callers 1

_git_checkout_optionsFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected