Subject: Re: [PATCH] "git help -a" should search all exec_paths and PATH

From: Scott Parish <[email-masked]>
Date: Sun, 21 Oct 2007 23:32:01 -0700

On Mon, Oct 22, 2007 at 01:30:17AM -0400, Shawn O. Pearce wrote:

> fchdir() isn't as portable as Git currently is.  Thus far we have
> avoided using fchdir().  Requiring it here for something as "simple"
> as listing help is not a good improvement as it will limit who can
> run git-help.  Why can't you stat the individual entries by joining
> the paths together?

I hadn't realized it wasn't portable, but i do see that there's no POSIX
entry in its man page. I was actually looking to use getcwd, but its
man page had suggested using this open()/fchdir() method.

Anyway, is there a reason to avoid changing the directory? If not
i'm tempted to take the approach that j.sixt suggested--not restoring
the cwd since we're exiting anyway. I don't have any good reason
to not do the string manipulation, but why do something more
complicated then necessary?

sRp

-- 
Scott Parish
http://srparish.net/