prow/git/localgit/localgit.go
func (lg *LocalGit) MakeFakeRepo(org, repo string) error {
	rdir := filepath.Join(lg.Dir, org, repo)
	if err := os.MkdirAll(rdir, os.ModePerm); err != nil {
		return err
	}

	if err := runCmd(lg.Git, rdir, "init"); err != nil {
		return err
	}
	if err := runCmd(lg.Git, rdir, "config", "user.email", "test@test.test"); err != nil {
		return err
	}
	if err := runCmd(lg.Git, rdir, "config", "user.name", "test test"); err != nil {
		return err
	}
	if err := runCmd(lg.Git, rdir, "config", "commit.gpgsign", "false"); err != nil {
		return err
	}
	if err := lg.AddCommit(org, repo, map[string][]byte{"initial": {}}); err != nil {
		return err
	}

	return nil
}
func (lg *LocalGit) MakeFakeRepo(org, repo string) error {
	rdir := filepath.Join(lg.Dir, org, repo)
	if err := os.MkdirAll(rdir, os.ModePerm); err != nil {
		return err
	}

	if err := runCmd(lg.Git, rdir, "init"); err != nil {
		return err
	}
	if err := runCmd(lg.Git, rdir, "config", "user.email", "test@test.test"); err != nil {
		return err
	}
	if err := runCmd(lg.Git, rdir, "config", "user.name", "test test"); err != nil {
		return err
	}
	if err := runCmd(lg.Git, rdir, "config", "commit.gpgsign", "false"); err != nil {
		return err
	}
	if err := lg.AddCommit(org, repo, map[string][]byte{"initial": {}}); err != nil {
		return err
	}

	return nil
}
func ( lg * LocalGit ) MakeFakeRepo ( org , repo string ) error { rdir := filepath . Join ( lg . Dir , org , repo ) if err := os . MkdirAll ( rdir , os . ModePerm ) ; err != nil { return err } if err := runCmd ( lg . Git , rdir , " " ) ; err != nil { return err } if err := runCmd ( lg . Git , rdir , " " , " " , " " ) ; err != nil { return err } if err := runCmd ( lg . Git , rdir , " " , " " , " " ) ; err != nil { return err } if err := runCmd ( lg . Git , rdir , " " , " " , " " ) ; err != nil { return err } if err := lg . AddCommit ( org , repo , map [ string ] [ ] byte { " " : { } } ) ; err != nil { return err } return nil }
// MakeFakeRepo creates the given repo and makes an initial commit.
MakeFakeRepo creates the given repo and makes an initial commit .