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

Re: [PATCH 3/4] Server-side support for user-relative paths.

From
Andreas Ericsson <ae@op5.se>
Date
Nov 2, 2005, 08:30 UTC
Message-ID
<43687914.6080906@op5.se>
In-Reply-To
<7vek5z6h3f.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano wrote:
Show 17 quoted lines
> Andreas Ericsson <ae@op5.se> writes:
> 
> 
>>Remove the redundant code from {receive,upload}-pack.c in favour of the
>>library code in path.c (previous patch) with documentation of the changes
>>to the affected programs.
> 
> 
> I like the simplification of these two calling sites, but it
> makes me feel uneasy to see the workhorse named is_git_repo().
> 
> The name implies a check to see if the given path is a git repo
> or not (i.e. side-effect free predicate), while what it actually
> does are three things: (1) resolve and check, (2) chdir to it,
> (3) set up GIT_DIR environment.  Not that I have a better name
> in mind...
> 

I went with this implementation because when I tried to break it up I had to add the chdir() and putenv() calls in the three callers. No programs in the git-suite tries to resolve the canonical path of a repo without subsequently entering it and using it.

Perhaps it should be enter_repo() or some such? Optionally with is_git_repo() as a separate function?

Show 6 quoted lines
> 
>>+	SSH Is the default transport protocol and also supports an
> 
> 
> Just a typo ("Is")?
> 
Yes.
-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231
Previous: Junio C HamanoNext: Junio C Hamano
Message 3 of 4 in “Server-side support for user-relative paths.”
  1. 3/4 Server-side support for user-relative paths.Andreas Ericsson, Nov 1, 2005
  2. Junio C HamanoNov 2, 2005
  3. Andreas EricssonNov 2, 2005
  4. Junio C HamanoNov 2, 2005

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.