Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 360787 - GerritClientImpl: Implement projectExists() with "ls-remote" command
Summary: GerritClientImpl: Implement projectExists() with "ls-remote" command
Status: CLOSED WONTFIX
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Skalli (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-13 06:07 EDT by Michael Ochmann CLA
Modified: 2022-10-03 10:28 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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