pub fn try_watch_tip(
worktree_root: &Path,
real_git: &Path,
overlay: &[(OsString, OsString)],
environment: &[(OsString, OsString)],
) -> Result<TipWatch, Declined>Expand description
What:
Start watching the branch of a worktree before a command runs.
Why:
The command may be a merge or a pull, which move the tip; what the tip was is what a rebase is told apart by.
The layout is read as for a caller that follows a Git run that succeeds (read_layout_after_success):
a configuration value the reader cannot prove is no reason not to push once the command that moved the tip succeeded
(the files are read again,
not the snapshot that command saw,
and the final push is Git’s).
In TS you’d write (pseudocode):
function watchTip(worktreeRoot, realGit, overlay, environment): TipWatch | Declined;