diff options
| author | Jeff Carr <[email protected]> | 2025-09-11 13:40:48 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-09-11 13:40:48 -0500 |
| commit | e395456c536b2458563d5e872a73e8667cc08659 (patch) | |
| tree | c9976e9faecac92aeda0aca2cf60ee03a4890f1e /repo.new.go | |
| parent | cb604213743839453565a58afbb72bb63a66a9e1 (diff) | |
cleaning up .git/config parsing
Diffstat (limited to 'repo.new.go')
| -rw-r--r-- | repo.new.go | 16 |
1 files changed, 16 insertions, 0 deletions
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 +} |
