1. 03 6月, 2005 1 次提交
  2. 02 6月, 2005 7 次提交
    • L
      Run the tutorial through ispell once more · cc29f732
      Linus Torvalds 提交于
      People are making fun of me for being a bad speeler.
      cc29f732
    • 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
    • L
      tutorial.txt: start describing how to copy repositories · f35ca9ed
      Linus Torvalds 提交于
      Both locally and remotely.
      f35ca9ed
    • J
      [PATCH] diff: mode bits fixes · 67574c40
      Junio C Hamano 提交于
      The core GIT repository has trees that record regular file mode
      in 0664 instead of normalized 0644 pattern.  Comparing such a
      tree with another tree that records the same file in 0644
      pattern without content changes with git-diff-tree causes it to
      feed otherwise unmodified pairs to the diff_change() routine,
      which triggers a sanity check routine and barfs.  This patch
      fixes the problem, along with the fix to another caller that
      uses unnormalized mode bits to call diff_change() routine in a
      similar way.
      
      Without this patch, you will see "fatal error" from diff-tree
      when you run git-deltafy-script on the core GIT repository
      itself.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      67574c40
    • L
      Update tutorial for simplified "git" script. · 81bb573e
      Linus Torvalds 提交于
      Use "git commit" instead of "git-commit-script", and talk about using
      "git log" before introducing the more complex "git-whatchanged".
      
      In short, try to make it feel a bit more normal to those poor souls
      using CVS.
      
      Do some whitspace edits too, to make the side notes stand out a bit
      more.
      81bb573e
    • L
      Add "git" and "git-log-script" helper scripts. · e764b8e8
      Linus Torvalds 提交于
      The "git" script is just shorthand: "git xyz <args>" will just execute
      "git-xyz-script <args>", which is useful for people used to the CVS
      naming convention. So "git log" will run the new git-log-script, which
      is just a wrapper around the new pretty-printing git-rev-list.
      
      Cheesy.
      e764b8e8
  3. 01 6月, 2005 10 次提交
  4. 31 5月, 2005 16 次提交
    • L
      git-rev-list: add "--parents" command line flag · 97658004
      Linus Torvalds 提交于
      It makes rev-list show the list of parents, the same
      way git-rev-tree does (but without the expense).
      97658004
    • L
      git-rev-list: use proper lazy reachability analysis · 8906300f
      Linus Torvalds 提交于
      This mean sthat you can give a beginning/end pair to git-rev-list,
      and it will show all entries that are reachable from the beginning
      but not the end.
      
      For example
      
      	git-rev-list v2.6.12-rc5 v2.6.12-rc4
      
      shows all commits that are in -rc5 but are not in -rc4.
      8906300f
    • L
      commit_list_insert: return the new commit list entry · ac5155ef
      Linus Torvalds 提交于
      This is useful for when we want to insert the next one after
      this new one, for example.
      ac5155ef
    • J
      [PATCH] Show dissimilarity index for D and N case. · 70aadac0
      Junio C Hamano 提交于
      The way broken deletes and creates are shown in the -p
      (diff-patch) output format has become consistent with how
      rename/copy edits are shown.  They will show "dissimilarity
      index" value, immediately following the "deleted file mode" and
      "new file mode" lines.
      
      The git-apply is taught to grok such an extended header.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      70aadac0
    • J
      [PATCH] Add -O<orderfile> option to diff-* brothers. · af5323e0
      Junio C Hamano 提交于
      A new diffcore filter diffcore-order is introduced.  This takes
      a text file each of whose line is a shell glob pattern.  Patches
      that match a glob pattern on an earlier line in the file are
      output before patches that match a later line, and patches that
      do not match any glob pattern are output last.
      
      A typical orderfile for git project probably should look like
      this:
      
          README
          Makefile
          Documentation
          *.h
          *.c
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      af5323e0
    • J
      [PATCH] Buglets fix in the new two scripts · 2036d841
      Junio C Hamano 提交于
      Should be obvious...
      
       - Use $VISUAL, $EDITOR, in this order if set, and fall back on
         vi.
      
       - Status R, C, D, N usually are followed by number, so adjust
         case arms to that pattern.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      2036d841
    • L
      git-resolve-script: use "git-apply --stat" instead of diffstat · 866b973b
      Linus Torvalds 提交于
      Not everybody necessarily even has diffstat installed.
      866b973b
    • N
      [PATCH] mkdelta enhancements (take 2) · 53d4b460
      Nicolas Pitre 提交于
      Although it was described as such, git-mkdelta didn't really attempt to
      find the best delta against any previous object in the list, but was
      only able to create a delta against the preceeding object.  This patch
      reworks the code to fix that limitation and hopefully makes it a bit
      clearer than before, including fixing the delta loop detection which was
      broken.
      
      This means that
      
      	git-mkdelta sha1 sha2 sha3 sha4 sha5 sha6
      
      will now create a sha2 delta against sha1, a sha3 delta against either
      sha2 or sha1 and keep the best one, a sha4 delta against either sha3,
      sha2 or sha1, etc.  The --max-behind argument limits that search for the
      best delta to the specified number of previous objects in the list.  If
      no limit is specified it is unlimited (note: it might run out of
      memory with long object lists).
      
      Also added a -q (quiet) switch so it is possible to have 3 levels of
      output: -q for nothing, -v for verbose, and if none of -q nor -v is
      specified then only actual changes on the object database are shown.
      
      Finally the git-deltafy-script has been updated accordingly, and some
      bugs fixed (thanks to Stephen C. Tweedie for spotting them).
      
      This version has been toroughly tested and I think it is ready
      for public consumption.
      Signed-off-by: NNicolas Pitre <nico@cam.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      53d4b460
    • L
      Add "commit" helper script · a3e870f2
      Linus Torvalds 提交于
      This is meant to make raw git not hugely less usable than something
      like raw CVS. I want to make a 1.0 release of the plumbing, and the
      actual commit part was just too intimidating.
      a3e870f2
    • J
      [PATCH] Add -B flag to diff-* brothers. · f345b0a0
      Junio C Hamano 提交于
      A new diffcore transformation, diffcore-break.c, is introduced.
      
      When the -B flag is given, a patch that represents a complete
      rewrite is broken into a deletion followed by a creation.  This
      makes it easier to review such a complete rewrite patch.
      
      The -B flag takes the same syntax as the -M and -C flags to
      specify the minimum amount of non-source material the resulting
      file needs to have to be considered a complete rewrite, and
      defaults to 99% if not specified.
      
      As the new test t4008-diff-break-rewrite.sh demonstrates, if a
      file is a complete rewrite, it is broken into a delete/create
      pair, which can further be subjected to the usual rename
      detection if -M or -C is used.  For example, if file0 gets
      completely rewritten to make it as if it were rather based on
      file1 which itself disappeared, the following happens:
      
          The original change looks like this:
      
      	file0     --> file0' (quite different from file0)
      	file1     --> /dev/null
      
          After diffcore-break runs, it would become this:
      
      	file0     --> /dev/null
      	/dev/null --> file0'
      	file1     --> /dev/null
      
          Then diffcore-rename matches them up:
      
      	file1     --> file0'
      
      The internal score values are finer grained now.  Earlier
      maximum of 10000 has been raised to 60000; there is no user
      visible changes but there is no reason to waste available bits.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      f345b0a0
    • J
      [PATCH] diff: fix the culling of unneeded delete record. · 2cd68882
      Junio C Hamano 提交于
      The commit 15d061b4
      
          [PATCH] Fix the way diffcore-rename records unremoved source.
      
      still leaves unneeded delete records in its output stream by
      mistake, which was covered up by having an extra check to turn
      such a delete into a no-op downstream.  Fix the check in the
      diffcore-rename to simplify the output routine.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      2cd68882
    • J
      [PATCH] diff: further cleanup. · 9d429ff6
      Junio C Hamano 提交于
      When preparing data to feed the external diff, we should give
      the mode we obtained from the caller, even when we are dealing
      with a file with 0{40} SHA1 (i.e. the caller said "look at the
      filesystem"), since the mode passed by the caller via
      diff_addremove() or diff_change() is always trustworthy.
      
      This is _not_ a bugfix --- the existing code stat() on the file
      ifself and does the same computation on st.st_mode to compute
      the mode the same way the caller did to give the original mode.
      We cannot remove the stat() call from here, but the extra
      computation to create the mode value is unnecessary.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      9d429ff6
    • J
      [PATCH] diff: code clean-up and removal of rename hack. · 01c4e70f
      Junio C Hamano 提交于
      A new macro, DIFF_PAIR_RENAME(), is introduced to distinguish a
      filepair that is a rename/copy (the definition of which is src
      and dst are different paths, of course).  This removes the hack
      used in the record_rename_pair() to always put a non-zero value
      in the score field.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      01c4e70f
    • J
      [PATCH] diff: consolidate various calls into diffcore. · befe8639
      Junio C Hamano 提交于
      The three diff-* brothers had a sequence of calls into diffcore
      that were almost identical.  Introduce a new diffcore_std()
      function that takes all the necessary arguments to consolidate
      it.  This will make later enhancements and changing the order of
      diffcore application simpler.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      befe8639
    • J
      [PATCH] diff-helper: Fix R/C score parsing under -z flag. · ddafa7e9
      Junio C Hamano 提交于
      The score number that follow R/C status were parsed but the
      parse pointer was not updated, causing the entire line to become
      unrecognized.  This patch fixes this problem.
      
      There was a test missing to catch this breakage, which this
      commit adds as t4009-diff-rename-4.sh.  The diff-raw tests used
      in related t4005-diff-rename-2.sh (the same test without -z) and
      t4007-rename-3.sh were stricter than necessarily, despite that
      the comment for the tests said otherwise.  This patch also
      corrects them.
      
      The documentation is updated to say that the status can
      optionally be followed by a number called "score"; it does not
      have to stay similarity index forever and there is no reason to
      limit it only to C and R.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      ddafa7e9
    • L
      git-init-db: set up the full default environment · cad88fdf
      Linus Torvalds 提交于
      Create .git/refs/{heads,tags} and make .git/HEAD be a symlink to
      (the as yet non-existent) .git/refs/heads/master.
      cad88fdf
  5. 30 5月, 2005 6 次提交
    • L
      git-mktag: be more careful in reading the input. · b97e3dfa
      Linus Torvalds 提交于
      Instead of always assuming it can be read with a single
      read() system call, loop around properly.
      
      Pointed out by Pasky, but I ended up implementing it differently
      from his suggested patch.
      b97e3dfa
    • J
      [PATCH] Fix count-delta overcounting · 8b7d510f
      Junio C Hamano 提交于
      The count-delta routine sometimes overcounted the copied source
      material which resulted in unsigned int wraparound.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      8b7d510f
    • J
      [PATCH] Do not include unused header files. · 844e6e4d
      Junio C Hamano 提交于
      Some source files were including "delta.h" without actually
      needing it.  Remove them.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      844e6e4d
    • J
      [PATCH] Pickaxe fixes. · e25de756
      Junio C Hamano 提交于
      A bug in the command line argument parsing code was making
      pickaxe not to work at all in diff-cache and diff-files commands.
      Embarrassingly enough, the working pickaxe in diff-tree tells me
      that it was not working in these two commands from day one.
      This patch fixes it.
      
      Also updates the documentation to describe the --pickaxe-all option.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      e25de756
    • J
      [PATCH] Rewrite ls-tree to behave more like "/bin/ls -a" · 6af1f019
      Junio C Hamano 提交于
      This is a complete rewrite of ls-tree to make it behave more
      like what "/bin/ls -a" does in the current working directory.
      
      Namely, the changes are:
      
       - Unlike the old ls-tree behaviour that used paths arguments to
         restrict output (not that it worked as intended---as pointed
         out in the mailing list discussion, it was quite incoherent),
         this rewrite uses paths arguments to specify what to show.
      
       - Without arguments, it implicitly uses the root level as its
         sole argument ("/bin/ls -a" behaves as if "." is given
         without argument).
      
       - Without -r (recursive) flag, it shows the named blob (either
         file or symlink), or the named tree and its immediate
         children.
      
       - With -r flag, it shows the named path, and recursively
         descends into it if it is a tree.
      
       - With -d flag, it shows the named path and does not show its
         children even if the path is a tree, nor descends into it
         recursively.
      
      This is still request-for-comments patch.  There is no mailing
      list consensus that this proposed new behaviour is a good one.
      
      The patch to t/t3100-ls-tree-restrict.sh illustrates
      user-visible behaviour changes.  Namely:
      
       * "git-ls-tree $tree path1 path0" lists path1 first and then
         path0.  It used to use paths as an output restrictor and
         showed output in cache entry order (i.e. path0 first and then
         path1) regardless of the order of paths arguments.
      
       * "git-ls-tree $tree path2" lists path2 and its immediate
         children but having explicit paths argument does not imply
         recursive behaviour anymore, hence paths/baz is shown but not
         paths/baz/b.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      6af1f019
    • J
      [PATCH] Adjust diff-helper to diff-tree -v -z changes. · 2bc25641
      Junio C Hamano 提交于
      The latest change to diff-tree -z output adds an extra line
      termination after non diff-raw material (the header and the
      commit message).  To compensate for this change, stop adding the
      output termination of our own.  "diff-tree -v -z" piped to
      "diff-helper -z" would give different result from "diff-tree -v"
      piped to "diff-helper" without this change.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      2bc25641