Checkout will invoke an options notification callback (notify_cb) for
certain cases - you pick which ones via notify_flags:
- GIT_CHECKOUT_NOTIFY_CONFLICT invokes checkout on conflicting paths.
- GIT_CHECKOUT_NOTIFY_DIRTY notifies about "dirty" files, i.e. those that
do not need an update but no longer match the baseline. Core git
displays these files when checkout runs, but won't stop the checkout.
- GIT_CHECKOUT_NOTIFY_UPDATED sends notification for any file changed.
- GIT_CHECKOUT_NOTIFY_UNTRACKED notifies about untracked files.
- GIT_CHECKOUT_NOTIFY_IGNORED notifies about ignored files.
Returning a non-zero value from this callback will cancel the checkout.
The non-zero return value will be propagated back and returned by the
git_checkout_... call.
Notification callbacks are made prior to modifying any files on disk,
so canceling on any notification will still happen prior to any files
being modified.
Checkout notification flags
Checkout will invoke an options notification callback (notify_cb) for certain cases - you pick which ones via notify_flags:
- GIT_CHECKOUT_NOTIFY_CONFLICT invokes checkout on conflicting paths.
- GIT_CHECKOUT_NOTIFY_DIRTY notifies about "dirty" files, i.e. those that do not need an update but no longer match the baseline. Core git displays these files when checkout runs, but won't stop the checkout.
- GIT_CHECKOUT_NOTIFY_UPDATED sends notification for any file changed.
- GIT_CHECKOUT_NOTIFY_UNTRACKED notifies about untracked files.
- GIT_CHECKOUT_NOTIFY_IGNORED notifies about ignored files.
Returning a non-zero value from this callback will cancel the checkout. The non-zero return value will be propagated back and returned by the git_checkout_... call.
Notification callbacks are made prior to modifying any files on disk, so canceling on any notification will still happen prior to any files being modified.