+2
Started

Better detection for gerrit repositories

Adrien Béraud 3 years ago updated by Marc Strapetz 8 months ago 3

I use Gerrit with Smartgit for many repos but Gerrit was never detected by Smartgit despite claimed support.


Documentation says:

SmartGit will detect a remote as being connected to Gerrit, if:

  • .git/hooks/commit-msg exists; and
  • there is only one remote overall or it's the only remote connecting to port 29418 (default Gerrit SSH port)

The second condition is clearly too restrictive. Repos I work with use port 29420 so I'm doomed to never see them detected with current detection method.

Are you aware of a well-known port range which could be checked instead?

Maybe there could be a SmartGit global option to consider remotes at some specific host as "gerrit" remotes ? Something like a "gerrit" hosting provider ?