1. 04 7月, 2005 2 次提交
  2. 30 6月, 2005 1 次提交
  3. 29 6月, 2005 6 次提交
  4. 28 6月, 2005 2 次提交
  5. 27 6月, 2005 4 次提交
    • L
      csum-file interface updates: return resulting SHA1 · e1808845
      Linus Torvalds 提交于
      Also, make the writing of the SHA1 as a end-header be conditional: not
      every user will necessarily want to write the SHA1 to the file itself,
      even though current users do (but we migh end up using the same helper
      functions for the object files themselves, that don't do this).
      
      This also makes the packed index file contain the SHA1 of the packed
      data file at the end (just before its own SHA1).  That way you can
      validate the pairing of the two if you want to.
      e1808845
    • L
      git-pack-objects: write the pack files with a SHA1 csum · c38138cd
      Linus Torvalds 提交于
      We want to be able to check their integrity later, and putting the
      sha1-sum of the contents at the end is a good thing.  The writing
      routines are generic, so we could try to re-use them for the index file,
      instead of having the same logic duplicated.
      
      Update unpack-objects to know about the extra 20 bytes at the end
      of the index.
      c38138cd
    • L
      git-pack-objects: use name information (if any) to sort objects for packing. · 27225f2e
      Linus Torvalds 提交于
      This is incredibly cheezy. But it's cheap, and it works pretty well.
      27225f2e
    • L
      git-pack-objects: do the delta search in reverse size order · 521a4f4c
      Linus Torvalds 提交于
      Starting from big objects and going backwards means that we end up
      picking a delta that goes from a bigger object to a smaller one.  That's
      advantageous for two reasons: the bigger object is likely the newer one
      (since things tend to grow, rather than shrink), and doing a delete
      tends to be smaller than doing an add.
      
      So the deltas don't tend to be top-of-tree, and the packed end result is
      just slightly smaller.
      521a4f4c
  6. 26 6月, 2005 10 次提交
    • L
      Fix object packing/unpacking. · c4fb06c0
      Linus Torvalds 提交于
      This actually successfully packed and unpacked a git archive down to
      1.3MB (17MB unpacked).
      
      Right now unpacking is way too noisy, lots of debug messages left.
      c4fb06c0
    • J
      [PATCH] Finish initial cut of git-pack-object/git-unpack-object pair. · 8ee378a0
      Junio C Hamano 提交于
      This finishes the initial round of git-pack-object /
      git-unpack-object pair.  They are now good enough to be used as
      a transport medium:
      
       - Fix delta direction in pack-objects; the original was
         computing delta to create the base object from the object to
         be squashed, which was quite unfriendly for unpacker ;-).
      
       - Add a script to test the very basics.
      
       - Implement unpacker for both regular and deltified objects.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      8ee378a0
    • L
      Add "--depth=N" parameter to git-pack-objects to limit maximum delta depth · d116a45a
      Linus Torvalds 提交于
      It too defaults to 10. A nice round random number.
      d116a45a
    • L
      git-pack-objects: make "--window=x" semantics more logical. · f846bbff
      Linus Torvalds 提交于
      A zero disables delta generation (like before), but we make the window
      be one bigger than specified, since we use one entry for the one to be
      tested (it used to be that "--window=1" was meaningless, since we'd have
      used up the single-entry window with the entry to be tested, and had no
      chance of actually ever finding a delta).
      
      The default window remains at 10, but now it really means "test the 10
      closest objects", not "test the 9 closest objects".
      f846bbff
    • L
      Add a "max_size" parameter to diff_delta() · 75c42d8c
      Linus Torvalds 提交于
      Anything that generates a delta to see if two objects are close usually
      isn't interested in the delta ends up being bigger than some specified
      size, and this allows us to stop delta generation early when that
      happens.
      75c42d8c
    • L
      Fix delta "sliding window" code · 78817c15
      Linus Torvalds 提交于
      When Junio fixed the lack of a successful error code from try_delta(),
      that uncovered an off-by-one error in the caller.
      
      Also, some testing made it clear that we now find a lot more deltas,
      because we used to (incorrectly) break early on bogus "failure"
      cases.
      78817c15
    • J
      [PATCH] (patchlet) pack-objects.c: try_delta() · eb41ab11
      Junio C Hamano 提交于
      Return value of try_delta is checked for negativeness, but the
      success path does not return anything, letting compiler warn and
      presumably return garbage.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      eb41ab11
    • L
      git-pack-objects: mark the delta packing with a 'D'. · d38c3721
      Linus Torvalds 提交于
      When writing a delta, we take the real type from the object we're
      doing the delta against, and just write a 'D' as the type of the
      current object.
      d38c3721
    • L
      git-pack-objects: fix typo · 49397104
      Linus Torvalds 提交于
      ("<" should be "=")
      49397104
    • L
      git-pack-objects: create a packed object representation. · c323ac7d
      Linus Torvalds 提交于
      This is kind of like a tar-ball for a set of objects, ready to be
      shipped off to another end.  Alternatively, you could use is as a packed
      representation of the object database directly, if you changed
      "read_sha1_file()" to read these kinds of packs.
      
      The latter is partiularly useful to generate a "packed history", ie you
      could pack up your old history efficiently, but still have it available
      (at a performance hit, of course).
      
      I haven't actually written an unpacker yet, so the end result has not
      been verified in any way yet.  I obviously always write bug-free code,
      so it just has to work, no?
      c323ac7d