1. 26 3月, 2009 1 次提交
  2. 25 3月, 2009 3 次提交
    • J
      Merge branch 'maint-1.6.0' into maint-1.6.1 · 2a5643da
      Junio C Hamano 提交于
      * maint-1.6.0:
        close_sha1_file(): make it easier to diagnose errors
        avoid possible overflow in delta size filtering computation
      2a5643da
    • L
      close_sha1_file(): make it easier to diagnose errors · e8bd78c3
      Linus Torvalds 提交于
      A bug report with "unable to write sha1 file" made us realize that we do
      not have enough information to guess why close() is failing.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      e8bd78c3
    • N
      avoid possible overflow in delta size filtering computation · 720fe22d
      Nicolas Pitre 提交于
      On a 32-bit system, the maximum possible size for an object is less than
      4GB, while 64-bit systems may cope with larger objects.  Due to this
      limitation, variables holding object sizes are using an unsigned long
      type (32 bits on 32-bit systems, or 64 bits on 64-bit systems).
      
      When large objects are encountered, and/or people play with large delta
      depth values, it is possible for the maximum allowed delta size
      computation to overflow, especially on a 32-bit system.  When this
      occurs, surviving result bits may represent a value much smaller than
      what it is supposed to be, or even zero.  This prevents some objects
      from being deltified although they do get deltified when a smaller depth
      limit is used.  Fix this by always performing a 64-bit multiplication.
      Signed-off-by: NNicolas Pitre <nico@cam.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      720fe22d
  3. 23 3月, 2009 2 次提交
  4. 22 3月, 2009 2 次提交
  5. 13 3月, 2009 15 次提交
  6. 08 3月, 2009 1 次提交
  7. 01 3月, 2009 4 次提交
  8. 28 2月, 2009 1 次提交
  9. 27 2月, 2009 2 次提交
    • C
      bisect: fix quoting TRIED revs when "bad" commit is also "skip"ped · 1b249ffe
      Christian Couder 提交于
      When the "bad" commit was also "skip"ped and when more than one
      commit was skipped, the "filter_skipped" function would have
      printed something like:
      
          bisect_rev=<hash1>|<hash2>
      
      (where <hash1> and <hash2> are hexadecimal sha1 hashes)
      
      and this would have been evaled later as piping "bisect_rev=<hash1>"
      into "<hash2>", which would have failed.
      
      So this patch makes the "filter_skipped" function properly quote
      what it outputs, so that it will print something like:
      
      bisect_rev='<hash1>|<hash2>'
      
      which will be properly evaled later.  The caller was not stopping
      properly because the scriptlet this function returned to be evaled
      was not strung together with && and because of this, an error in
      an earlier part of the output was simply ignored.
      
      A test case is added to the test suite.
      
      And while at it, we also initialize the VARS, FOUND and TRIED
      variables, so that we protect ourselves from environment variables
      the user may have with these names.
      Signed-off-by: NChristian Couder <chriscool@tuxfamily.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      1b249ffe
    • M
      Fix odb_mkstemp() on AIX · 2c626e5f
      Mike Ralphson 提交于
      The AIX mkstemp() modifies its template parameter to an empty string if
      the call fails.  The existing code had already recomputed the template,
      but too late to be good.
      
      See also 6ff6af62, which fixed this problem in a different spot.
      Signed-off-by: NMike Ralphson <mike@abacus.co.uk>
      Signed-off-by: NJohannes Sixt <j6t@kdbg.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      2c626e5f
  10. 26 2月, 2009 1 次提交
    • J
      Make sure objects/pack exists before creating a new pack · 6e180cdc
      Junio C Hamano 提交于
      In a repository created with git older than f49fb35d (git-init-db: create
      "pack" subdirectory under objects, 2005-06-27), objects/pack/ directory is
      not created upon initialization.  It was Ok because subdirectories are
      created as needed inside directories init-db creates, and back then,
      packfiles were recent invention.
      
      After the said commit, new codepaths started relying on the presense of
      objects/pack/ directory in the repository.  This was exacerbated with
      8b4eb6b6 (Do not perform cross-directory renames when creating packs,
      2008-09-22) that moved the location temporary pack files are created from
      objects/ directory to objects/pack/ directory, because moving temporary to
      the final location was done carefully with lazy leading directory creation.
      
      Many packfile related operations in such an old repository can fail
      mysteriously because of this.
      
      This commit introduces two helper functions to make things work better.
      
       - odb_mkstemp() is a specialized version of mkstemp() to refactor the
         code and teach it to create leading directories as needed;
      
       - odb_pack_keep() refactors the code to create a ".keep" file while
         create leading directories as needed.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      6e180cdc
  11. 20 2月, 2009 2 次提交
  12. 19 2月, 2009 4 次提交
  13. 13 2月, 2009 1 次提交
    • F
      Support "\" in non-wildcard exclusion entries · dd482eea
      Finn Arne Gangstad 提交于
      "\" was treated differently in exclude rules depending on whether a
      wildcard match was done. For wildcard rules, "\" was de-escaped in
      fnmatch, but this was not done for other rules since they used strcmp
      instead.  A file named "#foo" would not be excluded by "\#foo", but would
      be excluded by "\#foo*".
      
      We now treat all rules with "\" as wildcard rules.
      
      Another solution could be to de-escape all non-wildcard rules as we
      read them, but we would have to do the de-escaping exactly as fnmatch
      does it to avoid inconsistencies.
      Signed-off-by: NFinn Arne Gangstad <finnag@pvv.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      dd482eea
  14. 12 2月, 2009 1 次提交