@NotNull private static String defaultDirectoryName(@NotNull final String url,@NotNull final String vcsDirName){
  String nonSystemName;
  if (url.endsWith("/" + vcsDirName) || url.endsWith(File.separator + vcsDirName)) {
    nonSystemName=url.substring(0,url.length() - vcsDirName.length() - 1);
  }
 else {
    if (url.endsWith(vcsDirName)) {
      nonSystemName=url.substring(0,url.length() - vcsDirName.length());
    }
 else {
      nonSystemName=url;
    }
  }
  int i=nonSystemName.lastIndexOf('/');
  if (i == -1 && File.separatorChar != '/') {
    i=nonSystemName.lastIndexOf(File.separatorChar);
  }
  return i >= 0 ? nonSystemName.substring(i + 1) : "";
}

@ NotNull private static String defaultDirectoryName ( @ NotNull final String url , @ NotNull final String vcsDirName ) { String nonSystemName ; if ( url . endsWith ( "/" + vcsDirName ) || url . endsWith ( File . separator + vcsDirName ) ) { nonSystemName = url . substring ( 0 , url . length ( ) - vcsDirName . length ( ) - 1 ) ; } else { if ( url . endsWith ( vcsDirName ) ) { nonSystemName = url . substring ( 0 , url . length ( ) - vcsDirName . length ( ) ) ; } else { nonSystemName = url ; } } int i = nonSystemName . lastIndexOf ( '/' ) ; if ( i == - 1 && File . separatorChar != '/' ) { i = nonSystemName . lastIndexOf ( File . separatorChar ) ; } return i >= 0 ? nonSystemName . substring ( i + 1 ) : "" ; }
get default name for checked out directory
