Re: update-cache ./test.c
- From
- Lennert Buytenhek <buytenh@wantstofly.org>
- Date
- May 1, 2005, 08:54 UTC
- Message-ID
- <20050501085427.GB30692@xi.wantstofly.org>
- In-Reply-To
- <20050501084710.GJ26663@cip.informatik.uni-erlangen.de>
On Sun, May 01, 2005 at 10:47:10AM +0200, Thomas Glanzmann wrote:
> Hello,
Hi,
Show 15 quoted lines
> > update-cache seems to ignore paths containing path components
> > starting with a dot:
>
> > pi% update-cache --add ./test.c
> > Ignoring path ./test.c
> > pi% update-cache --add test.c
> > pi%
>
> > This is slightly annoying as 'find -type f | xargs update-cache --add'
> > doesn't work because of this. ('find * -type f | ...` does.) Instead
> > of ignoring the file, can we just strip off the leading "./" ?
>
> just use a shell script to obtain that:
>
> find -type f | sed "s#^./##" | xargs update-cache --addThis also works:
find * -type f | xargs update-cache --add
But that wasn't quite the point :) It makes sense that update-cache doesn't like ambiguous path names, but it's easier for update-cache to detect and strip "^./" than for me to remember to type sed "s#^./##" every time.
--L