Re: [PATCH 2/4] cat-file: introduce the --filters option
From: Torsten Bögershausen <hidden>
Date: 2016-08-19 01:52:05
On Thu, Aug 18, 2016 at 02:46:17PM +0200, Johannes Schindelin wrote:
As suggested by its name, the --filters option applies the filters
[]
quoted hunk ↗ jump to hunk
diff --git a/t/t8010-cat-file-filters.sh b/t/t8010-cat-file-filters.sh
Does it make sense to integrate tests into t1006-cat-file ?
quoted hunk ↗ jump to hunk
new file mode 100755 index 0000000..e466634--- /dev/null +++ b/t/t8010-cat-file-filters.sh@@ -0,0 +1,34 @@ +#!/bin/sh + +test_description='git cat-file filters support' +. ./test-lib.sh + +test_expect_success 'setup ' ' + echo "*.txt eol=crlf diff=txt" >.gitattributes && + echo "hello" | append_cr >world.txt && + git add .gitattributes world.txt && + test_tick && + git commit -m "Initial commit" +' + +has_cr () { + tr '\015' Q <"$1" | grep Q >/dev/null +} + +test_expect_success 'no filters with `git show`' ' + git show HEAD:world.txt >actual &&
I would prefer to have something using cat >expect <<-\EOF && xxx test_cmp expect actual to make it easier to debug in case of a failure ?