From: "Shawn O. Pearce" <spearce@spearce.org>
To: Scott Parish <sRp@srparish.net>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] "git help -a" should search all exec_paths and PATH
Date: Mon, 22 Oct 2007 02:39:33 -0400 [thread overview]
Message-ID: <20071022063933.GU14735@spearce.org> (raw)
In-Reply-To: <20071022063201.GN16291@srparish.net>
Scott Parish <sRp@srparish.net> 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.
next prev parent reply other threads:[~2007-10-22 6:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-21 21:48 [PATCH] "git help -a" should search all exec_paths and PATH Scott R Parish
2007-10-21 22:25 ` Johannes Schindelin
2007-10-22 0:54 ` Scott Parish
2007-10-22 5:30 ` Shawn O. Pearce
2007-10-22 6:32 ` Scott Parish
2007-10-22 6:39 ` Shawn O. Pearce [this message]
2007-10-22 6:06 ` Johannes Sixt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071022063933.GU14735@spearce.org \
--to=spearce@spearce.org \
--cc=git@vger.kernel.org \
--cc=sRp@srparish.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).