From: Simon 'corecode' Schubert Date: Fri, 19 Jan 2007 12:19:47 GMT Subject: Re: git ls-files -o under .git/ prints all repository files Message-ID: <45B0B763.2020007@fs.ei.tum.de> In-Reply-To: <81b0412b0701190238o79ce8473t2faf1a797565bc5d@mail.gmail.com> Alex Riesen wrote: >> okay, what do I expect when doing cd .git && git-ls-files? >> Either listing *all files* in the repo (like git-ls-files from the >> repo root) or no files at all, or failure (".git is private"). > > List nothing. That's what it does. It could return non-0 > (which it does not), but aside from that,... looks very sensible. yah, to fail or not to fail. I'd still say listing in .git is invalid, hence fail. > Alright, it is not. I can even imagine someone having a script > containing "git-ls-files -o| rm -f; git reset --hard" to get clean > working dir, > and starting the script in .git one day. Make "-o" list nothing as well? yes, I actually wanted to talk about -o, but forgot to mention. Following my reasoning above, it should fail as well. cheers simon -- Serve - BSD +++ RENT this banner advert +++ ASCII Ribbon /"\ Work - Mac +++ space for low €€€ NOW!1 +++ Campaign \ / Party Enjoy Relax | http://dragonflybsd.org Against HTML \ Dude 2c 2 the max ! http://golden-apple.biz Mail + News / \