Skip to content

Commit e4edf26

Browse files
Rename type to have more descriptive name.
1 parent 14d477b commit e4edf26

File tree

10 files changed

+17
-17
lines changed

10 files changed

+17
-17
lines changed

cache.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ func warnFail(cb cache.Backend, err error) cache.Cache {
1818
return cache.NewCache(cb)
1919
}
2020

21-
func getCache(gitRootPath string, repoFiles git.RepoFiles) cache.Cache {
21+
func getCache(gitRootPath string, repoFiles git.RepoConfigFiles) cache.Cache {
2222
var fallback cache.Backend = cacheBackends.NoopBackend{}
2323

2424
if !cache.IsCachingEnabled() {

dump.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ func dump(
6262
return err
6363
}
6464

65-
repoFiles, err := git.CheckRepoFiles(gitRootPath)
65+
repoFiles, err := git.CheckRepoConfigFiles(gitRootPath)
6666
if err != nil {
6767
return err
6868
}

hist.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ func hist(
8686
return err
8787
}
8888

89-
repoFiles, err := git.CheckRepoFiles(gitRootPath)
89+
repoFiles, err := git.CheckRepoConfigFiles(gitRootPath)
9090
if err != nil {
9191
return err
9292
}

internal/cache/backends/gob.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ func GobCacheDir(prefix string, gitRootPath string) string {
312312
return repoDir
313313
}
314314

315-
func GobCacheFilename(repoFiles git.RepoFiles) (string, error) {
315+
func GobCacheFilename(repoFiles git.RepoConfigFiles) (string, error) {
316316
stateHash, err := repoFiles.Hash()
317317
if err != nil {
318318
return "", err

internal/concurrent/concurrent.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ func TallyCommits(
297297
revspec []string,
298298
pathspecs []string,
299299
filters git.LogFilters,
300-
repoFiles git.RepoFiles,
300+
repoFiles git.RepoConfigFiles,
301301
opts tally.TallyOpts,
302302
cache cache.Cache,
303303
allowProgressBar bool,
@@ -329,7 +329,7 @@ func TallyCommitsTree(
329329
revspec []string,
330330
pathspecs []string,
331331
filters git.LogFilters,
332-
repoFiles git.RepoFiles,
332+
repoFiles git.RepoConfigFiles,
333333
opts tally.TallyOpts,
334334
worktreePaths map[string]bool,
335335
gitRootPath string,
@@ -367,7 +367,7 @@ func TallyCommitsTimeline(
367367
revspec []string,
368368
pathspecs []string,
369369
filters git.LogFilters,
370-
repoFiles git.RepoFiles,
370+
repoFiles git.RepoConfigFiles,
371371
opts tally.TallyOpts,
372372
end time.Time,
373373
cache cache.Cache,

internal/git/git.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ func CommitsWithOpts(
7171
pathspecs []string,
7272
filters LogFilters,
7373
populateDiffs bool,
74-
repoFiles RepoFiles,
74+
repoFiles RepoConfigFiles,
7575
) (
7676
iter.Seq2[Commit, error],
7777
func() error,

internal/git/repo.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,21 @@ import (
1111
"path/filepath"
1212
)
1313

14-
type RepoFiles struct {
14+
type RepoConfigFiles struct {
1515
MailmapPath string
1616
IgnoreRevsPath string
1717
}
1818

19-
func (rf RepoFiles) HasMailmap() bool {
19+
func (rf RepoConfigFiles) HasMailmap() bool {
2020
return len(rf.MailmapPath) > 0
2121
}
2222

23-
func (rf RepoFiles) HasIgnoreRevs() bool {
23+
func (rf RepoConfigFiles) HasIgnoreRevs() bool {
2424
return len(rf.IgnoreRevsPath) > 0
2525
}
2626

2727
// Returns a hash of the files we care about in the repo.
28-
func (rf RepoFiles) Hash() (string, error) {
28+
func (rf RepoConfigFiles) Hash() (string, error) {
2929
h := fnv.New32()
3030

3131
if rf.HasMailmap() {
@@ -79,7 +79,7 @@ func IgnoreRevsPath(gitRootPath string) string {
7979
}
8080

8181
// Checks to see whether the files exist on disk or not
82-
func CheckRepoFiles(gitRootPath string) (_ RepoFiles, err error) {
82+
func CheckRepoConfigFiles(gitRootPath string) (_ RepoConfigFiles, err error) {
8383
defer func() {
8484
if err != nil {
8585
err = fmt.Errorf(
@@ -89,7 +89,7 @@ func CheckRepoFiles(gitRootPath string) (_ RepoFiles, err error) {
8989
}
9090
}()
9191

92-
var files RepoFiles
92+
var files RepoConfigFiles
9393

9494
mailmapPath := MailmapPath(gitRootPath)
9595
_, err = os.Stat(mailmapPath)

parse.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ func parse(
6262
return err
6363
}
6464

65-
repoFiles, err := git.CheckRepoFiles(gitRootPath)
65+
repoFiles, err := git.CheckRepoConfigFiles(gitRootPath)
6666
if err != nil {
6767
return err
6868
}

table.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ func table(
101101
return err
102102
}
103103

104-
repoFiles, err := git.CheckRepoFiles(gitRootPath)
104+
repoFiles, err := git.CheckRepoConfigFiles(gitRootPath)
105105
if err != nil {
106106
return err
107107
}

tree.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ func tree(
110110
return err
111111
}
112112

113-
repoFiles, err := git.CheckRepoFiles(gitRootPath)
113+
repoFiles, err := git.CheckRepoConfigFiles(gitRootPath)
114114
if err != nil {
115115
return err
116116
}

0 commit comments

Comments
 (0)