WrapRepo creates a new Repo instance for an existing git repo
(c RepoCallback, path string)
| 243 | |
| 244 | // WrapRepo creates a new Repo instance for an existing git repo |
| 245 | func WrapRepo(c RepoCallback, path string) *Repo { |
| 246 | cfg := config.NewIn(path, "") |
| 247 | return &Repo{ |
| 248 | Path: path, |
| 249 | GitDir: cfg.LocalGitDir(), |
| 250 | Settings: &RepoCreateSettings{ |
| 251 | RepoType: RepoTypeNormal, |
| 252 | }, |
| 253 | callback: c, |
| 254 | cfg: cfg, |
| 255 | gitfilter: lfs.NewGitFilter(cfg), |
| 256 | fs: cfg.Filesystem(), |
| 257 | } |
| 258 | } |
| 259 | |
| 260 | // Simplistic fire & forget running of git command - returns combined output |
| 261 | func RunGitCommand(callback RepoCallback, failureCheck bool, args ...string) string { |
no test coverage detected