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

Re: [PATCH] provide advance warning of some future pack default changes

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 15, 2007, 01:43 UTC
Message-ID
<7vr6hoohqm.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<alpine.LFD.0.999999.0712142004480.8467@xanadu.home>
Nicolas Pitre <nico@cam.org> writes:
Show 15 quoted lines
> On Fri, 14 Dec 2007, Joel Becker wrote:
>
>> > Could you please give me a reference to such message, so to verify that 
>> > we're actually talking about the same thing?
>> 
>> 	The relevant message is:
>> 
>> Message-ID: <7vveaindgp.fsf@gitster.siamese.dyndns.org>
>> 
>> See the paragraphs at the bottom.  The thread, started by me, begins
>> with:
>> 
>> Message-ID: <20070910205429.GE27837@tasint.org>
>
> I don't have such emails in my mail folders anymore.
-- >8 --
Date:	Mon, 10 Sep 2007 13:54:29 -0700
From:	Joel Becker <Joel.Becker@oracle.com>
To:	git@vger.kernel.org
Subject: Remote branches and better documentation
Message-ID: <20070910205429.GE27837@tasint.org>
Sender:	git-owner@vger.kernel.org
Junio et al,
	Git is a fast moving target, so some of this obviously needs a
grain of salt.  However, I'd like to make a couple of humble suggestions
and ask one simple question.
	First, the question:  Is there a syntax to git clone that
creates the old-style branches?  That is, you get all the branches
locally, for people that either haven't learned "git branch -r" or have
existing scripts that expect the branch to exist?  I can't find anything
in the git clone manpage.
	The suggestions are pretty simple.  First, when behavior is
changed invisibly (as the remote branch stuff was), can we note it in
the documentation?  I don't mean the ChangeLog, I mean the manpage.  I
personally already knew about "branch -r" because I read this list.  A
coworker of mine, who just uses git, spent an hour trying to find his
branches after a clone with git 1.5.  He thought his clone had failed.
He read the manpage, and there was no big "Hey, those of you used to
the old behavior, it changed!".  The single sentence about "remote
tracking branches" clearly isn't enough for folks that don't follow the
development side.  If we're going to take the liberty of changing
expected behavior silently, we should be giving it its own section in
the manpage.
	The second suggestion is related.  When an invisible change has
made the repository incompatible with older versions, we should make
sure that things behave.  We had some repositories cloned via 1.4.2.  Do
some work with 1.5.0.6 (on a different machine), then go back to the
machine with 1.4.2, and 1.4.2 doesn't work.  In fact, it can mess things
up.  He was doing simple things: pull from Linus, switch branches, etc.
If this is going to be incompatible, then the newer stuff should at
least warn about it, if not outright prevent 1.4 from running.
	These sorts of things make fast-moving changes workable.
Joel
-- >8 --
Date:	Mon, 10 Sep 2007 19:27:34 -0700
Message-ID: <7vveaindgp.fsf@gitster.siamese.dyndns.org>
Sender:	git-owner@vger.kernel.org
Joel Becker <Joel.Becker@oracle.com> writes:
Show 7 quoted lines
> On Tue, Sep 11, 2007 at 02:05:34AM +0200, Wincent Colaiuta wrote:
>> But that's precisely the group release notes are for; existing users who 
>> need to be informed of any changes to the way things work.
>
> 	No one reads the changelogs of 100 packages updated via "yum
> update".  Heck, they don't even see the list of packages.  They just
> switch to a different desktop while it runs.

Distros are not something under my control, so I cannot help you much there.

> 	Then there's the user that doesn't administer the system.  They
> don't even know the version changed.  It Just Breaks, and they don't
> know why.

That's a valid concern, but I am not sure how you would want to address that issue. Design constraints are:

 - you cannot change the old software that is not updated on the
   user's box;
 - you cannot afford to write something to the repository to
   mark the latest version that mucked with the repository every
   time any operation happens;

We _could_ check presence of $HOME/.knows-git-version-X.Y.Z file every time we run (that's just a single stat(2) call that cannot be too expensive) and if there isn't one, ask the user if he has read the release notes and understood the backward compatibility issues if there is any, and refuse to run until getting a satisfactory answer.

But I personally do not think that would be an improvement.

After reviewing Release Notes for v1.5.0, I do not think we could have done much better, unfortunately.

    As of git v1.5.0 there are some optional features that changes
    the repository to allow data to be stored and transferred more
    efficiently.  These features are not enabled by default, as they
    will make the repository unusable with older versions of git.
    Specifically, the available options are:
     - There is a configuration variable core.legacyheaders that
       changes the format of loose objects so that they are more
       efficient to pack and to send out of the repository over git
       native protocol, since v1.4.2.  However, loose objects
       written in the new format cannot be read by git older than
       that version; people fetching from your repository using
       older clients over dumb transports (e.g. http) using older
       versions of git will also be affected.
       To let git use the new loose object format, you have to
       set core.legacyheaders to false.
     - Since v1.4.3, configuration repack.usedeltabaseoffset allows
       packfile to be created in more space efficient format, which
       cannot be read by git older than that version.
       To let git use the new format for packfiles, you have to
       set repack.usedeltabaseoffset to true.
    The above two new features are not enabled by default and you
    have to explicitly ask for them, because they make repositories
    unreadable by older versions of git, and in v1.5.0 we still do
    not enable them by default for the same reason.  We will change
    this default probably 1 year after 1.4.2's release, when it is
    reasonable to expect everybody to have new enough version of
    git.
     - 'git pack-refs' appeared in v1.4.4; this command allows tags
       to be accessed much more efficiently than the traditional
       'one-file-per-tag' format.  Older git-native clients can
       still fetch from a repository that packed and pruned refs
       (the server side needs to run the up-to-date version of git),
       but older dumb transports cannot.  Packing of refs is done by
       an explicit user action, either by use of "git pack-refs
       --prune" command or by use of "git gc" command.

So everything was opt in and clearly marked as such. You may not have read it, distros may not have shown it, but then that is something we cannot do much about, unfortunately.

I think there was _one_ honest slippage though. Fetching from 1.5.0 peer by 1.5.0 client could (after doing content negotiation between both ends as a protection measure) create a packfile that cannot be read by older 1.4 clients. Obviously you cannot expect that kind of "protection" to work across set of machines with mixed versions sharing a repository over NFS, and that probably is a mistake we can learn from.

Previous: Johannes SchindelinNext: Nicolas Pitre
Message 29 of 64 in “v1.5.4 plans”
  1. Junio C HamanoDec 2, 2007
  2. Jakub NarebskiDec 2, 2007
  3. Junio C HamanoDec 2, 2007
  4. David SymondsDec 2, 2007
  5. Junio C HamanoDec 3, 2007
  6. Many things pushed out to 'master'Junio C Hamano, Dec 3, 2007
  7. Johannes SchindelinDec 3, 2007
  8. Junio C HamanoDec 3, 2007
  9. Johannes SchindelinDec 3, 2007
  10. Junio C HamanoDec 3, 2007
  11. fast-export: rename the signed tag mode 'ignore' to 'verbatim'Johannes Schindelin, Dec 3, 2007
  12. Johannes SchindelinDec 3, 2007
  13. Fix quote_path when called with negative length.Pierre Habouzit, Dec 3, 2007
  14. Jeff KingDec 3, 2007
  15. Nicolas PitreDec 3, 2007
  16. Junio C HamanoDec 3, 2007
  17. provide advance warning of some future pack default changesNicolas Pitre, Dec 14, 2007
  18. Junio C HamanoDec 14, 2007
  19. Nicolas PitreDec 14, 2007
  20. Jakub NarebskiDec 14, 2007
  21. Nicolas PitreDec 14, 2007
  22. Joel BeckerDec 14, 2007
  23. Nicolas PitreDec 14, 2007
  24. Joel BeckerDec 14, 2007
  25. Nicolas PitreDec 14, 2007
  26. Joel BeckerDec 15, 2007
  27. Nicolas PitreDec 15, 2007
  28. Johannes SchindelinDec 15, 2007
  29. Junio C HamanoDec 15, 2007
  30. Nicolas PitreDec 15, 2007
  31. Joel BeckerDec 17, 2007
  32. Nicolas PitreDec 17, 2007
  33. Joel BeckerDec 17, 2007
  34. J. Bruce FieldsDec 17, 2007
  35. Nicolas PitreDec 17, 2007
  36. J. Bruce FieldsDec 17, 2007
  37. Nicolas PitreDec 17, 2007
  38. Junio C HamanoDec 17, 2007
  39. J. Bruce FieldsDec 17, 2007
  40. Junio C HamanoDec 17, 2007
  41. J. Bruce FieldsDec 18, 2007
  42. Nicolas PitreDec 17, 2007
  43. Junio C HamanoDec 17, 2007
  44. Nicolas PitreDec 17, 2007
  45. Junio C HamanoDec 18, 2007
  46. Mark FashehDec 18, 2007
  47. Nicolas PitreDec 18, 2007
  48. Martin LanghoffDec 18, 2007
  49. Nicolas PitreDec 18, 2007
  50. Junio C HamanoDec 18, 2007
  51. Jakub NarebskiDec 18, 2007
  52. Johannes SchindelinDec 18, 2007
  53. Nicolas PitreDec 18, 2007
  54. Jeff KingDec 18, 2007
  55. Johannes SchindelinDec 18, 2007
  56. Jeff KingDec 18, 2007
  57. Johannes SchindelinDec 18, 2007
  58. Jeff KingDec 18, 2007
  59. Nicolas PitreDec 18, 2007
  60. Jakub NarebskiDec 18, 2007
  61. Junio C HamanoDec 18, 2007
  62. Mark FashehDec 18, 2007
  63. Nicolas PitreDec 18, 2007
  64. RussellDec 4, 2007

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.