diff --git a/knotserver/git/merge.go b/knotserver/git/merge.go --- a/knotserver/git/merge.go +++ b/knotserver/git/merge.go @@ -175,7 +175,7 @@ if err := stageCmd.Run(); err != nil { return fmt.Errorf("failed to stage changes: %w", err) } - commitArgs := []string{"-C", g.path, "commit"} + commitArgs := []string{"-C", g.path, "commit", "--allow-empty"} // Set author if provided authorName := opts.AuthorName @@ -237,7 +237,7 @@ return plumbing.ZeroHash, fmt.Errorf("failed to create temporary patch file for singular mailbox patch: %w", err) } var stderr bytes.Buffer - cmd := exec.Command("git", "-C", g.path, "am", tmpPatch) + cmd := exec.Command("git", "-C", g.path, "am", "--allow-empty", tmpPatch) cmd.Stderr = &stderr head, err := g.r.Head()