fetchgit: give leaveDotGit, nonConeMode, and sparseCheckout a default value null#462032
fetchgit: give leaveDotGit, nonConeMode, and sparseCheckout a default value null#462032ShamrockLee merged 13 commits intoNixOS:masterfrom
leaveDotGit, nonConeMode, and sparseCheckout a default value null#462032Conversation
0d8b63e to
6c38877
Compare
MattSturgeon
left a comment
There was a problem hiding this comment.
Looks simpler, nice!
| # > from standard in as a newline-delimited list instead of from the arguments. | ||
| sparseCheckout = builtins.concatStringsSep "\n" sparseCheckout; | ||
| sparseCheckout = | ||
| assert nonConeMode -> (sparseCheckout != [ ]); |
There was a problem hiding this comment.
Would it be better to use assertMsg or throwIfNot (my preference) to print a user-facing error? Or is it enough that this LoC will show up in the stacktrace?
There was a problem hiding this comment.
To be clear: this isn't blocking. Error messages can be added by those in-the-know in a dedicated PR.
There was a problem hiding this comment.
I see. Thank you for reviewing and approval!
There was a problem hiding this comment.
@winterqt I'm merging this PR, but feel free to leave a comment here or add the implementation comment in a new PR.
31e0db2 to
ca991ad
Compare
leaveDotGit a default value nullleaveDotGit, nonConeMode, and sparseCheckout a default value null
8ad0962 to
7ebb737
Compare
|
@MattSturgeon I applied similar changes to I also delegated the IIRC, the current supported way to override |
|
18206ab to
b7e1759
Compare
b7e1759 to
5c51547
Compare
MattSturgeon
left a comment
There was a problem hiding this comment.
LGTM, other than treefmt failing
Co-authored-by: Matt Sturgeon <matt@sturgeon.me.uk>
0f72e09 to
ea1e4d7
Compare
Instead of dynamically deciding on the default value of
leaveDotGitinfetchgit's set pattern, this PR assigns a defaultnulland decide on the actual default inside the function body.This allows dependent expressions to pass
leaveDotGit = nulldirectly, eliminating the need of conditional passing.Things done
passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.Add a 👍 reaction to pull requests you find important.