1. 23 6月, 2008 9 次提交
  2. 22 6月, 2008 4 次提交
  3. 19 6月, 2008 2 次提交
    • J
      GIT 1.5.6 · e449f105
      Junio C Hamano 提交于
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      e449f105
    • J
      clean up error conventions of remote.c:match_explicit · 9a7bbd1d
      Jeff King 提交于
      match_explicit is called for each push refspec to try to
      fully resolve the source and destination sides of the
      refspec.  Currently, we look at each refspec and report
      errors on both the source and the dest side before aborting.
      
      It makes sense to report errors for each refspec, since an
      error in one is independent of an error in the other.
      However, reporting errors on the 'dst' side of a refspec if
      there has been an error on the 'src' side does not
      necessarily make sense, since the interpretation of the
      'dst' side depends on the 'src' side (for example, when
      creating a new unqualified remote ref, we use the same type
      as the src ref).
      
      This patch lets match_explicit return early when the src
      side of the refspec is bogus. We still look at all of the
      refspecs before aborting the push, though.
      
      At the same time, we clean up the call signature, which
      previously took an extra "errs" flag. This was pointless, as
      we didn't act on that flag, but rather just passed it back
      to the caller. Instead, we now use the more traditional
      "return -1" to signal an error, and the caller aggregates
      the error count.
      
      This change fixes two bugs, as well:
      
        - the early return avoids a segfault when passing a NULL
          matched_src to guess_ref()
      
        - the check for multiple sources pointing to a single dest
          aborted if the "err" flag was set. Presumably the intent
          was not to bother with the check if we had no
          matched_src. However, since the err flag was passed in
          from the caller, we might abort the check just because a
          previous refspec had a problem, which doesn't make
          sense.
      
          In practice, this didn't matter, since due to the error
          flag we end up aborting the push anyway.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      9a7bbd1d
  4. 18 6月, 2008 5 次提交
  5. 17 6月, 2008 9 次提交
  6. 16 6月, 2008 7 次提交
  7. 15 6月, 2008 4 次提交
    • J
      GIT 1.5.6-rc3 · 52cb2bc2
      Junio C Hamano 提交于
      Just a lot of small fixes, mostly documentation.
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      52cb2bc2
    • L
      Simplify and rename find_sha1_file() · c529d75a
      Linus Torvalds 提交于
      Now that we've made the loose SHA1 file reading more careful and
      streamlined, we only use the old find_sha1_file() function for checking
      whether a loose object file exists at all.
      
      As such, the whole 'return stat information' part of it was just
      pointless (nobody cares any more), and the naming of the function is not
      really all that relevant either.
      
      So simplify it to not do a 'stat()', but just an existence check (which
      is what the callers want), and rename it to 'has_loose_object()' which
      matches the use.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      c529d75a
    • L
      Make loose object file reading more careful · 44d1c19e
      Linus Torvalds 提交于
      We used to do 'stat()+open()+mmap()+close()' to read the loose object
      file data, which does work fine, but has a couple of problems:
      
       - it unnecessarily walks the filename twice (at 'stat()' time and then
         again to open it)
      
       - NFS generally has open-close consistency guarantees, which means that
         the initial 'stat()' was technically done outside of the normal
         consistency rules.
      
      So change it to do 'open()+fstat()+mmap()+close()' instead, which avoids
      both these issues.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      44d1c19e
    • L
      Avoid cross-directory renames and linking on object creation · 5723fe7e
      Linus Torvalds 提交于
      Instead of creating new temporary objects in the top-level git object
      directory, create them in the same directory they will finally end up in
      anyway.  This avoids making the final atomic "rename to stable name"
      operation be a cross-directory event, which makes it a lot easier for
      various filesystems.
      
      Several filesystems do things like change the inode number when moving
      files across directories (or refuse to do it entirely).
      
      In particular, it can also cause problems for NFS implementations that
      change the filehandle of a file when it moves to a different directory,
      like the old user-space NFS server did, and like the Linux knfsd still
      does if you don't export your filesystems with 'no_subtree_check' or if
      you export a filesystem that doesn't have stable inode numbers across
      renames).
      
      This change also obviously implies creating the object fan-out
      subdirectory at tempfile creation time, rather than at the final
      move_temp_to_file() time.  Which actually accounts for most of the size
      of the patch.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NJunio C Hamano <gitster@pobox.com>
      5723fe7e