Skip to content

internal/gitserver/protocol: Set omitempty in RepoUpdateResponse

Warren Gifford requested to merge ig/repoupdaterespone-ignore-empty into main

Created by: indradhanush

When the /repo-update endpoint clones a repo, the response returned is an empty struct with zero-values encoded into the JSON string. Instead we can omit the fields completely.

Additionally, reword the docstring of the Error attribute of this struct for clarity.

Also remove outdated comment about using RepoInfoResponse. There is no other reference to this mythical struct apart from the one in this comment.

Note to reviewers:

Not sure why the commit's build icon is a red cross even though all checks have passed.

image

Test plan

Existing tests should pass.

Merge request reports

Loading