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

Re: [PATCH] Add .git/version

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Nov 17, 2005, 23:41 UTC
Message-ID
<Pine.LNX.4.63.0511180039270.18775@wbgn013.biozentrum.uni-wuerzburg.de>
In-Reply-To
<Pine.LNX.4.64.0511171131260.13959@g5.osdl.org>
Hi,
On Thu, 17 Nov 2005, Linus Torvalds wrote:
Show 15 quoted lines
> On Thu, 17 Nov 2005, Junio C Hamano wrote:
> > 
> >  - We want repository-format-version but that may be too
> >    long. Just saying version is a bit confusing.  Abbreviating
> >    it to repository-version makes it sound as if somebody took a
> >    snapshot (i.e. tar-tree $commit).  Whatever name we choose,
> >    let's pick a one not so confusing.
> 
> My one argument against this is that I don't see why we have to have a 
> separate file for this.
> 
> Why not just add a "core.version" flag to the config file? If no version 
> exists, assume it's version 1. And then, if we ever start using some other 
> version, make git-init-db always create the config file (the way we 
> already do for "core.filemode")

Note that git-sh-setup and setup_git_directory() should check for it and complain if it finds a value > 1. Else there is not much which prevents old tools (like current) to access future versions.

The actual number may come later. The check can't.

Ciao, Dscho

Previous: Linus TorvaldsNext: Junio C Hamano
Message 15 of 16 in “Add .git/version”
  1. Add .git/versionMartin Atukunda, Nov 17, 2005
  2. 1/2 Build GIT_VERSION from VERSION, PATCHLEVEL, and SUBLEVEL variables.Martin Atukunda, Nov 17, 2005
  3. 2/2 Make init-db record the version in $GIT_DIR/version when creating repo.Martin Atukunda, Nov 17, 2005
  4. Johannes SchindelinNov 17, 2005
  5. Martin AtukundaNov 17, 2005
  6. Johannes SchindelinNov 17, 2005
  7. Josef WeidendorferNov 17, 2005
  8. Josef WeidendorferNov 17, 2005
  9. Andreas EricssonNov 17, 2005
  10. Josef WeidendorferNov 17, 2005
  11. Martin AtukundaNov 17, 2005
  12. Add .git/version (Take 2)Martin Atukunda, Nov 17, 2005
  13. Junio C HamanoNov 17, 2005
  14. Linus TorvaldsNov 17, 2005
  15. Johannes SchindelinNov 17, 2005
  16. Junio C HamanoNov 18, 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.