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

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

 



Scott Parish <sRp@xxxxxxxxxxxx> wrote:
> On Mon, Oct 22, 2007 at 01:30:17AM -0400, Shawn O. Pearce wrote:
> 
> > fchdir() isn't as portable as Git currently is.
> 
> 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?

Yea, that was another thought I had.  You probably can just chdir(),
list, exit, and not worry about going back to the previous directory.
And more complicated is always a bad idea.  Keep it simple, 'cause
us gits like it that way.  :-)

-- 
Shawn.
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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]

  Powered by Linux