Push update a remote with the local changes
(remote string)
| 124 | |
| 125 | // Push update a remote with the local changes |
| 126 | func (c *RepoCache) Push(remote string) (string, error) { |
| 127 | prefixes := make([]string, len(c.subcaches)) |
| 128 | for i, subcache := range c.subcaches { |
| 129 | prefixes[i] = subcache.GetNamespace() |
| 130 | } |
| 131 | |
| 132 | // push everything at once, to have a single auth step if required |
| 133 | return c.repo.PushRefs(remote, prefixes...) |
| 134 | } |
| 135 | |
| 136 | // Pull will do a Fetch + MergeAll |
| 137 | // This function will return an error if a merge fail |