Re: git ls-files -o under .git/ prints all repository files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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   / \

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]