diff options
| author | ewy <ewy0@protonmail.com> | 2026-04-22 21:31:50 +0200 |
|---|---|---|
| committer | ewy <ewy0@protonmail.com> | 2026-04-22 21:31:50 +0200 |
| commit | b976d31f41312f711eb537e051fd12efc0b9d14a (patch) | |
| tree | 9e8c2ac8773f30e2ebf1d83ab55853cf199b774b | |
| parent | f26334fe0a2cd5681df290d164b0449617f98721 (diff) | |
move declaration to top so it's easy to find
| -rw-r--r-- | git/git.go | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -65,7 +65,7 @@ func (g *gitMod) Branch(source *model.Source) (string, error) { var UnknownResponseError = errors.New("unknown response") -func (g *gitMod) Diff(source *model.Source) (int, int, int, error) { +func (g *gitMod) Diff(source *model.Source) (changes int, insertions int, deletions int, err error) { cmd := exec.Command(g.Git, "diff", "--shortstat") cmd.Dir = source.Path b, err := cmd.CombinedOutput() @@ -73,9 +73,6 @@ func (g *gitMod) Diff(source *model.Source) (int, int, int, error) { return 0, 0, 0, err } split := strings.Split(string(b), ",") - changes := 0 - insertions := 0 - deletions := 0 for _, s := range split { if strings.TrimSpace(s) == "" { return 0, 0, 0, nil |
