Fetches from the remote and compares local HEAD SHA against the upstream HEAD SHA. If the local branch is behind, aborts with a clear message telling the developer to pull first.
Arguments
- path
Repository path.
- pat
GitHub personal access token. Passed to
.datom_git_credentials(). NULL means unauthenticated.
Details
Does NOT auto-pull - lets the developer decide how to resolve.
If the fetch fails (offline, unreachable remote), this warns and returns
TRUE without comparing anything: the cached remote-tracking refs may be
arbitrarily stale, so acting on them would abort an offline developer for
being behind a remote they cannot reach. The backstop is
.datom_git_push(), which pulls and aborts if the push is rejected, so a
write cannot land on storage from a stale base.