Update stale comments relating to object scanning and uploading#5163
Merged
chrisd8088 merged 2 commits intogit-lfs:mainfrom Oct 31, 2022
Merged
Update stale comments relating to object scanning and uploading#5163chrisd8088 merged 2 commits intogit-lfs:mainfrom
chrisd8088 merged 2 commits intogit-lfs:mainfrom
Conversation
In commit 338ab40 of PR git-lfs#1812 the prepareUpload() function was refactored so that it no longer checked whether an object to be pushed had a local file copy or not and skipped it if it did not. (That functionality already existed in the uploadTransfer() function in that it called the ensureFile() function before returning a tq.Transfer object. Note that these functions were in the commands/commands.go source file at the time. The uploadTransfer() function is called for each pointer blob object by uploadPointers().) However, commit 338ab40 did not update the comment in prepareUpload() which stated that the function skipped any objects which did not have local file copies, so we now revise that comment and add one in the uploadTransfer() function.
In commit e3fcde7 of PR git-lfs#3236 the ObjectScanner type was updated to use an internal ObjectDatabase from the github.com/git-lfs/gitobj package rather than invoking an external "git cat-file --batch" command. However, the comments for the catFileBatch() and runCatFileBatch() functions were not updated at the same time and still state that they cause a "git cat-file --batch" command to run, so we update them now.
bk2204
approved these changes
Oct 31, 2022
chrisd8088
added a commit
to chrisd8088/git-lfs
that referenced
this pull request
Nov 1, 2022
In commit 201b8ba of PR git-lfs#5163 we updated several comments relating to the change from the use of the "git cat-file --batch" command to an internal ObjectDatabase provided by the github.com/git-lfs/gitobj package. This change was originally made in e3fcde7 of PR git-lfs#3236, but various comments were not updated at the same time. In PR git-lfs#5163 we missed two of those comments, for the NewObjectScanner() and catFileBatchTree() functions, so we update those now as well.
chrisd8088
added a commit
to chrisd8088/git-lfs
that referenced
this pull request
Nov 1, 2022
In commit 201b8ba of PR git-lfs#5163 we updated several comments relating to the change from the use of the "git cat-file --batch" command to an internal ObjectDatabase provided by the github.com/git-lfs/gitobj package. This change was originally made in e3fcde7 of PR git-lfs#3236, but various comments were not updated at the same time. In PR git-lfs#5163 we missed two of those comments, for the NewObjectScanner() and catFileBatchTree() functions, so we update those now as well.
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.
This PR updates several stale comments that relate to scanning Git blob objects to find valid Git LFS pointers and to validating that objects have corresponding local file copies before uploading them.
In commit e3fcde7 of PR #3236 the
ObjectScannertype was updated to use an internalObjectDatabasefrom thegithub.com/git-lfs/gitobjpackage rather than invoking an externalgit cat-file --batchcommand. However, the comments for thecatFileBatch()andrunCatFileBatch()functions were not updated at the same time and still state that they cause agit cat-file --batchcommand to run, so we update them now.And in commit 338ab40 of PR #1812 the
prepareUpload()function was refactored so that it no longer checked whether an object to be pushed had a local file copy or not and skipped it if it did not. However, the comment which stated that the function skipped any objects which did not have local file copies was not updated, so we now revise that comment and add one in theuploadTransfer()function.