Skip to content

Commit

Permalink
Removed unused functions
Browse files Browse the repository at this point in the history
  • Loading branch information
rcowham committed May 21, 2023
1 parent 92aa648 commit a7b8ed4
Showing 1 changed file with 6 additions and 46 deletions.
52 changes: 6 additions & 46 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -349,15 +349,6 @@ func (gc *GitCommit) findGitFile(name string) *GitFile {
return nil
}

func (gc *GitCommit) findGitFileRename(fromName string) *GitFile {
for _, gf := range gc.files {
if gf.srcName == fromName {
return gf
}
}
return nil
}

func (gc *GitCommit) ref() string {
return fmt.Sprintf("%s:%d", gc.branch, gc.commit.Mark)
}
Expand Down Expand Up @@ -779,12 +770,12 @@ func minval(val, min int) int { // Minimum of specified val or min
return val
}

func maxval(val, max int) int { // Maxiumum of specified val or max
if val > max {
return max
}
return val
}
// func maxval(val, max int) int { // Maxiumum of specified val or max
// if val > max {
// return max
// }
// return val
// }

// WriteJournal writes journal record for a GitFile
func (gf *GitFile) WriteJournal(j *journal.Journal, c *GitCommit) {
Expand Down Expand Up @@ -1354,37 +1345,6 @@ func findExactNameMatches(files []*GitFile, name string) []*GitFile {
return result
}

func findDirMatches(files []*GitFile, name string) []*GitFile {
result := make([]*GitFile, 0)
for _, gf := range files {
if hasDirPrefix(gf.name, name) || hasDirPrefix(gf.srcName, name) {
result = append(result, gf)
}
}
return result
}

// Files which are a rename
func findRenameSources(files []*GitFile, name string) []*GitFile {
result := make([]*GitFile, 0)
for _, gf := range files {
if gf.action == rename && gf.srcName == name {
result = append(result, gf)
}
}
return result
}

func findDirRenameSources(files []*GitFile, name string) []*GitFile {
result := make([]*GitFile, 0)
for _, gf := range files {
if gf.action == rename && hasDirPrefix(gf.srcName, name) {
result = append(result, gf)
}
}
return result
}

// func findSrcName(files []*GitFile, name string) *GitFile {
// for _, gf := range files {
// if gf.srcName == name {
Expand Down

0 comments on commit a7b8ed4

Please sign in to comment.