Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » LsRemoteCommand and symbolic references
LsRemoteCommand and symbolic references [message #1757949] Wed, 22 March 2017 09:21 Go to next message
Stephen Connolly is currently offline Stephen ConnollyFriend
Messages: 2
Registered: March 2017
Junior Member
I am trying to determine how to get the equivalent of

$ git ls-remote --symref origin HEAD
ref: refs/heads/master	HEAD
84f8ba8f163845385ea9827d51686e806e47f98a	HEAD


I want to extract the information that says HEAD is a symbolic reference to res/heads/master

Now prior to Git 1.8.5, the algorithm that Native Git followed was to see all the remote heads and if there was one ref with the same hash as HEAD... well that was the ref that HEAD resolves to... if there were more than one ref with the same hash as HEAD and refs/heads/master happens to be included in the set of refs that have that hash... well Git would say "oh it's refs/heads/master"

https://github.com/git/git/blob/afd6726309f57f532b4b989a75c1392359c611cc/Documentation/RelNotes/1.8.5.txt#L289-L296

Am I right in thinking that JGit does not support the capability (and do I need to file an issue to get it supported)?
Re: LsRemoteCommand and symbolic references [message #1757996 is a reply to message #1757949] Wed, 22 March 2017 16:02 Go to previous message
Stephen Connolly is currently offline Stephen ConnollyFriend
Messages: 2
Registered: March 2017
Junior Member
I opened https://bugs.eclipse.org/bugs/show_bug.cgi?id=514052
Previous Topic:gitattributes : macro binary
Next Topic:Frequent [lock fail] on origin/master
Goto Forum:
  


Current Time: Thu Aug 17 02:09:33 GMT 2017

Powered by FUDForum. Page generated in 0.02277 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software