From af5cd44b6f8f1934bc8b91f646eb2e73dcab57f3 Mon Sep 17 00:00:00 2001 From: Denton Liu Date: Fri, 21 May 2021 03:37:47 -0700 Subject: 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 Signed-off-by: Junio C Hamano --- t/t3905-stash-include-untracked.sh | 2 ++ 1 file changed, 2 insertions(+) (limited to 't') diff --git a/t/t3905-stash-include-untracked.sh b/t/t3905-stash-include-untracked.sh index 1c9765928d..f7fafcd447 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 ' -- cgit v1.2.3