From 233f7bca767aab9df55adea409e9820050631586 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Tue, 17 Dec 2024 06:37:14 -0600 Subject: lots of changes to isolate exec 'git' --- common.go | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 common.go (limited to 'common.go') diff --git a/common.go b/common.go new file mode 100644 index 0000000..cd88d45 --- /dev/null +++ b/common.go @@ -0,0 +1,23 @@ +package gitpb + +import "go.wit.com/log" + +func (repo *Repo) SetReadOnly(b bool) { + repo.ReadOnly = b +} + +func (repo *Repo) SetTargetVersion(target string) { + repo.TargetVersion = target +} + +func (repo *Repo) SetMasterBranchName(s string) { + log.Info("gitpb.SetMaster() SET MASTER TO", s) + repo.MasterBranchName = s +} + +func (repo *Repo) GetGoPath() string { + if repo.GoInfo == nil { + return "" + } + return repo.GoInfo.GoPath +} -- cgit v1.2.3