Ejemplo n.º 1
0
 private CoreConfig(Config rc)
 {
     compression      = rc.getInt("core", "compression", Deflater.DEFAULT_COMPRESSION);
     packIndexVersion = rc.getInt("pack", "indexversion", 2);
     logAllRefUpdates = rc.getBoolean("core", "logallrefupdates", true);
     excludesFile     = rc.getString("core", null, "excludesfile");
 }
Ejemplo n.º 2
0
        private string getNameInternal(Config rc, string envKey)
        {
            string username = rc.getString("user", null, "name");

            if (username == null)
            {
                username = system().getenv(envKey);
            }
            if (username == null)
            {
                username = system().getProperty(Constants.OS_USER_NAME_KEY);
            }
            if (username == null)
            {
                username = Constants.UNKNOWN_USER_DEFAULT;
            }

            return(username);
        }
Ejemplo n.º 3
0
        private string getEmailInternal(Config rc, string envKey)
        {
            string email = rc.getString("user", null, "email");

            if (email == null)
            {
                email = system().getenv(envKey);
            }
            if (email == null)
            {
                string username = system().getProperty(Constants.OS_USER_NAME_KEY);
                if (username == null)
                {
                    username = Constants.UNKNOWN_USER_DEFAULT;
                }
                email = username + "@" + system().getHostname();
            }

            return(email);
        }