summaryrefslogtreecommitdiff
path: root/t/t4204-patch-id.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-09-21 22:15:23 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-09-21 22:15:24 (GMT)
commitd845d727cb1935202b61a3b7b6c8cfa7c09bd204 (patch)
tree7296be39100177a980c2e3d5700371f11dd5b03d /t/t4204-patch-id.sh
parentac8ddd7ba36751a9f6413bb3921fc6797144717e (diff)
parent4d0efa101bbbc63d8bd1ec0477f027f23b9f573b (diff)
downloadgit-d845d727cb1935202b61a3b7b6c8cfa7c09bd204.zip
git-d845d727cb1935202b61a3b7b6c8cfa7c09bd204.tar.gz
git-d845d727cb1935202b61a3b7b6c8cfa7c09bd204.tar.bz2
Merge branch 'jk/setup-sequence-update'
There were numerous corner cases in which the configuration files are read and used or not read at all depending on the directory a Git command was run, leading to inconsistent behaviour. The code to set-up repository access at the beginning of a Git process has been updated to fix them. * jk/setup-sequence-update: t1007: factor out repeated setup init: reset cached config when entering new repo init: expand comments explaining config trickery config: only read .git/config from configured repos test-config: setup git directory t1302: use "git -C" pager: handle early config pager: use callbacks instead of configset pager: make pager_program a file-local static pager: stop loading git_default_config() pager: remove obsolete comment diff: always try to set up the repository diff: handle --no-index prefixes consistently diff: skip implicit no-index check when given --no-index patch-id: use RUN_SETUP_GENTLY hash-object: always try to set up the git repository
Diffstat (limited to 't/t4204-patch-id.sh')
-rwxr-xr-xt/t4204-patch-id.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/t/t4204-patch-id.sh b/t/t4204-patch-id.sh
index 84a8096..0288c17 100755
--- a/t/t4204-patch-id.sh
+++ b/t/t4204-patch-id.sh
@@ -143,6 +143,20 @@ test_expect_success 'patch-id supports git-format-patch MIME output' '
test_cmp patch-id_master patch-id_same
'
+test_expect_success 'patch-id respects config from subdir' '
+ test_config patchid.stable true &&
+ mkdir subdir &&
+
+ # copy these because test_patch_id() looks for them in
+ # the current directory
+ cp bar-then-foo foo-then-bar subdir &&
+
+ (
+ cd subdir &&
+ test_patch_id irrelevant patchid.stable=true
+ )
+'
+
cat >nonl <<\EOF
diff --git i/a w/a
index e69de29..2e65efe 100644