1. 07 6月, 2005 1 次提交
  2. 03 6月, 2005 2 次提交
  3. 02 6月, 2005 2 次提交
    • L
      Split up unpack_sha1_file() some more · 5180cacc
      Linus Torvalds 提交于
      Make a separate helper for parsing the header of an object file
      (really carefully) and for unpacking the rest. This means that
      anybody who uses the "unpack_sha1_header()" interface can easily
      look at the header and decide to unpack the rest too, without
      doing any extra work.
      5180cacc
    • L
      Add "unpack_sha1_header()" helper function · c4483576
      Linus Torvalds 提交于
      It's for people who aren't necessarily interested in the whole
      unpacked file, but do want to know the header information (size,
      type, etc..)
      
      For example, the delta code can use this to figure out whether
      an object is already a delta object, and what it is a delta
      against, without actually bothering to unpack all of the actual
      data in the delta.
      c4483576
  4. 26 5月, 2005 1 次提交
  5. 23 5月, 2005 1 次提交
    • L
      Include file cleanups.. · 6b0c3121
      Linus Torvalds 提交于
      Add <limits.h> to the include files handled by "cache.h", and remove
      extraneous #include directives from various .c files. The rule is that
      "cache.h" gets all the basic stuff, so that we'll have as few system
      dependencies as possible.
      6b0c3121
  6. 21 5月, 2005 2 次提交
    • N
      [PATCH] delta read · 91d7b8af
      Nicolas Pitre 提交于
      This makes the core code aware of delta objects and undeltafy them as
      needed.  The convention is to use read_sha1_file() to have
      undeltafication done automatically (most users do that already so this
      is transparent).
      
      If the delta object itself has to be accessed then it must be done
      through map_sha1_file() and unpack_sha1_file().
      
      In that context mktag.c has been switched to read_sha1_file() as there
      is no reason to do the full map+unpack manually.
      Signed-off-by: NNicolas Pitre <nico@cam.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      91d7b8af
    • L
      sparse cleanup · e99d59ff
      Linus Torvalds 提交于
      Fix various things that sparse complains about:
       - use NULL instead of 0
       - make sure we declare everything properly, or mark it static
       - use proper function declarations ("fn(void)" instead of "fn()")
      
      Sparse is always right.
      e99d59ff
  7. 18 5月, 2005 1 次提交
  8. 10 5月, 2005 2 次提交
    • J
      Introduce GIT_DIR environment variable. · 8ac069ac
      Junio C Hamano 提交于
      During the mailing list discussion on renaming GIT_ environment
      variables, people felt that having one environment that lets the
      user (or Porcelain) specify both SHA1_FILE_DIRECTORY (now
      GIT_OBJECT_DIRECTORY) and GIT_INDEX_FILE for the default layout
      would be handy.  This change introduces GIT_DIR environment
      variable, from which the defaults for GIT_INDEX_FILE and
      GIT_OBJECT_DIRECTORY are derived.  When GIT_DIR is not defined,
      it defaults to ".git".  GIT_INDEX_FILE defaults to
      "$GIT_DIR/index" and GIT_OBJECT_DIRECTORY defaults to
      "$GIT_DIR/objects".
      
      Special thanks for ideas and discussions go to Petr Baudis and
      Daniel Barkalow.  Bugs are mine ;-)
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      8ac069ac
    • J
      Rename environment variables. · d19938ab
      Junio C Hamano 提交于
      H. Peter Anvin mentioned that using SHA1_whatever as an
      environment variable name is not nice and we should instead use
      names starting with "GIT_" prefix to avoid conflicts.  Here is
      what this patch does:
      
       * Renames the following environment variables:
      
          New name                           Old Name
      
          GIT_AUTHOR_DATE                    AUTHOR_DATE
          GIT_AUTHOR_EMAIL                   AUTHOR_EMAIL
          GIT_AUTHOR_NAME                    AUTHOR_NAME
          GIT_COMMITTER_EMAIL                COMMIT_AUTHOR_EMAIL
          GIT_COMMITTER_NAME                 COMMIT_AUTHOR_NAME
          GIT_ALTERNATE_OBJECT_DIRECTORIES   SHA1_FILE_DIRECTORIES
          GIT_OBJECT_DIRECTORY               SHA1_FILE_DIRECTORY
      
       * Introduces a compatibility macro, gitenv(), which does an
         getenv() and if it fails calls gitenv_bc(), which in turn
         picks up the value from old name while giving a warning about
         using an old name.
      
       * Changes all users of the environment variable to fetch
         environment variable with the new name using gitenv().
      
       * Updates the documentation and scripts shipped with Linus GIT
         distribution.
      
      The transition plan is as follows:
      
       * We will keep the backward compatibility list used by gitenv()
         for now, so the current scripts and user environments
         continue to work as before.  The users will get warnings when
         they have old name but not new name in their environment to
         the stderr.
      
       * The Porcelain layers should start using new names.  However,
         just in case it ends up calling old Plumbing layer
         implementation, they should also export old names, taking
         values from the corresponding new names, during the
         transition period.
      
       * After a transition period, we would drop the compatibility
         support and drop gitenv().  Revert the callers to directly
         call getenv() but keep using the new names.
      
         The last part is probably optional and the transition
         duration needs to be set to a reasonable value.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      d19938ab
  9. 09 5月, 2005 1 次提交
  10. 08 5月, 2005 2 次提交
  11. 07 5月, 2005 3 次提交
  12. 04 5月, 2005 2 次提交
    • L
      sha1_file: make the new sha1 object writing be coda-friendly. · a31c6d02
      Linus Torvalds 提交于
      Coda doesn't like cross-directory hardlinks. So try to fall back
      on a plain rename instead.
      a31c6d02
    • L
      Improve sha1 object file writing. · aac17941
      Linus Torvalds 提交于
      Make it much safer: we write to a temporary file, and then link that
      temporary file to the final destination. This avoids all the nasty
      races if several people write the same object at the same time.
      
      It should also result in nicer on-disk layout, since it means that
      objects all get created in the same subdirectory. That makes a lot
      of block allocation algorithms happier, since the objects will now
      be allocated from the same zone.
      aac17941
  13. 02 5月, 2005 4 次提交
    • J
      Add git-write-blob. · 74400e71
      Junio C Hamano 提交于
      A new command, git-write-blob, is introduced.  This registers
      the contents of any file on the filesystem as a blob in the
      object database and reports its SHA1 to the standard output.
      To implement it, the patch promotes index_fd() from a static
      function in update-cache.c to extern and moves it to a library
      source, sha1_file.c.
      
      This command is used to update git-merge-one-file-script so that
      it does not smudge the work tree.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      74400e71
    • L
      Remove the ugly jit-style parent syntax. · ca4c7db9
      Linus Torvalds 提交于
      If somebody wants it later, we can re-do it, but for now we consider
      it an experiment that wasn't worth it. Git will still honor symbolic
      names, it just won't look up parents for you.
      
      Of course, you can always do it by hand if you want to.
      ca4c7db9
    • L
      Add "look up parent" logic for the simple names. · 35ad3382
      Linus Torvalds 提交于
      It uses the jit syntax, at least for now. 0-xxxx is the first parent of xxxx,
      while 1-xxxx is the second, and so on. You can use just "-xxxx" for the first
      parent, but a lot of commands will think that the initial '-' implies a
      command line flag.
      35ad3382
    • L
      Add "get_sha1()" helper function. · 3c249c95
      Linus Torvalds 提交于
      This allows the programs to use various simplified versions of
      the SHA1 names, eg just say "HEAD" for the SHA1 pointed to by
      the .git/HEAD file etc.
      
      For example, this commit has been done with
      
      	git-commit-tree $(git-write-tree) -p HEAD
      
      instead of the traditional "$(cat .git/HEAD)" syntax.
      3c249c95
  14. 29 4月, 2005 1 次提交
  15. 27 4月, 2005 1 次提交
  16. 26 4月, 2005 2 次提交
  17. 25 4月, 2005 1 次提交
  18. 24 4月, 2005 2 次提交
  19. 21 4月, 2005 3 次提交
  20. 20 4月, 2005 1 次提交
  21. 19 4月, 2005 1 次提交