Open xenoterracide opened 1 week ago
Running the equivalent git command for git.lsRemote().setHeads(true).setTags(true).setRemote("origin").callAsMap()
yields:
$ git ls-remote --heads --tags https://github.com/xenoterracide/gradle-semver.git
48a09407ab3489acfe73f8a6576164a9293b68d2 refs/heads/chore/build-logic
7a93373f9e8f977b17efb84110398fb70936bf82 refs/heads/chore/sync-config
31673b1a39ec6adc36b8377277aa7af07f96045a refs/heads/ci/generate-and-upload-dep-submit
3a0c102452c0e80abf85da0e1bcfeeed95b939a2 refs/heads/external/bug/ep
0bbe15192d55c81d0fa4593794872b5b74ccfcf3 refs/heads/external/bug/jgit-24
a24504ccf3ed41e91507ced4831fd53f29e8e329 refs/heads/feat/simplify-to-provider
288b40b3546673c7436014e3ce85afe18ee41bcc refs/heads/main
83dd4f2753542316a142ac7c08edd6f5a027bd13 refs/heads/renovate/com.gradle.develocity-3.x
6c4a9651818e451604e4525cbb7b4354e231c38b refs/heads/renovate/gradle-8.x
e8673335d1deca1e6a800f30c586af8da2d9ffb7 refs/heads/test/stringy-version-comparision
b2e1fd0d8277bad288f7fed1b7f16dd0f3242202 refs/tags/v0.10.0
b746724eb7f2adbd254ebe66219d83fbad411326 refs/tags/v0.10.0^{}
a385a1c3612a61bb9987cfb9cc478da9853a0819 refs/tags/v0.11.0
2c3ef8cdb5068e47f818af0c2bb81c5a6a2b2056 refs/tags/v0.11.0^{}
2ed114811a879c13224109bbc71d722434a94d6c refs/tags/v0.11.1
ac9af93d977500c7e08aa531b16827e2b6e238b7 refs/tags/v0.11.1^{}
bce046b7e02c4441cecd8595a1440bd9b9950152 refs/tags/v0.11.2
f9aceb26fbeb991794ca4deea20f05fb1950c344 refs/tags/v0.11.2^{}
732251a2c7d9d485fb4d96381b8599ac5f44425d refs/tags/v0.11.3
64181cebba9566ad9649562ac45cffc243b12566 refs/tags/v0.11.3^{}
ddbcf4b82c29feea092eadfc24e25809e1cec2a1 refs/tags/v0.11.4
4a9f93c92eb5caaf9770370aa814c86e9cc54864 refs/tags/v0.11.4^{}
c9e4006b3f5d9000b9e6f9a4dc642499c3a1dd05 refs/tags/v0.8.0
28aed91489305f1326f19213f4c00e1a747a60cd refs/tags/v0.8.0^{}
3f1d87cad55ff6d3784b73aa314af85cb6ea85a0 refs/tags/v0.8.1
5e29dc971c69ce8559580514b514d3c71cad577c refs/tags/v0.8.1^{}
debb2014de56f972ec18c15caf624dec17df0e77 refs/tags/v0.8.2
446b9ff7a63559f0732e482c9554c7c6e1a8bb74 refs/tags/v0.8.2^{}
8f703482e7181eadf19d72f5763840ea0b999852 refs/tags/v0.8.3
1710cba5a4a1a09d6c20544e8532692cc125231e refs/tags/v0.8.3^{}
a08df464cd3fe70a5edf42a874175ae7dfb4efd1 refs/tags/v0.8.4
097498718e97936ea0596082f3828dda8d0795e2 refs/tags/v0.8.4^{}
b7bfb90c070633e2ad11d0d6a90392839f576c9e refs/tags/v0.9.0
a9d2fc1b53cc478b73f6a14d0586e3fd4098e939 refs/tags/v0.9.0^{}
4cf99857d114c5f19ba300733995f54499388e16 refs/tags/v0.9.1
eab109dbc4163b9f734da0d662eab0d5f0652363 refs/tags/v0.9.1^{}
14fc036f1941938f2e27b2fceb8298b924017da7 refs/tags/v0.9.2
ea748b4de02b91788436c33adb962b38a1a123b8 refs/tags/v0.9.2^{}
4a67312164fb3d4c0465c1fc2aaf776c9c421ed4 refs/tags/v0.9.3
761c420fa9812584e90750ca73197402603e76cc refs/tags/v0.9.3^{}
fd43a6c79bbad727889cd26b852d5651c6f6b45b refs/tags/v0.9.4
ed2869a4e5e23873113ddf15307146e1e0d077f7 refs/tags/v0.9.4^{}
ed031c4a4f128cd12faf7680b56052a26ae8e15e refs/tags/v0.9.5
7ad7fad790dfabbe91a0be03a87c3f7e3d5cc8fd refs/tags/v0.9.5^{}
01f2f6e9431c45b3180017ddfc12bbf5661cc184 refs/tags/v0.9.6
2fc0f8fb3ef640aaefc1d99f2b75ac45fd25286d refs/tags/v0.9.6^{}
5a5f9e45ef868639db2cb2a64387464fda687a54 refs/tags/v0.9.7
a4b6ea57800458d44eb42622bb7ea55a07ae70a2 refs/tags/v0.9.7^{}
Which also doesn't contain HEAD
. Hence I think there is no problem with the JGit implementation in LsRemoteCommand
.
The equivalent jgit command $jgit ls-remote --heads --tags https://github.com/xenoterracide/gradle-semver.git
yields the exact same result.
right, but there's also no api to retrieve it (that I could see) the symref cli you showed in the other ticket is not exposed via the java api. whereas git gives you 288b40b3546673c7436014e3ce85afe18ee41bcc HEAD
by default with no options.
it's worth saying that I now believe HEAD will show up if the HEAD
ref exists on the disk. It doesn't show up like it will in git if it doesn't exist on disk. It turns out that clone will add it to disk, but that git remote add .../ git fetch
will not. git ls-remote
will show HEAD
either way.
My api usage may not reflect the desired outcome which is arguably that no options should return more, and it appeared to return less, and that no options appear to result in the same output that git itself can give.
Version
org.eclipse.jgit:org.eclipse.jgit:7.0.0.202409031743-r
Operating System
Linux/Unix
Bug description
given
Actual behavior
the
HEAD
reference is missingExpected behavior
if I run the real
git ls-remote origin
I get the belowRelevant log output
No response
Other information
this is the repo that can be used for comparison, https://github.com/xenoterracide/gradle-semver.git