1. 07 11月, 2005 1 次提交
  2. 27 10月, 2005 1 次提交
    • L
      Fix what to do and how to detect when hardlinking fails · 7ebb6fca
      Linus Torvalds 提交于
      Recent FAT workaround caused compilation trouble on OpenBSD;
      different platforms use different error codes when we try to
      hardlink the temporary file to its final location.  Existing
      Coda hack also checks its own error code, but the thing is,
      the case we care about is if link failed for a reason other
      than that the final file has already existed (which would be
      normal, or it could mean collision).  So just check the error
      code against EEXIST.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      7ebb6fca
  3. 26 10月, 2005 1 次提交
  4. 14 10月, 2005 1 次提交
  5. 12 10月, 2005 1 次提交
    • L
      Use git config file for committer name and email info · e1b10391
      Linus Torvalds 提交于
      This starts using the "user.name" and "user.email" config variables if
      they exist as the default name and email when committing.  This means
      that you don't have to use the GIT_COMMITTER_EMAIL environment variable
      to override your email - you can just edit the config file instead.
      
      The patch looks bigger than it is because it makes the default name and
      email information non-static and renames it appropriately.  And it moves
      the common git environment variables into a new library file, so that
      you can link against libgit.a and get the git environment without having
      to link in zlib and libcrypt.
      
      In short, most of it is renaming and moving, the real change core is
      just a few new lines in "git_default_config()" that copies the user
      config values to the new base.
      
      It also changes "git-var -l" to list the config variables.
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      e1b10391
  6. 11 10月, 2005 1 次提交
    • J
      Use the same move_temp_to_file in git-http-fetch. · b721e01f
      Junio C Hamano 提交于
      The http commit walker cannot use the same temporary file
      creation code because it needs to use predictable temporary
      filename for partial fetch continuation purposes, but the code
      to move the temporary file to the final location should be
      usable from the ordinary object creation codepath.
      
      Export move_temp_to_file from sha1_file.c and use it, while
      losing the custom relink_or_rename function from http-fetch.c.
      
      Also the temporary object file creation part needs to make sure
      the leading path exists, in preparation of the really lazy
      fan-out directory creation.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      b721e01f
  7. 09 10月, 2005 1 次提交
    • L
      Create object subdirectories on demand · 230f1322
      Linus Torvalds 提交于
      This makes it possible to have a "sparse" git object subdirectory
      structure, something that has become much more attractive now that people
      use pack-files all the time.
      
      As a result of pack-files, a git object directory doesn't necessarily have
      any individual objects lying around, and in that case it's just wasting
      space to keep the empty first-level object directories around: on many
      filesystems the 256 empty directories will be aboue 1MB of diskspace.
      
      Even more importantly, after you re-pack a project that _used_ to be
      unpacked, you could be left with huge directories that no longer contain
      anything, but that waste space and take time to look through.
      
      With this change, "git prune-packed" can just do an rmdir() on the
      directories, and they'll get removed if empty, and re-created on demand.
      
      This patch also tries to fix up "write_sha1_from_fd()" to use the new
      common infrastructure for creating the object files, closing a hole where
      we might otherwise leave half-written objects in the object database.
      
      [jc: I unoptimized the part that really removes the fan-out directories
       to ease transition.  init-db still wastes 1MB of diskspace to hold 256
       empty fan-outs, and prune-packed rmdir()'s the grown but empty directories,
       but runs mkdir() immediately after that -- reducing the saving from 150KB
       to 146KB.  These parts will be re-introduced when everybody has the
       on-demand capability.]
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      230f1322
  8. 07 10月, 2005 1 次提交
    • J
      Show original and resulting blob object info in diff output. · ec1fcc16
      Junio C Hamano 提交于
      This adds more cruft to diff --git header to record the blob SHA1 and
      the mode the patch/diff is intended to be applied against, to help the
      receiving end fall back on a three-way merge.  The new header looks
      like this:
      
          diff --git a/apply.c b/apply.c
          index 7be5041..8366082 100644
          --- a/apply.c
          +++ b/apply.c
          @@ -14,6 +14,7 @@
           //    files that are being modified, but doesn't apply the patch
           //  --stat does just a diffstat, and doesn't actually apply
          +//  --show-index-info shows the old and new index info for...
          ...
      
      Upon receiving such a patch, if the patch did not apply cleanly to the
      target tree, the recipient can try to find the matching old objects in
      her object database and create a temporary tree, apply the patch to
      that temporary tree, and attempt a 3-way merge between the patched
      temporary tree and the target tree using the original temporary tree
      as the common ancestor.
      
      The patch lifts the code to compute the hash for an on-filesystem
      object from update-index.c and makes it available to the diff output
      routine.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      ec1fcc16
  9. 01 10月, 2005 1 次提交
  10. 30 9月, 2005 1 次提交
  11. 27 9月, 2005 1 次提交
  12. 14 9月, 2005 1 次提交
    • J
      [PATCH] Define relative .git/objects/info/alternates semantics. · ccfd3e99
      Junio C Hamano 提交于
      An entry in the alternates file can name a directory relative to
      the object store it describes.  A typical linux-2.6 maintainer
      repository would have "../../../torvalds/linux-2.6.git/objects" there,
      because the subsystem maintainer object store would live in
      
          /pub/scm/linux/kernel/git/$u/$system.git/objects/
      
      and the object store of Linus tree is in
      
          /pub/scm/linux/kernel/git/torvalds/linux-2.6.git/objects/
      
      This unfortunately is different from GIT_ALTERNATE_OBJECT_DIRECTORIES
      which is relative to the cwd of the running process, but there is no
      way to make it consistent with the behaviour of the environment
      variable.  The process typically is run in $system.git/ directory for
      a naked repository, or one level up for a repository with a working
      tree, so we just define it to be relative to the objects/ directory
      to be different from either ;-).
      
      Later, the dumb transport could be updated to read from info/alternates
      and make requests for the repository the repository borrows from.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      ccfd3e99
  13. 10 9月, 2005 1 次提交
  14. 05 9月, 2005 1 次提交
  15. 24 8月, 2005 1 次提交
    • J
      Fix ?: statements. · c7c81b3a
      Jason Riedy 提交于
      Omitting the first branch in ?: is a GNU extension.  Cute,
      but not supported by other compilers.  Replaced mostly
      by explicit tests.  Calls to getenv() simply are repeated
      on non-GNU compilers.
      Signed-off-by: NJason Riedy <ejr@cs.berkeley.edu>
      c7c81b3a
  16. 17 8月, 2005 2 次提交
  17. 15 8月, 2005 1 次提交
    • J
      Alternate object pool mechanism updates. · d5a63b99
      Junio C Hamano 提交于
      It was a mistake to use GIT_ALTERNATE_OBJECT_DIRECTORIES
      environment variable to specify what alternate object pools to
      look for missing objects when working with an object database.
      It is not a property of the process running the git commands,
      but a property of the object database that is partial and needs
      other object pools to complete the set of objects it lacks.
      
      This patch allows you to have $GIT_OBJECT_DIRECTORY/info/alternates
      whose contents is in exactly the same format as the environment
      variable, to let an object database name alternate object pools
      it depends on.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      d5a63b99
  18. 10 8月, 2005 1 次提交
  19. 09 8月, 2005 2 次提交
  20. 05 8月, 2005 1 次提交
    • J
      Update get_sha1() to grok extended format. · 9938af6a
      Junio C Hamano 提交于
      Everybody envies rev-parse, who is the only one that can grok
      the extended sha1 format.  Move the get_extended_sha1() out of
      rev-parse, rename it to get_sha1() and make it available to
      everybody else.
      
      The one I posted earlier to the list had one bug where it did
      not handle a name that ends with a digit correctly (it
      incorrectly tried the "Nth parent" path).  This commit fixes it.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      9938af6a
  21. 03 8月, 2005 1 次提交
    • B
      [PATCH] Parallelize pulling by ssh · 70b9829e
      barkalow@iabervon.org 提交于
      This causes ssh-pull to request objects in prefetch() and read then in
      fetch(), such that it reduces the unpipelined round-trip time.
      
      This also makes sha1_write_from_fd() support having a buffer of data
      which it accidentally read from the fd after the object; this was
      formerly not a problem, because it would always get a short read at
      the end of an object, because the next object had not been
      requested. This is no longer true.
      Signed-off-by: NDaniel Barkalow <barkalow@iabervon.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      70b9829e
  22. 01 8月, 2005 2 次提交
  23. 30 7月, 2005 1 次提交
    • P
      [PATCH] mmap error handling · e35f9824
      Pavel Roskin 提交于
      I have reviewed all occurrences of mmap() in git and fixed three types
      of errors/defects:
      
      1) The result is not checked.
      2) The file descriptor is closed if mmap() succeeds, but not when it
      fails.
      3) Various casts applied to -1 are used instead of MAP_FAILED, which is
      specifically defined to check mmap() return value.
      
      [jc: This is a second round of Pavel's patch.  He fixed up the problem
      that close() potentially clobbering the errno from mmap, which
      the first round had.]
      Signed-off-by: NPavel Roskin <proski@gnu.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      e35f9824
  24. 12 7月, 2005 1 次提交
    • J
      [PATCH] Check packs and then files. · ab90ea5d
      Junio C Hamano 提交于
      This reverses the order of object lookup, to check pack index first and
      then go to the filesystem to find .git/objects/??/ hierarchy.
      
      When most of the objects are packed, this saves quite many stat() calls
      and negative dcache entries; while the price this approach has to pay is
      negligible, even when most of the objects are outside pack, because
      checking pack index file is quite cheap.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      ab90ea5d
  25. 11 7月, 2005 3 次提交
  26. 09 7月, 2005 2 次提交
  27. 07 7月, 2005 1 次提交
  28. 06 7月, 2005 3 次提交
  29. 04 7月, 2005 3 次提交
  30. 01 7月, 2005 1 次提交
    • J
      [PATCH] Show more details of packfile with verify-pack -v. · ad8c80a5
      Junio C Hamano 提交于
      This implements show_pack_info() function used in verify-pack
      command when -v flag is used to obtain something like
      unpack-objects used to give when it was first written.
      
      It shows the following for each non-deltified object found in
      the pack:
      
          SHA1 type size offset
      
      For deltified objects, it shows this instead:
      
          SHA1 type size offset depth base_sha1
      
      In order to get the output in the order that appear in the pack
      file for debugging purposes, you can do this:
      
       $ git-verify-pack -v packfile | sort -n -k 4,4
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      ad8c80a5