]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t3905-stash-include-untracked.sh
Merge branch 'dl/stash-show-untracked-fixup'
[thirdparty/git.git] / t / t3905-stash-include-untracked.sh
index 8314ab21d431c28bdde1051467e2f73d9c199ef3..5bed8fd2fd76efd7c89f09c3cb5b1a31cfc8ece2 100755 (executable)
@@ -367,7 +367,7 @@ test_expect_success 'stash show --only-untracked only shows untracked files' '
        test_cmp expect actual
 '
 
-test_expect_success 'stash show --no-include-untracked cancels --{include,show}-untracked' '
+test_expect_success 'stash show --no-include-untracked cancels --{include,only}-untracked' '
        git reset --hard &&
        git clean -xf &&
        >untracked &&
@@ -405,4 +405,19 @@ test_expect_success 'stash show --include-untracked errors on duplicate files' '
        test_i18ngrep "worktree and untracked commit have duplicate entries: tracked" err
 '
 
+test_expect_success 'stash show --{include,only}-untracked on stashes without untracked entries' '
+       git reset --hard &&
+       git clean -xf &&
+       >tracked &&
+       git add tracked &&
+       git stash &&
+
+       git stash show >expect &&
+       git stash show --include-untracked >actual &&
+       test_cmp expect actual &&
+
+       git stash show --only-untracked >actual &&
+       test_must_be_empty actual
+'
+
 test_done