there exists a git flag to generate patches for a single commit: -1. use this instead of calculating the parent when preparing format-patches.
Signed-off-by: oppiliappan me@oppi.li
there exists a git flag to generate patches for a single commit: -1. use this instead of calculating the parent when preparing format-patches.
Signed-off-by: oppiliappan me@oppi.li
···-func (g *GitRepo) formatSinglePatch(base, commit2 plumbing.Hash, extraArgs ...string) (string, *types.FormatPatch, error) {+func (g *GitRepo) formatSinglePatch(commit plumbing.Hash, extraArgs ...string) (string, *types.FormatPatch, error) {···-parentHash = plumbing.NewHash("4b825dc642cb6eb9a060e54bf8d69288fbee4904") // git empty tree hashadditionalArgs = append(additionalArgs, "--add-header", fmt.Sprintf("Change-Id: %s", changeId))return "", nil, fmt.Errorf("failed to format patch for commit %s: %w", commit.Hash.String(), err)