[PATCH 0/2] git-config and large integers
- From
Jeff King <peff@peff.net>
- Date
- Aug 20, 2013, 22:39 UTC
- Message-ID
- <20130820223953.GA3429@sigill.intra.peff.net>
I was playing with a hook for file size limits that wanted to store the limit in git-config. It turns out we don't do a very good job of big integers:
$ git config foo.size 2g $ git config --int foo.size -2147483648
Oops. After this series, we properly notice the error:
$ git config --int foo.size fatal: bad config value for 'foo.size' in .git/config
and even better, provide a way to access large values:
$ git config --ulong foo.size 2147483648
The patches are:
[1/2]: config: properly range-check integer values [2/2]: teach git-config to output large integers
-Peff