diff options
| -rw-r--r-- | gitTag.proto | 1 | ||||
| -rw-r--r-- | reloadParseGitConfig.go (renamed from reloadGitConfig.go) | 0 | ||||
| -rw-r--r-- | repo.new.go | 16 |
3 files changed, 16 insertions, 1 deletions
diff --git a/gitTag.proto b/gitTag.proto index eb04274..8c84f2b 100644 --- a/gitTag.proto +++ b/gitTag.proto @@ -15,7 +15,6 @@ message GitBranch { // `autogenpb:nomutex` string name = 3; // the branch name from the config file } -// readGitConfig reads and parses the .git/config file message GitConfig { // `autogenpb:nomutex` map<string, string> core = 1; // map[origin] = "https:/git.wit.org/gui/gadgets" map<string, GitRemote> remotes = 2; // map[origin] = "https:/git.wit.org/gui/gadgets" diff --git a/reloadGitConfig.go b/reloadParseGitConfig.go index 5373e2e..5373e2e 100644 --- a/reloadGitConfig.go +++ b/reloadParseGitConfig.go diff --git a/repo.new.go b/repo.new.go index 453fa0a..c48fde7 100644 --- a/repo.new.go +++ b/repo.new.go @@ -100,3 +100,19 @@ func (all *Repos) NewRepo(fullpath string, namespace string) (*Repo, error) { // todo: use Repos.Lock() return nil, errors.New("gitpb.NewRepo() append failed " + fullpath) } + +func NewRepo(fullpath string) (*Repo, error) { + // add a new one here + newr := Repo{ + FullPath: fullpath, + } + newr.Times = new(GitTimes) + + // everything happens in here + newr.Reload() + newr.ValidateUTF8() + if newr.Namespace == "" { + log.Info("GET Namespace from URL", newr.GetURL()) + } + return &newr, nil +} |
