Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 360787

Summary: GerritClientImpl: Implement projectExists() with "ls-remote" command
Product: z_Archived Reporter: Michael Ochmann <michael.ochmann>
Component: SkalliAssignee: Project Inbox <skalli.extensions-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Michael Ochmann CLA 2011-10-13 06:07:47 EDT
Edwin Kempin from the Gerrit team says:

"For checking whether a certain Gerrit project exists, you could use the
'ls-remote' command.

$ git ls-remote ssh://<repo> HEAD
<some-commitid> HEAD   
=> project exists

$ git ls-remote ssh://<repo> HEAD
fatal: '/non-existing-project.git': not a Gerrit project
fatal: The remote end hung up unexpectedly
=> project does not exist

That should improve the performance considerably compared to retrieving all projects with 'ls-projects' first and then iterating through that list to find out whether a project exists."
Comment 1 Michael Ochmann CLA 2012-02-13 04:38:40 EST
would require native git installation on Gerrit server