Skip to content

Commit a28032b

Browse files
committed
up: rename the repo info field LastCID to LastHash
1 parent 3c08adf commit a28032b

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

info.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ type RepoInfo struct {
1616
Path string
1717
Dir string
1818
URL string
19-
// LastCID value
20-
LastCID string
21-
Branch string
22-
Version string
19+
// LastHash last commit hash value
20+
LastHash string
21+
Branch string
22+
Version string
2323
}

repo.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,9 @@ func (r *Repo) Info() *RepoInfo {
110110
Dir: r.dir,
111111
URL: rt.RawURLOfHTTP(),
112112
// more
113-
Branch: r.CurBranchName(),
114-
Version: r.LargestTag(),
115-
LastCID: r.LastAbbrevID(),
113+
Branch: r.CurBranchName(),
114+
Version: r.LargestTag(),
115+
LastHash: r.LastAbbrevID(),
116116
}
117117
}
118118

repo_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ func TestRepo_AutoMatchTag(t *testing.T) {
5353

5454
func TestRepo_BranchInfos(t *testing.T) {
5555
bs := repo.BranchInfos()
56-
// dump.P(bs)
5756
assert.NotEmpty(t, bs)
57+
dump.P(bs.BrLines())
5858

5959
assert.NotEmpty(t, repo.BranchInfo("main"))
6060
assert.NotEmpty(t, repo.SearchBranches("main", gitw.BrSearchAll))

0 commit comments

Comments
 (0)