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

Re: When to run git-update-server-info

From
Junio C Hamano <junkio@cox.net>
Date
Feb 13, 2007, 05:20 UTC
Message-ID
<7vps8e3a6j.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<1171342189.2326.68.camel@dv>
Pavel Roskin <proski@gnu.org> writes:
Show 21 quoted lines
> Hello!
>
> It looks like that either the documentation is misleading or git is not
> working as promised.
>
> Documentation/repository-layout.txt says:
>
> info/refs::
>         This file is to help dumb transports to discover what
>         refs are available in this repository.  Whenever you
>         create/delete a new branch or a new tag, `git
>         update-server-info` should be run to keep this file
>         up-to-date if the repository is published for dumb
>         transports.  The `git-receive-pack` command, which is
>         run on a remote repository when you `git push` into it,
>         runs `hooks/update` hook to help you achieve this.
>
> My understanding of the above text is that git-update-server-info only
> needs to be run if a new branch or tag is created, not on every
> git-push.  Just because hooks/update is run on every push, it doesn't
> mean that it needs to be done every time.

I agree the above can be interpreted as such, and documentation updates is needed. The information in info/refs are used in full, not just the list of ref names on the far right of each line but also the object name at the beginning of each line.

> I understand that accessing one file could be faster over http, so I
> tend to think that it's the documentation needs to be fixed.  If that's
> the case, maybe hooks/update should be created executable by default?

The repository that serve things over http are _minorities_, so I do not think that is a good idea.

Previous: Pavel Roskin
Message 2 of 2 in “When to run git-update-server-info”
  1. Pavel RoskinFeb 13, 2007
  2. Junio C HamanoFeb 13, 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.