]> granicus.if.org Git - git/commitdiff
stash: fix nonsense pipeline
authorJunio C Hamano <gitster@pobox.com>
Mon, 19 Mar 2018 23:21:54 +0000 (23:21 +0000)
committerJunio C Hamano <gitster@pobox.com>
Tue, 20 Mar 2018 16:08:34 +0000 (09:08 -0700)
An earlier change bba067d2 ("stash: don't delete untracked files
that match pathspec", 2018-01-06) was made by taking a suggestion in
a list discussion [1] but did not copy the suggested snippet
correctly.  And the bug was unnoticed during the review and slipped
through.

This fixes it.

[1] https://public-inbox.org/git/xmqqpo7byjwb.fsf@gitster.mtv.corp.google.com/

Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-stash.sh

index b48b16474865bb9540c0fa108299d77b2f00ecbb..4c92ec931ff231aa7b10468914a34daa87cd117d 100755 (executable)
@@ -315,9 +315,9 @@ push_stash () {
 
                if test $# != 0
                then
-                       git add -u -- "$@" |
-                       git checkout-index -z --force --stdin
-                       git diff-index -p --cached --binary HEAD -- "$@" | git apply --index -R
+                       git add -u -- "$@"
+                       git diff-index -p --cached --binary HEAD -- "$@" |
+                       git apply --index -R
                else
                        git reset --hard -q
                fi