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

Method checkout_notify

pygit2/callbacks.py:297–317  ·  view source on GitHub ↗

Checkout will invoke an optional notification callback for certain cases - you pick which ones via `checkout_notify_flags`. Raising an exception from this callback will cancel the checkout. The exception will be propagated back and raised by the ``Repository

(
        self,
        why: CheckoutNotify,
        path: str,
        baseline: Optional[DiffFile],
        target: Optional[DiffFile],
        workdir: Optional[DiffFile],
    )

Source from the content-addressed store, hash-verified

295 return CheckoutNotify.ALL
296
297 def checkout_notify(
298 self,
299 why: CheckoutNotify,
300 path: str,
301 baseline: Optional[DiffFile],
302 target: Optional[DiffFile],
303 workdir: Optional[DiffFile],
304 ) -> None:
305 """
306 Checkout will invoke an optional notification callback for
307 certain cases - you pick which ones via `checkout_notify_flags`.
308
309 Raising an exception from this callback will cancel the checkout.
310 The exception will be propagated back and raised by the
311 ``Repository.checkout_...`` call.
312
313 Notification callbacks are made prior to modifying any files on disk,
314 so canceling on any notification will still happen prior to any files
315 being modified.
316 """
317 pass
318
319 def checkout_progress(
320 self, path: str, completed_steps: int, total_steps: int

Callers 1

_checkout_notify_cbFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected