isomorphic-git / isomorphic-git/isomorphic-git

`git fetch` doesn't use the configured upstream remote

Open
#774 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
8.4k
Forks
491
Avg merge
2h 53m
Merged PRs (30d)
7

Description

According to the canonical git documentation (emphasis mine):
> When no remote is specified, by default the `origin` remote will be used, _unless there’s an upstream branch configured for the current branch._

`git.pull` does this...
https://github.com/isomorphic-git/isomorphic-git/blob/f3b4ddb34ec1ffd06af3eb42cd106aeb42758827/src/commands/pull.js#L74-L78

but `git.fetch` doesn't...
https://github.com/isomorphic-git/isomorphic-git/blob/f3b4ddb34ec1ffd06af3eb42cd106aeb42758827/src/commands/fetch.js#L235-L236

and I'm 99% sure that's simply because I wrote `git.fetch` in the olden days before I'd implemented better remote tracking config.

**Technically, this is a breaking change.** Hmm.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.