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

Re: [PATCH] Add .git/version

From
MAMartin Atukunda <matlads@dsmagic.com>
Date
Nov 17, 2005, 19:08 UTC
Message-ID
<20051117190848.GA5745@igloo.ds.co.ug>
In-Reply-To
<200511171741.23147.Josef.Weidendorfer@gmx.de>
On Thu, Nov 17, 2005 at 05:41:23PM +0100, Josef Weidendorfer wrote:
Show 18 quoted lines
> On Thursday 17 November 2005 17:33, Andreas Ericsson wrote:
> > > Why? Ideally, the git commands first should check if they can handle the
> > > repository format. If they can not handle the version, they should bail
> > > out with an error [*]
> > > Now suppose we want to release Git 2 without change the repository
> > > format at all. Thus, even if Git 1 tool *would* work with repositories
> > > created by Git 2, they will fail in the version check!
> > > 
> > 
> > Not that I have an opinion on these changes, but Netscape 7 still 
> > handles HTTP 1.1. Just because we up the major-number for git doesn't 
> > mean we have to do the same for the repository format version.
> 
> Of course we do not want that.
> My comment was about this, as the proposed patch installed a
> .git/version file with the git version in it, which would lead to
> this strange result.
> 

I agree, I'll resubmit a patch to create a .git/version file that simply says 1.

which specific git commands would most likely want to know about the version of the repo format? I could look at them to see what needs to be changed so that they don't corrupt a repo, or as Johannes said, the use of this file would become handy only when an incompatible change is made. In which case, init-db.c just creates it for now, as a simple safe guard.

- Martin -
-- 
Due to a shortage of devoted followers, the production of great leaders has been discontinued.
Previous: Josef WeidendorferNext: Martin Atukunda
Message 11 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.