Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » BundleWriter.include - Invalid ref name: HEAD(BundleWriter fails to include all Refs from a repository.)
BundleWriter.include - Invalid ref name: HEAD [message #1441909] Fri, 10 October 2014 10:55 Go to next message
Nick L is currently offline Nick LFriend
Messages: 1
Registered: October 2014
Junior Member
Hello

I am attempting to create a git bundle using JGit's BundleWriter but when I attempt to add the Repository Ref objects to the BundleWriter it complains about the symbolic HEAD Ref.

Repository repo; // valid repository from elsewhere
BundlerWriter bw = new BundleWriter(repository);

for (Ref ref:refMap.values()) {
    bundleWriter.include(ref);
}


Causes

java.lang.IllegalArgumentException: Invalid ref name: HEAD
	at org.eclipse.jgit.transport.BundleWriter.include(BundleWriter.java:132)


If I exclude the HEAD Ref the bundle builds but when the bundle is used the missing HEAD causes the following Git error:

warning: remote HEAD refers to nonexistent ref, unable to checkout.


I would like the bundle to include the HEAD reference so that the default branch is available when the bundle is used but I cannot seem to make it happen. Can anyone help please?

Thanks in advance.
Re: BundleWriter.include - Invalid ref name: HEAD [message #1455950 is a reply to message #1441909] Wed, 29 October 2014 23:01 Go to previous message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 1268
Registered: July 2009
Senior Member
this was fixed on master see https://git.eclipse.org/r/#/c/35092/
Previous Topic:Looking for a way to auto-fetch or auto-synchronize all repositories used in workspace upon opening
Next Topic:Synchronize Bitbucket with Eclipse
Goto Forum:
  


Current Time: Tue Apr 23 13:09:59 GMT 2024

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

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

Back to the top