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

Re: thoughts on setting core.logAllRefUpdates default true for bare repos

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 4, 2009, 19:49 UTC
Message-ID
<7v3a4ugjea.fsf@alter.siamese.dyndns.org>
In-Reply-To
<vpqzl729j72.fsf@bauges.imag.fr>
Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:
Show 13 quoted lines
> I can't think of any, and I just tried launching two
>
> while true; do git pull; date > foo.txt ; git add .; git commit -m "xxx"; git push; done
>
> in parallel, with two different users pushing to a --bare --shared
> repository, and it did work well. But I may very well have missed
> something.
>
> (and actually, if it causes problem, it's an argument in favor of
> defaulting to false when core.shared is true, not when core.bare).
>
> Unless I missed something, I think core.logAllRefUpdates should be
> enabled for bare repos.

Your experiment justifies "could be enabled safely" and saying "should be" based on that is a bit too strong and also premature.

The single most common reason why a bare repository is bare is because nobody regularly logs in to the machine that hosts it and goes there to access its contents. As reflog is a local thing, and not exposed to outside world, enabling it alone would not help a lot to people who do not have such a direct access to the bare repository, which by definition is the majority because the reason why the repository is bare to begin with.

Once we add ways to expose information kept in reflog of a bare repository more effectively and conveniently, the argument could become "should be enabled now it would be very useful to have one".

I mentioned a possible option to show reflog entry annotations in gitweb. That was an example of such an addition of "a way to expose".

It also is plausible to teach git-daemon a remote "log" request; similar to "git fetch" running "upload-pack" on the other end in the bare repository, a "git log --remote" command may run "upload-log" on the other end and this service may allow passing the "-g" option when it does so. That would be another addition of "a way to expose".

Previous: Matthieu MoyNext: Matthieu Moy
Message 9 of 11 in “thoughts on setting core.logAllRefUpdates default true for bare repos”
  1. Sitaram ChamartyNov 4, 2009
  2. Johannes SchindelinNov 4, 2009
  3. Sitaram ChamartyNov 4, 2009
  4. demerphqNov 4, 2009
  5. Nicolas SebrechtNov 4, 2009
  6. Sverre RabbelierNov 4, 2009
  7. Sitaram ChamartyNov 5, 2009
  8. Matthieu MoyNov 4, 2009
  9. Junio C HamanoNov 4, 2009
  10. Matthieu MoyNov 4, 2009
  11. Sitaram ChamartyNov 5, 2009

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.