Exemplo n.º 1
0
            public override FileBasedConfig OpenSystemConfig(Config parent, FS fs)
            {
                FilePath prefix = fs.GitPrefix();

                if (prefix == null)
                {
                    return(new _FileBasedConfig_85(null, fs));
                }
                // empty, do not load
                // regular class would bomb here
                FilePath etc    = fs.Resolve(prefix, "etc");
                FilePath config = fs.Resolve(etc, "gitconfig");

                return(new FileBasedConfig(parent, config, fs));
            }
Exemplo n.º 2
0
        internal static bool Detect()
        {
            string path = AccessController.DoPrivileged(new _PrivilegedAction_58());

            if (path == null)
            {
                return(false);
            }
            FilePath found = FS.SearchPath(path, "cygpath.exe");

            if (found != null)
            {
                cygpath = found.GetPath();
            }
            return(cygpath != null);
        }
Exemplo n.º 3
0
 /// <summary>Initialize this FS using another's current settings.</summary>
 /// <remarks>Initialize this FS using another's current settings.</remarks>
 /// <param name="src">the source FS to copy from.</param>
 protected internal FS(NGit.Util.FS src)
 {
     // Do nothing by default.
     userHome  = src.userHome;
     gitPrefix = src.gitPrefix;
 }
Exemplo n.º 4
0
 protected internal FS_POSIX_Java6(FS src) : base(src)
 {
 }
Exemplo n.º 5
0
 protected internal FS_Win32(FS src) : base(src)
 {
 }
Exemplo n.º 6
0
 /// <param name="parent">
 /// a config with values not found directly in the returned
 /// config. Null is a reasonable value here.
 /// </param>
 /// <param name="fs">
 /// the file system abstraction which will be necessary to perform
 /// certain file system operations.
 /// </param>
 /// <returns>
 /// the gitonfig configuration found in the system-wide "etc"
 /// directory
 /// </returns>
 public abstract FileBasedConfig OpenSystemConfig(Config parent, FS fs);
Exemplo n.º 7
0
 /// <param name="parent">a config with values not found directly in the returned config
 ///     </param>
 /// <param name="fs">
 /// the file system abstraction which will be necessary to perform
 /// certain file system operations.
 /// </param>
 /// <returns>the git configuration found in the user home</returns>
 public abstract FileBasedConfig OpenUserConfig(Config parent, FS fs);
Exemplo n.º 8
0
            public override FileBasedConfig OpenUserConfig(Config parent, FS fs)
            {
                FilePath home = fs.UserHome();

                return(new FileBasedConfig(parent, new FilePath(home, ".gitconfig"), fs));
            }
Exemplo n.º 9
0
 public _FileBasedConfig_85(FilePath baseArg1, FS baseArg2) : base(baseArg1, baseArg2
                                                                   )
 {
 }
Exemplo n.º 10
0
 protected internal FS_POSIX(FS src) : base(src)
 {
 }
Exemplo n.º 11
0
 protected internal FS_Win32_Cygwin(FS src) : base(src)
 {
 }
Exemplo n.º 12
0
Arquivo: FS.cs Projeto: ashmind/ngit
 static FS()
 {
     DETECTED = Detect(null);
 }