SHTK_GIT_FETCH(3)
SHTK_GIT_FETCH(3) Library Functions Manual SHTK_GIT_FETCH(3)

shtk_git_fetchChecks out or updates a Git working copy

shtk_import git

shtk_git_fetch repo branch directory

The shtk_git_fetch function is a simple wrapper over the lower-level shtk_git_checkout(3) and shtk_git_update(3) functions, using one or the other depending on the status of the local working copy.

More specifically: if directory does not yet exist or it is empty, the shtk_git_fetch function checks out a new working copy of the repository repo into it using the given branch. If directory does exist and contains a Git control directory, then the shtk_git_fetch function performs a working copy update of the repository using the given branch.

shtk_git_fetch https://example.com/repo.git master /usr/src

shtk(3), shtk_git(3)

shtk_git_fetch first appeared in shtk 1.8.

January 6, 2025 Debian