public static boolean isGitRepository(File dir, FS fs) {return fs.resolve(dir, Constants.OBJECTS).exists()&& fs.resolve(dir, "refs").exists() && (fs.resolve(dir, Constants.REFTABLE).exists()|| isValidHead(new File(dir, Constants.HEAD)));}

public static bool IsGitRepository(FilePath dir, FS fs){return fs.Resolve(dir, "objects").Exists() && fs.Resolve(dir, "refs").Exists() &&IsValidHead(new FilePath(dir, Constants.HEAD));}
