diff options
author | Santiago M. Mola <santi@mola.io> | 2016-12-19 23:36:44 +0100 |
---|---|---|
committer | Máximo Cuadros <mcuadros@gmail.com> | 2016-12-19 23:36:44 +0100 |
commit | 90d67bb648ae32d5b1a0f7b1af011da6dfb24315 (patch) | |
tree | fc8c14e82974be6ff49e842328ec3206ebf1b4c2 /config/config.go | |
parent | 725ade0de6f60549e65cc4d94094b1f5ed48587f (diff) | |
download | go-git-90d67bb648ae32d5b1a0f7b1af011da6dfb24315.tar.gz |
remote: add Push (#178)
* remote: add Push.
* add Push method to Remote.
* add method Push to Repository.
* examples: add push example.
* requested changes
* add tests, fixes
Diffstat (limited to 'config/config.go')
-rw-r--r-- | config/config.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/config/config.go b/config/config.go index dc76571..a2b5012 100644 --- a/config/config.go +++ b/config/config.go @@ -7,8 +7,10 @@ import ( ) const ( - // DefaultRefSpec is the default refspec used, when none is given - DefaultRefSpec = "+refs/heads/*:refs/remotes/%s/*" + // DefaultFetchRefSpec is the default refspec used for fetch. + DefaultFetchRefSpec = "+refs/heads/*:refs/remotes/%s/*" + // DefaultPushRefSpec is the default refspec used for push. + DefaultPushRefSpec = "refs/heads/*:refs/heads/*" ) // ConfigStorer generic storage of Config object @@ -72,7 +74,7 @@ func (c *RemoteConfig) Validate() error { } if len(c.Fetch) == 0 { - c.Fetch = []RefSpec{RefSpec(fmt.Sprintf(DefaultRefSpec, c.Name))} + c.Fetch = []RefSpec{RefSpec(fmt.Sprintf(DefaultFetchRefSpec, c.Name))} } return nil |