check-attr: Add --stdin option
This allows multiple paths to be specified on stdin. Signed-off-by: Dmitry Potapov <dpotapov@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
This commit is contained in:

committed by
Shawn O. Pearce

parent
41038c5e15
commit
b4666852a0
@ -47,6 +47,23 @@ test_expect_success 'attribute test' '
|
||||
|
||||
'
|
||||
|
||||
test_expect_success 'attribute test: read paths from stdin' '
|
||||
|
||||
cat <<EOF > expect
|
||||
f: test: f
|
||||
a/f: test: f
|
||||
a/c/f: test: f
|
||||
a/g: test: a/g
|
||||
a/b/g: test: a/b/g
|
||||
b/g: test: unspecified
|
||||
a/b/h: test: a/b/h
|
||||
a/b/d/g: test: a/b/d/*
|
||||
EOF
|
||||
|
||||
sed -e "s/:.*//" < expect | git check-attr --stdin test > actual &&
|
||||
test_cmp expect actual
|
||||
'
|
||||
|
||||
test_expect_success 'root subdir attribute test' '
|
||||
|
||||
attr_check a/i a/i &&
|
||||
|
Reference in New Issue
Block a user