Moreover - as there is not dedicated allow-any-sha1-in-want capability, if only uploadpack.allowAnySHA1InWant is enabled, other two capabilities should be advertised.
Relevant log output
Config file with allowTipSHA1InWant enabled (only relevant options are shown):
Version
v6.9.0.202403050737-r-23-gc0b415fb0 (bundled with Gerrit 3.10.0)
Operating System
Linux/Unix
Bug description
JGit properly advertises following capabilities if following options are enabled:
allow-tip-sha1-in-want
ifuploadpack.allowTipSHA1InWant
is enabledallow-reachable-sha1-in-want
ifuploadpack.allowReachableSHA1InWant
is enabledallow-tip-sha1-in-want
andallow-reachable-sha1-in-want
if both options are enabledWhen
uploadpack.allowAnySHA1InWant
is also enabled, capabilities are no longer advertised (all are gone).Actual behavior
If
uploadpack.allowAnySHA1InWant
is enabled, noallow-tip-sha1-in-want
and/orallow-reachable-sha1-in-want
is advertised by JGit in response forgit-upload-pack
request.Expected behavior
JGit continues to report
allow-XXX
capabilities even ifuploadpack.allowAnySHA1InWant
is enabled.Moreover - as there is not dedicated
allow-any-sha1-in-want
capability, if onlyuploadpack.allowAnySHA1InWant
is enabled, other two capabilities should be advertised.Relevant log output
Config file with
allowTipSHA1InWant
enabled (only relevant options are shown):Advertised capabilities ->
allow-tip-sha1-in-want
visible:Config file with
allowReachableSHA1InWant
enabled (only relevant options are shown):Advertised capabilities ->
allow-reachable-sha1-in-want
visible:Config file with
allowTipSHA1InWant
andallowAnySHA1InWant
enabled (only relevant options are shown):Advertised capabilities ->
allow-tip-sha1-in-want
not visible:Config file with
allowReachableSHA1InWant
andallowAnySHA1InWant
enabled (only relevant options are shown):Advertised capabilities ->
allow-reachable-sha1-in-want
not visible:Config file with
allowTipSHA1InWant
andallowReachableSHA1InWant
enabled (only relevant options are shown):Advertised capabilities ->
allow-tip-sha1-in-want
andallow-reachable-sha1-in-want
visible:Config file with
allowTipSHA1InWant
,allowReachableSHA1InWant
andallowAnySHA1InWant
enabled (only relevant options are shown):Advertised capabilities ->
allow-tip-sha1-in-want
andallow-reachable-sha1-in-want
not visible:Config file with only
allowAnySHA1InWant
enabled (only relevant options are shown):Advertised capabilities ->
allow-tip-sha1-in-want
andallow-reachable-sha1-in-want
not visible:Other information
Tested with Gerrit 3.10.0