diff options
author | Dustin Frisch <fooker@lab.sh> | 2018-05-09 12:50:49 +0200 |
---|---|---|
committer | Dustin Frisch <fooker@lab.sh> | 2018-05-09 12:56:39 +0200 |
commit | 2eb97fb44707bc122c53bf2ad8eaf24ad8d679f4 (patch) | |
tree | d76e1667dfcadb84e959211147f1a8dd6fd5dd5c /repository.go | |
parent | 47417ae81f81e520b003fbe3166c5842d5acce91 (diff) | |
download | go-git-2eb97fb44707bc122c53bf2ad8eaf24ad8d679f4.tar.gz |
Use remote name in fetch while clone
Fixes #827
Signed-off-by: Dustin Frisch <fooker@lab.sh>
Diffstat (limited to 'repository.go')
-rw-r--r-- | repository.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/repository.go b/repository.go index 717381b..2479666 100644 --- a/repository.go +++ b/repository.go @@ -520,10 +520,11 @@ func (r *Repository) clone(ctx context.Context, o *CloneOptions) error { ref, err := r.fetchAndUpdateReferences(ctx, &FetchOptions{ RefSpecs: r.cloneRefSpec(o, c), - Depth: o.Depth, - Auth: o.Auth, - Progress: o.Progress, - Tags: o.Tags, + Depth: o.Depth, + Auth: o.Auth, + Progress: o.Progress, + Tags: o.Tags, + RemoteName: o.RemoteName, }, o.ReferenceName) if err != nil { return err |