Monorepo for Tangled
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

knotserver/git: fix double allocation of stdout

Signed-off-by: oppiliappan <me@oppi.li>

authored by

oppiliappan and committed by
Tangled
40e50b07 9076ff78

+3 -2
+3 -2
knotserver/git/diff.go
··· 145 145 return "", nil, err 146 146 } 147 147 148 - formatPatch, err := patchutil.ExtractPatches(stdout.String()) 148 + raw := stdout.String() 149 + formatPatch, err := patchutil.ExtractPatches(raw) 149 150 if err != nil { 150 151 return "", nil, err 151 152 } ··· 154 155 return "", nil, fmt.Errorf("running format-patch on single commit produced more than on patch") 155 156 } 156 157 157 - return stdout.String(), &formatPatch[0], nil 158 + return raw, &formatPatch[0], nil 158 159 } 159 160 160 161 func (g *GitRepo) ResolveRevision(revStr string) (*object.Commit, error) {