pkg: allow the omission of the --filter argument #20010
Open
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 will allow the explicit omission of the --filter argument in the case of git servers that do not support filtering (reduces warnings on output)
Contribution description
If you provide a definition for the variable
NO_GIT_FILTERING
, then the--filter=blob:none
argument to thegit fetch
operation will be omitted. This helps clean up occurrences of this message on build:warning: filtering not recognized by server, ignoring
which makes the build output cleaner. I briefly perused git documentation to see if there is a way to test if the server supports filtering, but did not find anything, so I opted to allow the user to specify this on their own, if desired.Testing procedure
I built with and without a definition of
NO_GIT_FILTERING
. The messagewarning: filtering not recognized by server, ignoring
shows up in the log when it is NOT defined, and does not show up when it IS defined (in both cases I cleared out build/pkg to ensure it was doing a full fetch).Issues/PRs references
N/A