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

Re: [PATCH 5/5] git-daemon support for user-relative paths.

From
Andreas Ericsson <ae@op5.se>
Date
Nov 18, 2005, 10:18 UTC
Message-ID
<437DAA66.6070301@op5.se>
In-Reply-To
<7voe4ird8v.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano wrote:
Show 9 quoted lines
> exon@op5.se (Andreas Ericsson) writes:
> 
> 
>>Everything that worked earlier still works insofar as I have
>>remembered testing it.
> 
> 
> Hmph...
> 
:)

I haven't used the daemon without our patches. Everything works as per spec now though.

Show 11 quoted lines
> 
>>@@ -152,45 +140,17 @@ static int set_dir(const char *dir)
>> 	 * We want a readable HEAD, usable "objects" directory, and
>> 	 * a "git-daemon-export-ok" flag that says that the other side
>> 	 * is ok with us doing this.
> 
> 
> Well, not anymore about HEAD as far as I can tell...  Maybe in
> enter_repo ([PATCH 1/5]) we need to do something like what
> setup.c::is_toplevel_directory() does?
> 

Umm... Perhaps. I just noticed that it's possible for the .git/objects directory to go missing though.

Show 9 quoted lines
> 
>>-static int upload(char *dir)
>>-{
>>-	/* Try paths in this order */
>>-	static const char *paths[] = { "%s", "%s/.git", "%s.git", "%s.git/.git", NULL };
> 
> 
> I think this list was added relatively recently as a usability
> measure.  Maybe we would want an equivalent in enter_repo()?

It's already there but in a different format. Adding "if (!strict)" to the previously unconditional 'chdir(".git");' won't change that.

Like I said, I made sure everything that worked before works now too.
Show 6 quoted lines
> Under strict-path, I think not doing any DWIM like this is fine,
> but otherwise I suspect changing this would break existing
> remotes/origin file people may have.  In addition enter_repo()
> as posted does its own DWIM to chdir to ".git" unconditionally
> as I pointed out...
> 
DWIM? That's an acronym I don't know.
> Needs a bit more thought, but I think otherwise the basic idea
> is right.
> 
Anything I should change before "take four" ?
-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231
Previous: Junio C HamanoNext: Matthias Urlichs
Message 3 of 12 in “git-daemon support for user-relative paths.”
  1. 5/5 git-daemon support for user-relative paths.Andreas Ericsson, Nov 17, 2005
  2. Junio C HamanoNov 18, 2005
  3. Andreas EricssonNov 18, 2005
  4. Matthias UrlichsNov 18, 2005
  5. H. Peter AnvinNov 18, 2005
  6. Junio C HamanoNov 18, 2005
  7. Junio C HamanoNov 18, 2005
  8. Andreas EricssonNov 18, 2005
  9. Junio C HamanoNov 21, 2005
  10. Junio C HamanoNov 21, 2005
  11. Andreas EricssonNov 21, 2005
  12. Junio C HamanoNov 21, 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.