Skip to content

Instantly share code, notes, and snippets.

@goertzenator
Created July 11, 2022 15:09
Show Gist options
  • Save goertzenator/3e8c73272822e56325b71411efb58bf4 to your computer and use it in GitHub Desktop.
Save goertzenator/3e8c73272822e56325b71411efb58bf4 to your computer and use it in GitHub Desktop.
enable git allrefs by default (nix-2.3 behavior)
diff --git a/src/libfetchers/git.cc b/src/libfetchers/git.cc
index 9cbd39247..13f6e5b88 100644
--- a/src/libfetchers/git.cc
+++ b/src/libfetchers/git.cc
@@ -397,7 +397,7 @@ struct GitInputScheme : InputScheme
bool shallow = maybeGetBoolAttr(input.attrs, "shallow").value_or(false);
bool submodules = maybeGetBoolAttr(input.attrs, "submodules").value_or(false);
- bool allRefs = maybeGetBoolAttr(input.attrs, "allRefs").value_or(false);
+ bool allRefs = maybeGetBoolAttr(input.attrs, "allRefs").value_or(true);
std::string cacheType = "git";
if (shallow) cacheType += "-shallow";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment