diff options
| author | Jeff Carr <[email protected]> | 2025-03-22 21:38:18 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-03-22 21:38:18 -0500 |
| commit | 27820d88f23820ffb3facbbda993679d76b98f5a (patch) | |
| tree | 8aee010bb6a30d542848b7005102da186bd6e74e /reloadTags.go | |
| parent | 0bf8cc3d79257f7245d9591d6811ab1207cfddba (diff) | |
discover branches
Diffstat (limited to 'reloadTags.go')
| -rw-r--r-- | reloadTags.go | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/reloadTags.go b/reloadTags.go index 444dc86..37bc762 100644 --- a/reloadTags.go +++ b/reloadTags.go @@ -11,6 +11,22 @@ import ( timestamppb "google.golang.org/protobuf/types/known/timestamppb" ) +func (repo *Repo) AllCommits() { + tags := []string{"cd", "%(creatordate)", "%(*authordate)", "%(refname)", "%(subject)"} + format := strings.Join(tags, "_,,,_%") + + cmd = []string{"git", "log", "--format=%cd"} + result = shell.PathRunQuiet(repo.FullPath, cmd) + if result.Error != nil { + log.Warn("git for-each-ref error:", result.Error) + return result.Error + } + newest := strings.Join(result.Stdout, "\n") + newest = strings.TrimSpace(newest) + tmp := getGitDateStamp(newest) + repo.Times.NewestCommit = timestamppb.New(tmp) +} + // reload the tags func (repo *Repo) reloadGitTags() error { // todo: look for changes in the tags? @@ -74,6 +90,7 @@ func (repo *Repo) reloadGitTags() error { // good format for insuring the hashs are identical when using git am // git log -1 --format="%H %aI %cI %an %ae %cn %ce" // also set the repo.NewestCommit + cmd = []string{"git", "log", "-1", "--format=%cd"} result = shell.PathRunQuiet(repo.FullPath, cmd) if result.Error != nil { |
