Repository navigation
Fix progress - #2608
Merged
Merged
Fix progress#2608
Conversation
chrisd8088
added a commit
that referenced
this pull request
Aug 5, 2026
In commit e8325a9 of PR #2608 we added the original version of our "t/t-progress.sh" shell test script with a single test named "GIT_LFS_PROGRESS". This test remains the only one in the script, and is intended to verify that the Git LFS client writes progress log messages into the file specified with the GIT_LFS_PROGRESS environment variable. At present, the test creates a repository whose name is derived solely from the name of the script. In a subsequent commit in this PR we expect to add additional tests to the "t/t-progress.sh" script, and so we now revise the initial test to name its repository from a local variable with a fixed value. We also change the name of the test to more clearly identify its purpose and to align its name with that of its test repository. The Git LFS client requires that the GIT_LFS_PROGRESS environment variable contain an absolute file path before the client will write any progress log messages to the file. The test therefore sets the environment variable with an absolute path to a file named "progress.log" in the directory specified by the TRASHDIR shell variable. This directory is created during the initialization of each shell test script and is unique to the script. However, since we intend to add new tests to the "t/t-progress.sh" script, if we use the same file path for the GIT_LFS_PROGRESS environment variable in each test, we will need all the tests which follow the initial one to begin by removing the file, or else the tests may pass because they unintentionally match lines in the log created by previous tests. We therefore rewrite the initial test to create a series of unique progress log files in a directory unique to the test, whose path we construct using the TRASHDIR variable plus the name of the test's repository. As well, we expand the test so that it now verifies all of the types of progress log messages output by the Git LFS client, including for both "clean" filter operations and "upload" object transfers. Note that "clean" filter operations are logged separately for each object, so we always find "1/1" fields in these messages (i.e., "one file of one total file"), whereas our other messages report "1/n" fields where "n" is the total number of objects being downloaded or uploaded. We also take the opportunity to insert clarifying whitespace to the test, add a check that the "git push" command returned an exit code of zero to indicate success, and change the name of the directory into which the test clones its primary repository to follow our current idiom, in which we append the suffix "-assert" to the name of the source repository.
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.
Fixes 3 issues with
GIT_LFS_PROGRESS:lfs pullorlfs clone, since(*ProgressMeter) StartTransfer(string)is called in the GitScanner before being added to the transfer queue AND in the transfer queue. GIT_LFS_PROGRESS's <current>/<total files> is wrong #2599checkoutnever knows how many files there are, so the progress is reported as1/1,2/2,3/3, etc.I'm not crazy about changing
checkoutto accumulate a[]*WrappedPointerslice, but it's the only way to know the total number of files to checkout before starting to check files out.