aboutsummaryrefslogtreecommitdiffstats
path: root/repository.go
diff options
context:
space:
mode:
authorDustin Frisch <fooker@lab.sh>2018-05-09 12:50:49 +0200
committerDustin Frisch <fooker@lab.sh>2018-05-09 12:56:39 +0200
commit2eb97fb44707bc122c53bf2ad8eaf24ad8d679f4 (patch)
treed76e1667dfcadb84e959211147f1a8dd6fd5dd5c /repository.go
parent47417ae81f81e520b003fbe3166c5842d5acce91 (diff)
downloadgo-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.go9
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