Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-11-23 00:13:16 +0300
committerJunio C Hamano <gitster@pobox.com>2016-11-23 00:13:16 +0300
commit3f0ec0687d95e0f53c899f964d769ca1846874da (patch)
treeb901b420c13d6839b577ce04b0f51d2a37feb903 /t/t5100-mailinfo.sh
parent1310affe024fba407bff55dbe65cd6d670c8a32d (diff)
mailinfo: read local configuration
Since b9605bc4f2 ("config: only read .git/config from configured repos", 2016-09-12), we do not read from ".git/config" unless we know we are in a repository. "git mailinfo" however didn't do the repository discovery and instead relied on the old behaviour. This was mostly OK because it was merely run as a helper program by other porcelain scripts that first chdir's up to the root of the working tree. Teach the command to run a "gentle" version of repository discovery so that local configuration variables like mailinfo.scissors are honoured. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5100-mailinfo.sh')
-rwxr-xr-xt/t5100-mailinfo.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/t/t5100-mailinfo.sh b/t/t5100-mailinfo.sh
index e6b995161e..7171f67539 100755
--- a/t/t5100-mailinfo.sh
+++ b/t/t5100-mailinfo.sh
@@ -158,4 +158,17 @@ test_expect_success 'mailinfo handles rfc2822 comment' '
test_cmp "$DATA/comment.expect" comment/info
'
+test_expect_success 'mailinfo with mailinfo.scissors config' '
+ test_config mailinfo.scissors true &&
+ (
+ mkdir sub &&
+ cd sub &&
+ git mailinfo ../msg0014.sc ../patch0014.sc <../0014 >../info0014.sc
+ ) &&
+ test_cmp "$DATA/msg0014--scissors" msg0014.sc &&
+ test_cmp "$DATA/patch0014--scissors" patch0014.sc &&
+ test_cmp "$DATA/info0014--scissors" info0014.sc
+'
+
+
test_done