Browse Source
The previous "parse-opt"ification broke git-apply reading from the standard input. "git apply A - C <B" is supposed to read patches from files A, B and C in this order. Before "parse-opt"ification, we used be able to: git apply --stat - --apply <A B to read the patch from file A, showing only the diffstat, and then read the patch from file B, showing the diffstat and actually applying it. Even with this fix we cannot do that anymore, but that is so crazy use case I do not think anybody sane relied on such a broken behaviour. Signed-off-by: Junio C Hamano <gitster@pobox.com>maint
Junio C Hamano
16 years ago
2 changed files with 31 additions and 14 deletions
@ -0,0 +1,26 @@
@@ -0,0 +1,26 @@
|
||||
#!/bin/sh |
||||
|
||||
test_description='git apply --numstat - <patch' |
||||
|
||||
. ./test-lib.sh |
||||
|
||||
test_expect_success setup ' |
||||
echo hello >text && |
||||
git add text && |
||||
echo goodbye >text && |
||||
git diff >patch |
||||
' |
||||
|
||||
test_expect_success 'git apply --numstat - < patch' ' |
||||
echo "1 1 text" >expect && |
||||
git apply --numstat - <patch >actual && |
||||
test_cmp expect actual |
||||
' |
||||
|
||||
test_expect_success 'git apply --numstat - < patch patch' ' |
||||
for i in 1 2; do echo "1 1 text"; done >expect && |
||||
git apply --numstat - < patch patch >actual && |
||||
test_cmp expect actual |
||||
' |
||||
|
||||
test_done |
Loading…
Reference in new issue