summaryrefslogtreecommitdiff
path: root/t/t4055-diff-context.sh
AgeCommit message (Collapse)Author
2014-08-07rewrite git_config() to use the config-set APITanay Abhra
Of all the functions in `git_config*()` family, `git_config()` has the most invocations in the whole code base. Each `git_config()` invocation causes config file rereads which can be avoided using the config-set API. Use the config-set API to rewrite `git_config()` to use the config caching layer to avoid config file rereads on each invocation during a git process lifetime. First invocation constructs the cache, and after that for each successive invocation, `git_config()` feeds values from the config cache instead of rereading the configuration files. Signed-off-by: Tanay Abhra <tanayabh@gmail.com> Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-09-09config: make numeric parsing errors more clearJeff King
If we try to parse an integer config argument and get a number outside of the representable range, we die with the cryptic message: "bad config value for '%s'". We can improve two things: 1. Show the value that produced the error (e.g., bad config value '3g' for 'foo.bar'). 2. Mention the reason the value was rejected (e.g., "invalid unit" versus "out of range"). A few tests need to be updated with the new output, but that should not be representative of real-world breakage, as scripts should not be depending on the exact text of our stderr output, which is subject to i18n anyway. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-10-02t4055: avoid use of sed 'a' commandJunio C Hamano
The 'a', 'i' and 'c' commands take a literal text to be added followed by backslash, but then in the source we cannot indent the literal text which makes it ugly. We need to also remember to double the backslash inside double quotes. Avoid these issues altogether by having an extra line in a template file and generate test vectors by deleting the line or replacing the line and not using the 'a' command. Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-10-01diff: diff.context configuration gives default to -UJeff Muizelaar
Introduce a configuration variable diff.context that tells Porcelain commands to use a non-default number of context lines instead of 3 (the default). With this variable, users do not have to keep repeating "git log -U8" from the command line; instead, it becomes sufficient to say "git config diff.context 8" just once. Signed-off-by: Jeff Muizelaar <jmuizelaar@mozilla.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>