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

Re: [PATCH] config.c: remove unnecessary header in minimum configuration file.

From
Junio C Hamano <junkio@cox.net>
Date
Dec 5, 2005, 21:47 UTC
Message-ID
<7vzmnf9px8.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<Pine.LNX.4.63.0512052202300.12016@wbgn013.biozentrum.uni-wuerzburg.de>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> However, reading the code I am not satisfied. If there is no template for 
> the config file, it does not test the filemode at all.

I have a feeling that you have not tried the code you are arguing against.

It always creates the config file because it needs to record the repository format version (among other things), so the config file exists even if you do not have templates. Even if you do not have a valid template directory that is supposed to work, but obviously you have not tried it ;-).

Now, it is arguable that the current format version being 0, and not having the format version is equivalent to having 0 as the format version, it is not necessary to create an empty configuration file at this moment, but by making sure we record the format version the tool that created the repository supports now in the version 0, we do not have to risk forgetting to add that logic later when we _do_ need to write something non-zero.

Previous: Johannes SchindelinNext: Johannes Schindelin
Message 7 of 8 in “config.c: remove unnecessary header in minimum configuration file.”
  1. config.c: remove unnecessary header in minimum configuration file.Junio C Hamano, Nov 25, 2005
  2. Junio C HamanoDec 5, 2005
  3. Andreas EricssonDec 5, 2005
  4. Johannes SchindelinDec 5, 2005
  5. Junio C HamanoDec 5, 2005
  6. Johannes SchindelinDec 5, 2005
  7. Junio C HamanoDec 5, 2005
  8. Johannes SchindelinDec 5, 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.