diff options
| author | ewy <ewy0@protonmail.com> | 2026-04-17 00:05:32 +0200 |
|---|---|---|
| committer | ewy <ewy0@protonmail.com> | 2026-04-17 00:05:32 +0200 |
| commit | 809b28e3de2ea1bcaecc44a0872df26aa22b3ba2 (patch) | |
| tree | d9474487501a484379f6a9b6004338a8b46f204b /git | |
| parent | 022072ce8bac114ea0a7b94132ed3b8630de2f90 (diff) | |
fix git stuff failing when no changes
Diffstat (limited to 'git')
| -rw-r--r-- | git/git.go | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -77,6 +77,9 @@ func (g *gitMod) Diff(source *model.Source) (int, int, int, error) { insertions := 0 deletions := 0 for _, s := range split { + if strings.TrimSpace(s) == "" { + return 0, 0, 0, nil + } var e error pt := strings.Split(strings.TrimSpace(s), " ") num, e := strconv.Atoi(pt[0]) |
