init flag for new repos
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
b451591006
commit
8786690d46
|
@ -10,6 +10,7 @@ type RepoStatus struct {
|
||||||
changed bool // keeps track of changes that might have happened
|
changed bool // keeps track of changes that might have happened
|
||||||
changes string
|
changes string
|
||||||
tags map[string]string
|
tags map[string]string
|
||||||
|
InitOk bool // it takes a second or so to init these
|
||||||
|
|
||||||
window *gadgets.BasicWindow // the main window for this repo
|
window *gadgets.BasicWindow // the main window for this repo
|
||||||
Tags *GitTagBox // a box of all the git tags
|
Tags *GitTagBox // a box of all the git tags
|
||||||
|
|
|
@ -351,7 +351,7 @@ func (t *Tag) Name() string {
|
||||||
return t.tag.String()
|
return t.tag.String()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (t *Tag) getDate() (time.Time, error) {
|
func (t *Tag) GetDate() (time.Time, error) {
|
||||||
const gitLayout = "Mon Jan 2 15:04:05 2006 -0700"
|
const gitLayout = "Mon Jan 2 15:04:05 2006 -0700"
|
||||||
tagTime, err := time.Parse(gitLayout, t.date.String())
|
tagTime, err := time.Parse(gitLayout, t.date.String())
|
||||||
|
|
||||||
|
@ -375,7 +375,7 @@ func (rs *RepoStatus) NewestTag() *Tag {
|
||||||
allTags = append(allTags, junk...)
|
allTags = append(allTags, junk...)
|
||||||
for _, t := range allTags {
|
for _, t := range allTags {
|
||||||
mu.Lock()
|
mu.Lock()
|
||||||
if tagTime, err = t.getDate(); err != nil {
|
if tagTime, err = t.GetDate(); err != nil {
|
||||||
mu.Unlock()
|
mu.Unlock()
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue