Re: [PATCH] Make git-clean a builtin
- From
Jeff King <peff@peff.net>
- Date
- Oct 8, 2007, 02:22 UTC
- Message-ID
- <20071008022205.GA21277@coredump.intra.peff.net>
- In-Reply-To
- <alpine.LFD.0.999.0710071916510.23684@woody.linux-foundation.org>
On Sun, Oct 07, 2007 at 07:17:50PM -0700, Linus Torvalds wrote:
Show 5 quoted lines
> fchdir() is not portable. > > I think it would be better to not chdir() at all. Yes, that means having > to prepend the prefix to the names, but that is what git generally does > (for that - and other - reasons).
I was using the "even Solaris has it!" test, but yes, it's not POSIX. I don't know how common it actually is (for curiosity's sake, do you know of a common platform that lacks it?). But I do agree that just building up the path and avoiding the chdir at all is simple and portable.
-Peff