1. 02 5月, 2005 8 次提交
    • 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
    • L
      date handling: handle "AM"/"PM" on time · 68849b54
      Linus Torvalds 提交于
      And be a bitmore careful about matching: if we don't recognize a word
      or a number, we skip the whole thing, rather than trying the next character
      in that word/number.
      
      Finally: since ctime() adds the final '\n', don't add another one in test-date.
      68849b54
    • L
      date.c: allow even more varied time formats · 198b0fb6
      Linus Torvalds 提交于
      (and some added checks for truly non-sensical stuff)
      198b0fb6
    • J
      [PATCH] Allow removing files in a subdirectory. · e2a669bb
      Junio C Hamano 提交于
      I found this during a conflict merge testing.  The original did
      not have either DF (a file) or DF/DF (a file DF/DF under a
      directory DF).  One side created DF, the other created DF/DF.  I
      first resolved DF as a new file by taking what the first side
      did.  After that, the entry DF/DF cannot be resolved by running
      git-update-cache --remove although it does not exist on the
      filesystem.
      
          $ /bin/ls -F
          AN  DF  MN  NM  NN  SS  Z/
          $ git-ls-files --stage | grep DF
          100644 71420ab81e254145d26d6fc0cddee64c1acd4787 0 DF
          100644 68a6d8b91da11045cf4aa3a5ab9f2a781c701249 2 DF/DF
          $ git-update-cache --remove DF/DF
          fatal: Unable to add DF/DF to database
      
      It turns out that the errno from open() in this case was not
      ENOENT but ENOTDIR, which the code did not check.  Here is a
      fix.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      e2a669bb
    • J
      [PATCH] Really fix git-merge-one-file-script this time. · 21a08dcb
      Junio C Hamano 提交于
      The merge-cache program was updated to pass executable bits when
      calling git-merge-one-file-script, but the called script
      supplied as an example were not using them carefully.
      
      This patch fixes the following problems in the script:
      
       * When a new file is created in a directory, which is a file in
         the work tree, it tried to create leading directory but did
         not check for failure from the "mkdir -p" command.
      
       * The script did not check the exit status from the
         git-update-cache command at all.
      
       * The parameter "$4" to the script is a file name that can
         contain almost any characters, so it must be quoted with
         double quotes and also needs to be preceded with -- to mark
         it as a non-option when passed to certain commands.
      
       * The chmod command was used with parameter "$6" or "$7" to set
         the mode bits.  This contradicts with the strategy taken by
         checkout-cache, where we honor user's umask and force only
         the executable bits.  With this patch, it creates a new file
         by redirecting into it (thus honoring user's default umask),
         and then uses "chmod +x" if we want the resulting file
         executable.  Without this fix, the merge result becomes 0644
         or 0755 for users whose umask is 002 for whom it should
         become 0664 or 0775.
      
       * When "$1 -> $2 -> $3" case was not handled, the script did
         not say which path it was working on, which was not so useful
         when used with the -a option of git-merge-cache.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      21a08dcb
    • J
      [PATCH] Add git-apply-patch-script. · 5d2f8b27
      Junio C Hamano 提交于
      I said:
      
           - Stop attempting to be compatible with cg-patch, and drop
             (mode:XXXXXX) bits from the diff.
      
           - Do keep the /dev/null change for created and deleted case.
      
           - No "Index:" line, no "Mode change:" line, anywhere in the
             output.  Anything that wants the mode bits and sha1 hash can
             do things from GIT_EXTERNAL_DIFF mechanism.  Maybe document
             suggested usage better.
      
      This adds an example script git-apply-patch-script, that can be
      used as the GIT_EXTERNAL_DIFF to apply changes between two trees
      directly on the current work tree, like this:
      
       GIT_EXTERNAL_DIFF=git-apply-patch-script git-diff-tree -p <tree> <tree>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      5d2f8b27
    • J
      [PATCH] Rework built-in diff to make its output more dense. · c983370e
      Junio C Hamano 提交于
      Linus says,
      
          The fewer lines there are that don't usually tell a human
          anything, the better. Dense is good.
      
      This patch makes the default diff output more dense.  This
      removes the previous misguided attempt to be cg-patch
      compatible.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      c983370e
  2. 01 5月, 2005 17 次提交
  3. 30 4月, 2005 9 次提交
  4. 29 4月, 2005 6 次提交
    • R
      [PATCH] Use read_object_with_reference() in tar-tree · db413479
      Rene Scharfe 提交于
      This patch replaces the usage of read_tree_with_tree_or_commit_sha1()
      with read_object_with_reference() in tar-tree.  As a result the code
      that tries to figure out the commit time doesn't need to open the commit
      object 'by hand' any more.
      
      Signed-off-by: Rene Scharfe <lsrfire.ath.cx>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      db413479
    • J
      [PATCH] Rename and extend read_tree_with_tree_or_commit_sha1 · 40469ee9
      Junio C Hamano 提交于
      This patch renames read_tree_with_tree_or_commit_sha1() to
      read_object_with_reference() and extends it to automatically
      dereference not just "commit" objects but "tag" objects.  With
      this patch, you can say e.g.:
      
          ls-tree $tag
          read-tree -m $(merge-base $tag $HEAD) $tag $HEAD
          diff-cache $tag
          diff-tree $tag $HEAD
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      40469ee9
    • N
      [PATCH] add short options to show-files · cf9a113d
      Nicolas Pitre 提交于
      The show-files long options are cumbersome to type.  This patch adds
      equivalent short options.
      
      Also add missing "unmerged" to usage string.
      
      Finally reduce the number of lines for argument parsing in half.
      Signed-off-by: NNicolas Pitre <nico@cam.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      cf9a113d
    • J
      [PATCH] diff-tree does not need -r in git-export.c · 0cc087e3
      Junio C Hamano 提交于
      No need to pass -r anymore, since diff-tree -p implies recursive
      behaviour these days.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      0cc087e3
    • R
      [PATCH] create tar archives of tree on the fly · 731ab9cc
      Rene Scharfe 提交于
      This is an improved version of tar-tree, a streaming archive creator for
      GIT.  The major added feature is blocking; all write(2) calls now have a
      size of 10240, just as GNU tar (and tape drives) likes them.  The
      buffering overhead does not seem to degrade performance because most
      files in the repositories I tested this with are smaller than 10KB, so
      we need fewer system calls. 
      
      File names are still restricted to 500 bytes and the archive format
      currently only allows for files up to 8GB.  Both restrictions can be
      lifted if need be with more pax extended headers. 
      
      The archive format used is the pax interchange format, i.e.  POSIX tar
      format.  It can be read by (and created with) GNU tar.  If I read the
      specs correctly tar-tree should now be standards compliant (modulo
      bugs). 
      
      Because it streams the archive (think ls-tree merged with cat-file),
      tar-tree doesn't need to create any temporary files.  That makes it
      quite fast. 
      
      It accepts tree IDs and commit IDs as first parameter.  In the latter
      case tar-tree tries to get the commit date out of the committer line. 
      Else all files in the archive are time-stamped with the current time. 
      
      An optional second parameter is used as a path prefix for all files in
      the archive.  Example:
      
         $ tar-tree a2755a80f40e5794ddc20e00f781af9d6320fafb \
         linux-2.6.12-rc3 | bzip9 -9 > linux-2.6.12-rc3.tar.bz2
      Signed-off-by: NRene Scharfe <rene.scharfe@lsrfire.ath.cx>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      731ab9cc
    • N
      [PATCH] Give show-files the ability to process exclusion pattern. · 9ff768e9
      Nicolas Pitre 提交于
      This can be used with the famous dontdiff file as follows to find out
      about uncommitted files just like dontdiff is used with the diff
      command:
      
          show-files --others --exclude-from=dontdiff
      
      and the exclude list can be reversed with the --ignore switch.
      Signed-off-by: NNicolas Pitre <nico@cam.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      9ff768e9