only use fallback for default remote
This commit is contained in:
parent
e09b7b07fe
commit
dd3379d2a5
@ -125,7 +125,9 @@ func (e *endpointGitFinder) RemoteEndpoint(operation, remote string) lfshttp.End
|
||||
}
|
||||
|
||||
gitDir, err := git.GitDir()
|
||||
if err == nil {
|
||||
// Finally, fall back on .git/FETCH_HEAD but only if it exists and no specific remote was requested
|
||||
// We can't know which remote FETCH_HEAD is pointing to
|
||||
if err == nil && remote == defaultRemote {
|
||||
url, err := parseFetchHead(strings.Join([]string{gitDir, "FETCH_HEAD"}, "/"));
|
||||
if err == nil {
|
||||
endpoint := e.NewEndpointFromCloneURL("download", url);
|
||||
|
Loading…
Reference in New Issue
Block a user