Skip to content
Snippets Groups Projects

internal/gitserver/protocol: Set omitempty in RepoUpdateResponse

Merged 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
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading