@@ -251,10 +251,6 @@ struct GitInputScheme : InputScheme
251
251
url.query .insert_or_assign (" ref" , *ref);
252
252
if (getShallowAttr (input))
253
253
url.query .insert_or_assign (" shallow" , " 1" );
254
- if (getLfsAttr (input))
255
- url.query .insert_or_assign (" lfs" , " 1" );
256
- if (getSubmodulesAttr (input))
257
- url.query .insert_or_assign (" submodules" , " 1" );
258
254
if (maybeGetBoolAttr (input.attrs , " exportIgnore" ).value_or (false ))
259
255
url.query .insert_or_assign (" exportIgnore" , " 1" );
260
256
if (maybeGetBoolAttr (input.attrs , " verifyCommit" ).value_or (false ))
@@ -265,6 +261,11 @@ struct GitInputScheme : InputScheme
265
261
url.query .insert_or_assign (" publicKey" , publicKeys.at (0 ).key );
266
262
} else if (publicKeys.size () > 1 )
267
263
url.query .insert_or_assign (" publicKeys" , publicKeys_to_string (publicKeys));
264
+ // These are allowed as self attrs, the explicit false is important
265
+ if (auto lfs = maybeGetBoolAttr (input.attrs , " lfs" ))
266
+ url.query .insert_or_assign (" lfs" , *lfs ? " 1" : " 0" );
267
+ if (auto submodules = maybeGetBoolAttr (input.attrs , " submodules" ))
268
+ url.query .insert_or_assign (" submodules" , *submodules ? " 1" : " 0" );
268
269
return url;
269
270
}
270
271
@@ -884,8 +885,14 @@ struct GitInputScheme : InputScheme
884
885
std::optional<std::string> getFingerprint (ref<Store> store, const Input & input) const override
885
886
{
886
887
auto makeFingerprint = [&](const Hash & rev) {
887
- return rev.gitRev () + (getSubmodulesAttr (input) ? " ;s" : " " ) + (getExportIgnoreAttr (input) ? " ;e" : " " )
888
- + (getLfsAttr (input) ? " ;l" : " " );
888
+ std::string modifiers = " " ;
889
+ if (getExportIgnoreAttr (input))
890
+ modifiers += " ;e" ;
891
+ if (auto lfs = maybeGetBoolAttr (input.attrs , " lfs" ))
892
+ modifiers += *lfs ? " ;l1" : " ;l0" ;
893
+ if (auto submodules = maybeGetBoolAttr (input.attrs , " submodules" ))
894
+ modifiers += *submodules ? " ;s1" : " ;s0" ;
895
+ return rev.gitRev () + modifiers;
889
896
};
890
897
891
898
if (auto rev = input.getRev ())
0 commit comments