introduce Client.GetArchiveReader #476
No reviewers
Labels
No Label
has/backport
has/pull
in progress
invalid
kind/breaking
kind/bug
kind/build
kind/deployment
kind/docs
kind/enhancement
kind/feature
kind/lint
kind/proposal
kind/question
kind/refactor
kind/security
kind/testing
kind/translation
kind/ui
need/backport
priority/critical
priority/low
priority/maybe
priority/medium
reviewed/duplicate
reviewed/invalid
reviewed/wontfix
skip-changelog
status/blocked
status/needs-feedback
status/needs-reviews
status/wip
upstream/gitea
No Milestone
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: gitea/go-sdk#476
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "petergardfjall/go-sdk:get-archive-with-readcloser"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR fix #475
It complements the
Client.GetArchive
call, which returns a byte slice and hence is unsuitable for use with large repositories, with aClient.GetArchiveReader
method that returns aio.ReadCloser
that streams the retrieved archvie and, therefore, induces a much smaller memory footprint on the calling client.244a7cda6c
toc7fe43a3c5
@ -423,0 +426,4 @@
// such as a branch name (`master`), a commit hash (`70b7c74b33`), a tag
// (`v1.2.1`). The archive is returned as a byte stream in a ReadCloser. It is
// the responsibility of the client to close the reader.
func (c *Client) GetArchiveReader(owner, repo, ref string, ext ArchiveType) (io.ReadCloser, error) {
does it cost us resources to return resp iteslve too?
I think not ... and for consistency it should be returned too
True. Fixed in
17a5f72
?