summaryrefslogtreecommitdiff
path: root/t/t3905-stash-include-untracked.sh
diff options
context:
space:
mode:
authorDenton Liu <liu.denton@gmail.com>2021-05-21 10:37:47 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-05-22 08:56:46 (GMT)
commitaf5cd44b6f8f1934bc8b91f646eb2e73dcab57f3 (patch)
tree9aeafe86f27bdd089aa9cb078b507755de370a0d /t/t3905-stash-include-untracked.sh
parent1ff595d218d9175eee1db753844044c2746d0515 (diff)
downloadgit-af5cd44b6f8f1934bc8b91f646eb2e73dcab57f3.zip
git-af5cd44b6f8f1934bc8b91f646eb2e73dcab57f3.tar.gz
git-af5cd44b6f8f1934bc8b91f646eb2e73dcab57f3.tar.bz2
stash show: use stash.showIncludeUntracked even when diff options given
If options pertaining to how the diff is displayed is provided to `git stash show`, the command will ignore the stash.showIncludeUntracked configuration variable, defaulting to not showing any untracked files. This is unintuitive behaviour since the format of the diff output and whether or not to display untracked files are orthogonal. Use stash.showIncludeUntracked even when diff options are given. Of course, this is still overridable via the command-line options. Update the documentation to explicitly say which configuration variables will be overridden when a diff options are given. Signed-off-by: Denton Liu <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3905-stash-include-untracked.sh')
-rwxr-xr-xt/t3905-stash-include-untracked.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/t/t3905-stash-include-untracked.sh b/t/t3905-stash-include-untracked.sh
index 1c97659..f7fafcd 100755
--- a/t/t3905-stash-include-untracked.sh
+++ b/t/t3905-stash-include-untracked.sh
@@ -333,6 +333,8 @@ test_expect_success 'stash show --include-untracked shows untracked files' '
git stash show -p --include-untracked >actual &&
test_cmp expect actual &&
git stash show --include-untracked -p >actual &&
+ test_cmp expect actual &&
+ git -c stash.showIncludeUntracked=true stash show -p >actual &&
test_cmp expect actual
'