Code

git-svn: remove svnadmin dependency from the tests
[git.git] / config.c
index fcccf7e2a4f3b7487af10d4f7b505c7ef492b9e8..458ae512f3b644979ddc1f6bb581fee2907dbc2f 100644 (file)
--- a/config.c
+++ b/config.c
@@ -238,6 +238,12 @@ int git_config_int(const char *name, const char *value)
                int val = strtol(value, &end, 0);
                if (!*end)
                        return val;
+               if (!strcasecmp(end, "k"))
+                       return val * 1024;
+               if (!strcasecmp(end, "m"))
+                       return val * 1024 * 1024;
+               if (!strcasecmp(end, "g"))
+                       return val * 1024 * 1024 * 1024;
        }
        die("bad config value for '%s' in %s", name, config_file_name);
 }