pub fn commit_branch_and_push(
root: &Path,
branch: &str,
message: &str,
token: &str,
github: &Repo,
paths: &[PathBuf],
) -> Result<PushOutcome>Expand description
Commits paths onto branch without moving HEAD, then force-pushes
branch to github over HTTPS with token.
When paths leave the tree unchanged, nothing is pushed and the result is
PushOutcome::Empty.
ยงErrors
Returns an error when:
rootis not inside a git repository;- the repository has no workdir, or HEAD names no commit;
- a path lies outside the workdir, is not UTF-8, or cannot be read or filtered;
- the commit or branch ref cannot be written;
git pushfails or runs past five minutes.