diff options
author | Erik Faye-Lund <kusmabite@googlemail.com> | 2010-03-03 21:10:21 +0100 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2010-03-05 02:57:54 -0800 |
commit | a9f979093dabe8b1c7bf8d67863adc378a8bec45 (patch) | |
tree | 4c248a3c1cac9bdbbf709b3cfdc793570de7926d /t/t1007-hash-object.sh | |
parent | be2fb164ec2ec6837428201390ebe30f6f8798b5 (diff) | |
download | git-a9f979093dabe8b1c7bf8d67863adc378a8bec45.tar.gz |
hash-object: support --stdin-paths with --no-filters
Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
Acked-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t1007-hash-object.sh')
-rwxr-xr-x | t/t1007-hash-object.sh | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/t/t1007-hash-object.sh b/t/t1007-hash-object.sh index fd98e445bf..dd32432d62 100755 --- a/t/t1007-hash-object.sh +++ b/t/t1007-hash-object.sh @@ -65,10 +65,6 @@ test_expect_success "Can't use --path with --stdin-paths" ' echo example | test_must_fail git hash-object --stdin-paths --path=foo ' -test_expect_success "Can't use --stdin-paths with --no-filters" ' - echo example | test_must_fail git hash-object --stdin-paths --no-filters -' - test_expect_success "Can't use --path with --no-filters" ' test_must_fail git hash-object --no-filters --path=foo ' @@ -141,6 +137,20 @@ test_expect_success 'check that --no-filters option works' ' git config --unset core.autocrlf ' +test_expect_success 'check that --no-filters option works with --stdin-paths' ' + echo fooQ | tr Q "\\015" >file0 && + cp file0 file1 && + echo "file0 -crlf" >.gitattributes && + echo "file1 crlf" >>.gitattributes && + git config core.autocrlf true && + file0_sha=$(git hash-object file0) && + file1_sha=$(git hash-object file1) && + test "$file0_sha" != "$file1_sha" && + nofilters_file1=$(echo "file1" | git hash-object --stdin-paths --no-filters) && + test "$file0_sha" = "$nofilters_file1" && + git config --unset core.autocrlf +' + pop_repo for args in "-w --stdin" "--stdin -w"; do |