diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-06-21 05:38:36 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-06-21 05:38:36 -0700 |
commit | e1ba0f6340c1d72677c7792a0a82ecf05363026e (patch) | |
tree | f298b749b5dbdc6e1e3d639da3950c3287f2a81a /t | |
parent | gitweb/Makefile: fix typo in gitweb.min.css rule (diff) | |
parent | apply: Allow blank *trailing* context lines to match beyond EOF (diff) | |
download | tgif-e1ba0f6340c1d72677c7792a0a82ecf05363026e.tar.xz |
Merge branch 'bg/apply-blank-trailing-context' into maint
* bg/apply-blank-trailing-context:
apply: Allow blank *trailing* context lines to match beyond EOF
Diffstat (limited to 't')
-rwxr-xr-x | t/t4124-apply-ws-rule.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/t/t4124-apply-ws-rule.sh b/t/t4124-apply-ws-rule.sh index fb9ad247bf..451d75e3fb 100755 --- a/t/t4124-apply-ws-rule.sh +++ b/t/t4124-apply-ws-rule.sh @@ -325,6 +325,18 @@ test_expect_success 'two missing blank lines at end with --whitespace=fix' ' test_cmp one expect ' +test_expect_success 'missing blank line at end, insert before end, --whitespace=fix' ' + { echo a; echo; } >one && + git add one && + { echo b; echo a; echo; } >one && + cp one expect && + git diff -- one >patch && + echo a >one && + test_must_fail git apply patch && + git apply --whitespace=fix patch && + test_cmp one expect +' + test_expect_success 'shrink file with tons of missing blanks at end of file' ' { echo a; echo b; echo c; } >one && cp one no-blank-lines && |