Merge branch 'pw/rebase-i-internal'
[gitweb.git] / parse-options-cb.c
index 28ad5cd94b9c55882e4b895e001d35d12302386b..4b95d04a37c028322c6fbf7d3f1b59e0d541fdb3 100644 (file)
@@ -22,8 +22,8 @@ int parse_opt_abbrev_cb(const struct option *opt, const char *arg, int unset)
                                     opt->long_name);
                if (v && v < MINIMUM_ABBREV)
                        v = MINIMUM_ABBREV;
-               else if (v > 40)
-                       v = 40;
+               else if (v > the_hash_algo->hexsz)
+                       v = the_hash_algo->hexsz;
        }
        *(int *)(opt->value) = v;
        return 0;