SetHash will set the hash of the admin repo to use when loading.
(hash string)
| 188 | |
| 189 | // SetHash will set the hash of the admin repo to use when loading. |
| 190 | func (c *Config) SetHash(hash string) error { |
| 191 | adminRepo, err := git.EnsureRepo(c.fs, "admin/admin") |
| 192 | if err != nil { |
| 193 | return err |
| 194 | } |
| 195 | |
| 196 | err = adminRepo.Checkout(hash) |
| 197 | if err != nil { |
| 198 | return err |
| 199 | } |
| 200 | |
| 201 | c.adminRepoHash = hash |
| 202 | |
| 203 | return nil |
| 204 | } |
| 205 | |
| 206 | // SetUserHash will set the hash of the given user repo to use when loading. |
| 207 | func (c *Config) SetUserHash(username, hash string) error { |
no test coverage detected