oracle / opengrok

OpenGrok is a fast and usable source code search and cross reference engine, written in Java
http://oracle.github.io/opengrok/
Other
4.33k stars 746 forks source link

GitRepository isWorking should check git version #2664

Closed tulinkry closed 5 years ago

tulinkry commented 5 years ago

As we are using features from newer git version (date format), the repository should report if it's working via the isWorking() method. Currently just return code is checked.

    @Override
    public boolean isWorking() {
        if (working == null) {
            ensureCommand(CMD_PROPERTY_KEY, CMD_FALLBACK);
            working = checkCmd(RepoCommand, "--help");
        }
        return working;
    }
tulinkry commented 5 years ago

The version is as mentioned in https://github.com/oracle/opengrok/issues/2641#issuecomment-457619314

vladak commented 5 years ago

Normally this would be a bug however Git versions with said date format support are largely prevalent today.