GitCommands.Settings.ValidWorkingDir C# (CSharp) Method

ValidWorkingDir() public static method

public static ValidWorkingDir ( string dir ) : bool
dir string
return bool
        public static bool ValidWorkingDir(string dir)
        {
            if (string.IsNullOrEmpty(dir))
                return false;

            if (Directory.Exists(dir + PathSeperator + ".git"))
                return true;

            return !dir.Contains(".git") &&
                   Directory.Exists(dir + PathSeperator + "info") &&
                   Directory.Exists(dir + PathSeperator + "objects") &&
                   Directory.Exists(dir + PathSeperator + "refs");
        }

Same methods

Settings::ValidWorkingDir ( ) : bool