Skip to content

Commit 15ab632

Browse files
jasugunThomas Desveaux
authored and
Thomas Desveaux
committed
Make GetCommitFileStatus list all files impacted by a merge commit
Enable APIs (such as 'api/v1/repos/{owner}/{repo}/git/commit/{sha1}') to correctly list all files impacted by a commit (making it mirror GitHub API behaviour). Previously would only return merge commit files if they where associated with a conflict resolution.
1 parent db8c3ec commit 15ab632

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/git/commit.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ func GetCommitFileStatus(ctx context.Context, repoPath, commitID string) (*Commi
500500
}()
501501

502502
stderr := new(bytes.Buffer)
503-
args := []string{"log", "--name-status", "-c", "--pretty=format:", "--parents", "--no-renames", "-z", "-1", commitID}
503+
args := []string{"log", "--name-status", "-c", "--pretty=format:", "--parents", "--no-renames", "-m", "-z", "-1", commitID}
504504

505505
err := NewCommand(ctx, args...).Run(&RunOpts{
506506
Dir: repoPath,

0 commit comments

Comments
 (0)