Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » Idiomatic way to check for bare repos while cloning
Idiomatic way to check for bare repos while cloning [message #1851470] Wed, 06 April 2022 11:05
Sahil Marwaha is currently offline Sahil MarwahaFriend
Messages: 1
Registered: April 2022
Junior Member
I am trying to clone a repository programmatically using JGIT as so

I want to be able to detect and handle bare repositories separately. How can I do this?

Right now, the way I am doing it is
if (e.cause is TransportException && e.cause.toString().contains("Remote branch 'HEAD' not found in upstream origin"))

Is there a better way?
Previous Topic:autogc
Next Topic:Idiomatic way of saving a file
Goto Forum:

Current Time: Tue Dec 06 19:38:08 GMT 2022

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

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

Back to the top