git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Scott Parish <srp@srparish.net>
Date
Oct 22, 2007, 06:32 UTC
Message-ID
<20071022063201.GN16291@srparish.net>
In-Reply-To
<20071022053016.GN14735@spearce.org>
On Mon, Oct 22, 2007 at 01:30:17AM -0400, Shawn O. Pearce wrote:
Show 5 quoted lines
> 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/
Previous: Shawn O. PearceNext: Shawn O. Pearce
Message 5 of 7 in “"git help -a" should search all exec_paths and PATH”
  1. "git help -a" should search all exec_paths and PATHScott R Parish, Oct 21, 2007
  2. Johannes SchindelinOct 21, 2007
  3. Scott ParishOct 22, 2007
  4. Shawn O. PearceOct 22, 2007
  5. Scott ParishOct 22, 2007
  6. Shawn O. PearceOct 22, 2007
  7. Johannes SixtOct 22, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.