Monorepo for Tangled tangled.org
761
fork

Configure Feed

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

knotserver/git: allow applying empty patches

will just create an empty commit with title/body if a mailbox is
supplied with an empty patch.

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

authored by

oppiliappan and committed by
Tangled
8de928b9 bca487f7

+2 -2
+2 -2
knotserver/git/merge.go
··· 175 175 return fmt.Errorf("failed to stage changes: %w", err) 176 176 } 177 177 178 - commitArgs := []string{"-C", g.path, "commit"} 178 + commitArgs := []string{"-C", g.path, "commit", "--allow-empty"} 179 179 180 180 // Set author if provided 181 181 authorName := opts.AuthorName ··· 237 237 } 238 238 239 239 var stderr bytes.Buffer 240 - cmd := exec.Command("git", "-C", g.path, "am", tmpPatch) 240 + cmd := exec.Command("git", "-C", g.path, "am", "--allow-empty", tmpPatch) 241 241 cmd.Stderr = &stderr 242 242 243 243 head, err := g.r.Head()