Skip to main content

fetch_origin

Function fetch_origin 

Source
pub async fn fetch_origin(cwd: &Path, timeout: Duration) -> Result<()>
Expand description

Fetch origin’s branches into refs/remotes/origin/* in cwd, bounded by timeout.

The destination is fixed on the command line and the remote is addressed by its URL rather than its name. A plain git fetch origin follows the configured remote.origin.fetch, which can map onto local branches (+refs/heads/main:refs/heads/main) or a single branch, and even a fetch with an explicit refspec updates remote-tracking refs from that config when the remote is named. By URL, nothing but the refspec given here is written: no local branch, HEAD, index or working tree. A child still running at the deadline is killed on drop.