fork of go-git with some jj specific features
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge pull request #828 from fooker/patch-1

Use remote name in fetch while clone

authored by

Máximo Cuadros and committed by
GitHub
03810084 0bfe038a

+19 -5
+6 -5
repository.go
··· 654 654 } 655 655 656 656 ref, err := r.fetchAndUpdateReferences(ctx, &FetchOptions{ 657 - RefSpecs: r.cloneRefSpec(o, c), 658 - Depth: o.Depth, 659 - Auth: o.Auth, 660 - Progress: o.Progress, 661 - Tags: o.Tags, 657 + RefSpecs: r.cloneRefSpec(o, c), 658 + Depth: o.Depth, 659 + Auth: o.Auth, 660 + Progress: o.Progress, 661 + Tags: o.Tags, 662 + RemoteName: o.RemoteName, 662 663 }, o.ReferenceName) 663 664 if err != nil { 664 665 return err
+13
repository_test.go
··· 568 568 c.Assert(cfg.Branches["master"].Name, Equals, "master") 569 569 } 570 570 571 + func (s *RepositorySuite) TestPlainCloneWithRemoteName(c *C) { 572 + r, err := PlainClone(c.MkDir(), false, &CloneOptions{ 573 + URL: s.GetBasicLocalRepositoryURL(), 574 + RemoteName: "test", 575 + }) 576 + 577 + c.Assert(err, IsNil) 578 + 579 + remote, err := r.Remote("test") 580 + c.Assert(err, IsNil) 581 + c.Assert(remote, NotNil) 582 + } 583 + 571 584 func (s *RepositorySuite) TestPlainCloneContext(c *C) { 572 585 ctx, cancel := context.WithCancel(context.Background()) 573 586 cancel()