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

Re: What's in git.git (stable)

From
Junio C Hamano <junkio@cox.net>
Date
Dec 14, 2006, 20:35 UTC
Message-ID
<7v1wn243mu.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<20061214200245.GP1747@spearce.org>
Shawn Pearce <spearce@spearce.org> writes:
> Does anyone on the mailing list really have an objection to having
> reflogs on by default?

When you talk about potential breakage for existing users, you should not be asking people on THIS list. You instead should talk with or at least think about people on linux-kernel, x.org and wine people, and possibly others. git is maturing, and we cannot expect that most of the users are paying attention to what is happening on this list anymore.

I 100% agree that it makes sense to have reflog enabled for a repository with an associated worktree. I would say that we do not even need it to be conditional on the configuration variable for such a repository.

My answer to your question is:
	kernel.org:/pub/scm/

I would REALLY be worried to have reflog enabled at a public distribution point where the only ways the owners interact with it daily are 'git push' and 'git pull'. As you mentioned, there is one extra potential receive-pack failure, and in general it is one more thing that can go wrong, and hard to notice breakage because it is on the other side of the connection.

Worse yet, there is no easy way to garbage collect. Even in an end-user repository with a worktree, the only way to garbage collect older reflog entries is to edit the reflog files to remove the top part.

Maybe a check to say if $GIT_DIR is ".git" or ends with "/.git" then enable it and otherwise honor the configuration variable, without changing the default in the code (with your patch) nor in the default configuration ("enable for new repositories" as I suggested) might be a workable compromise.

Next: Shawn O. Pearce
Message 1 of 9 in “Re: What's in git.git (stable)”
  1. Junio C HamanoDec 14, 2006
  2. Enable reflogs by default in any repository with a working directory.Shawn O. Pearce, Dec 14, 2006
  3. J. Bruce FieldsDec 14, 2006
  4. Shawn PearceDec 14, 2006
  5. J. Bruce FieldsDec 14, 2006
  6. Johannes SchindelinDec 15, 2006
  7. Shawn PearceDec 15, 2006
  8. Junio C HamanoDec 15, 2006
  9. Shawn PearceDec 14, 2006

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.