Repository navigation
include ref in upload request - #1456
Closed
technoweenie wants to merge 10 commits into
Closed
technoweenie wants to merge 10 commits into
technoweenie wants to merge 10 commits into
Conversation
Adds "ref" parameter extracted from git pre-push hook into the upload request. This way servers with branch access permissions can enforce them before large objects are transfered. Issue: #845
In push hook refs comes from user and points to local branches. Transporting them to server doesn't make sense.
Don't add empty "ref" parameter to the lfs-request object when its value is empty.
Instead of passing around additional string parameter with destination ref, we pass special struct called UploadMetadata. For now UploadMetadata contains only ref field but in the future more metadata like file name (or path) can be added.
Move "ref" property of batch request into "meta" object, this way all meta data have a common place to live instead of being spread all around the batch request.
Since we also want to have metadata included in fetch request the UploadMetadata struct is renamed to TransferMetadata. Patch that adds metadata to fetch request will follow.
Include meta.ref property in download request object, same as it is in the upload request. In case of download meta.ref contain name of currently check out local branch and can be only a suggestion to server implementation.
Normalize the value of meta.ref parameter of batch request object. Previously ref parameter format differs between "download" and "upload" objects. The "upload" always was using the fully qualified branch name (eg. refs/heads/master), when the "download" used short name (eg. master). Right now meta.ref will have consistent values. When "refs/heads/" prefix will be appended when it is not present. Special "HEAD" reference will be replaced with empty string, which will result in meta.ref parameter not being included in the request object.
moved lfs.TransferMetadata to api.BatchMetadata to remove cyclical dependency
Contributor
|
Are the checkboxes to-do items? |
Contributor
Author
|
Yup. Add to it if you think of anything else. |
Contributor
|
Tentatively milestone-ing this into v2.2.0 per #2190 (comment). |
Contributor
Author
|
Superseded by #2706 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updates #969 against the current master. This was not a straight forward update because the code base has gone through a pretty major refactoring since then.
To-do: