From: Shawn O. Pearce Date: Wed, 08 Oct 2008 15:24:43 GMT Subject: Re: [PATCH 2/2 v2] check-attr: Add --stdin-paths option Message-ID: <20081008152443.GA4795@spearce.org> In-Reply-To: <20081007001652.GR21650@dpotapov.dyndns.org> Dmitry Potapov wrote: > This allows multiple paths to be specified on stdin. > diff --git a/Documentation/git-check-attr.txt b/Documentation/git-check-attr.txt > index 2b821f2..0839a57 100644 > --- a/Documentation/git-check-attr.txt > +++ b/Documentation/git-check-attr.txt > @@ -9,6 +9,7 @@ git-check-attr - Display gitattributes information. > SYNOPSIS > -------- > 'git check-attr' attr... [--] pathname... > +'git check-attr' --stdin-paths attr... < diff --git a/t/t0003-attributes.sh b/t/t0003-attributes.sh > index 3d8e06a..f6901b4 100755 > --- a/t/t0003-attributes.sh > +++ b/t/t0003-attributes.sh > @@ -47,6 +47,23 @@ test_expect_success 'attribute test' ' > > ' > > +test_expect_success 'attribute test: read paths from stdin' ' A test case for the quoting might also be good. > + > + cat < 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-paths test > actual && > + test_cmp expect actual -- Shawn.