1. 27 10月, 2006 1 次提交
    • R
      Make git-cherry handle root trees · 2b60356d
      Rene Scharfe 提交于
      This patch on top of 'next' makes built-in git-cherry handle root
      commits.
      
      It moves the static function log-tree.c::diff_root_tree() to
      tree-diff.c and makes it more similar to diff_tree_sha1() by
      shuffling around arguments and factoring out the call to
      log_tree_diff_flush().  Consequently the name is changed to
      diff_root_tree_sha1().  It is a version of diff_tree_sha1() that
      compares the empty tree (= root tree) against a single 'real' tree.
      
      This function is then used in get_patch_id() to compute patch IDs
      for initial commits instead of SEGFAULTing, as the current code
      does if confronted with parentless commits.
      Signed-off-by: NRene Scharfe <rene.scharfe@lsrfire.ath.cx>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      2b60356d
  2. 14 10月, 2006 1 次提交
  3. 27 9月, 2006 1 次提交
  4. 24 9月, 2006 1 次提交
  5. 08 9月, 2006 1 次提交
  6. 11 8月, 2006 1 次提交
  7. 24 7月, 2006 1 次提交
    • J
      Colorize 'commit' lines in log ui · ce436973
      Jeff King 提交于
      When paging through the output of git-whatchanged, the color cues help to
      visually navigate within a diff. However, it is difficult to notice when a
      new commit starts, because the commit and log are shown in the "normal"
      color. This patch colorizes the 'commit' line, customizable through
      diff.colors.commit and defaulting to yellow.
      
      As a side effect, some of the diff color engine (slot enum, get_color) has
      become accessible outside of diff.c.
      Signed-off-by: NJeff King <peff@peff.net>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      ce436973
  8. 08 7月, 2006 3 次提交
  9. 27 6月, 2006 3 次提交
  10. 24 6月, 2006 1 次提交
  11. 18 6月, 2006 1 次提交
  12. 21 5月, 2006 2 次提交
  13. 15 5月, 2006 2 次提交
  14. 06 5月, 2006 1 次提交
    • J
      binary diff: further updates. · 0660626c
      Junio C Hamano 提交于
      This updates the user interface and generated diff data format.
      
       * "diff --binary" is used to signal that we want an e-mailable
         binary patch.  It implies --full-index and -p.
      
       * "apply --allow-binary-replacement" acquired a short synonym
         "apply --binary".
      
       * After the "GIT binary patch\n" header line there is a token
         to record which binary patch mechanism was used, so that we
         can extend it later.  Currently there are two mechanisms
         defined: "literal" and "delta".  The former records the
         deflated postimage and the latter records the deflated delta
         from the preimage to postimage.
      
         For purely implementation convenience, I added the deflated
         length after these "literal/delta" tokens (otherwise the
         decoding side needs to guess and reallocate the buffer while
         inflating).  Improvement patches are very welcomed.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      0660626c
  15. 29 4月, 2006 1 次提交
    • J
      built-in diff: assorted updates. · 0fe7c1de
      Junio C Hamano 提交于
      "git diff(n)" without --base, --ours, etc. defaults to --cc,
      which usually is the same as -p unless you are in the middle of
      a conflicted merge, just like the shell script version.
      
      "git diff(n) blobA blobB path" complains and dies.
      
      "git diff(n) tree0 tree1 tree2...treeN" does combined diff that
      shows a merge of tree1..treeN to result in tree0.
      
      Giving "-c" option to any command that defaults to "--cc" turns
      off dense-combined flag.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      0fe7c1de
  16. 22 4月, 2006 3 次提交
    • J
      Libified diff-index: backward compatibility fix. · 5c21ac0e
      Junio C Hamano 提交于
      "diff-index -m" does not mean "do not ignore merges", but means
      "pretend missing files match the index".
      
      The previous round tried to address this, but failed because
      setup_revisions() ate "-m" flag before the caller had a chance
      to intervene.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      5c21ac0e
    • J
      Libify diff-index. · e09ad6e1
      Junio C Hamano 提交于
      The second installment to libify diff brothers.  The pathname
      arguments are checked more strictly than before because we now
      use the revision.c::setup_revisions() infrastructure.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      e09ad6e1
    • J
      Libify diff-files. · 6973dcae
      Junio C Hamano 提交于
      This is the first installment to libify diff brothers.
      
      The updated diff-files uses revision.c::setup_revisions()
      infrastructure to parse its command line arguments, which means
      the pathname arguments are checked more strictly than before.
      The tests are adjusted to separate possibly missing paths from
      the rest of arguments with double-dashes, to show the kosher
      way.
      
      As Linus pointed out, renaming diff.c to diff-lib.c was simply
      stupid, so I am renaming it back.  The new diff-lib.c is to
      contain pieces extracted from diff brothers.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      6973dcae
  17. 18 4月, 2006 1 次提交
    • L
      Log message printout cleanups · 91539833
      Linus Torvalds 提交于
      On Sun, 16 Apr 2006, Junio C Hamano wrote:
      >
      > In the mid-term, I am hoping we can drop the generate_header()
      > callchain _and_ the custom code that formats commit log in-core,
      > found in cmd_log_wc().
      
      Ok, this was nastier than expected, just because the dependencies between
      the different log-printing stuff were absolutely _everywhere_, but here's
      a patch that does exactly that.
      
      The patch is not very easy to read, and the "--patch-with-stat" thing is
      still broken (it does not call the "show_log()" thing properly for
      merges). That's not a new bug. In the new world order it _should_ do
      something like
      
      	if (rev->logopt)
      		show_log(rev, rev->logopt, "---\n");
      
      but it doesn't. I haven't looked at the --with-stat logic, so I left it
      alone.
      
      That said, this patch removes more lines than it adds, and in particular,
      the "cmd_log_wc()" loop is now a very clean:
      
      	while ((commit = get_revision(rev)) != NULL) {
      		log_tree_commit(rev, commit);
      		free(commit->buffer);
      		commit->buffer = NULL;
      	}
      
      so it doesn't get much prettier than this. All the complexity is entirely
      hidden in log-tree.c, and any code that needs to flush the log literally
      just needs to do the "if (rev->logopt) show_log(...)" incantation.
      
      I had to make the combined_diff() logic take a "struct rev_info" instead
      of just a "struct diff_options", but that part is pretty clean.
      
      This does change "git whatchanged" from using "diff-tree" as the commit
      descriptor to "commit", and I changed one of the tests to reflect that new
      reality. Otherwise everything still passes, and my other tests look fine
      too.
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      91539833
  18. 16 4月, 2006 1 次提交
  19. 14 4月, 2006 1 次提交
  20. 12 4月, 2006 1 次提交
  21. 11 4月, 2006 3 次提交
    • J
      diff-* --patch-with-raw · 86ff1d20
      Junio C Hamano 提交于
      This new flag outputs the diff-raw output and diff-patch output
      at the same time.  Requested by Cogito.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      86ff1d20
    • J
      tree-diff: do not assume we use only one pathspec · a8baa7b9
      Junio C Hamano 提交于
      The way tree-diff was set up assumed we would use only one set
      of pathspec during the entire life of the program.  Move the
      pathspec related static variables out to diff_options structure
      so that we can filter commits with one set of paths while show
      the actual diffs using different set of paths.
      
      I suspect this breaks blame.c, and makes "git log paths..." to
      default to the --full-diff, the latter of which is dealt with
      the next commit.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      a8baa7b9
    • J
      Retire diffcore-pathspec. · 77882f60
      Junio C Hamano 提交于
      Nobody except diff-stages used it -- the callers instead filtered
      the input to diffcore themselves.  Make diff-stages do that as
      well and retire diffcore-pathspec.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      77882f60
  22. 05 4月, 2006 1 次提交
    • P
      Support for pickaxe matching regular expressions · d01d8c67
      Petr Baudis 提交于
      git-diff-* --pickaxe-regex will change the -S pickaxe to match
      POSIX extended regular expressions instead of fixed strings.
      
      The regex.h library is a rather stupid interface and I like pcre too, but
      with any luck it will be everywhere we will want to run Git on, it being
      POSIX.2 and all. I'm not sure if we can expect platforms like AIX to
      conform to POSIX.2 or if win32 has regex.h. We might add a flag to
      Makefile if there is a portability trouble potential.
      Signed-off-by: NPetr Baudis <pasky@suse.cz>
      d01d8c67
  23. 30 3月, 2006 1 次提交
    • J
      tree/diff header cleanup. · 1b0c7174
      Junio C Hamano 提交于
      Introduce tree-walk.[ch] and move "struct tree_desc" and
      associated functions from various places.
      
      Rename DIFF_FILE_CANON_MODE(mode) macro to canon_mode(mode) and
      move it to cache.h.  This macro returns the canonicalized
      st_mode value in the host byte order for files, symlinks and
      directories -- to be compared with a tree_desc entry.
      create_ce_mode(mode) in cache.h is similar but is intended to be
      used for index entries (so it does not work for directories) and
      returns the value in the network byte order.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      1b0c7174
  24. 10 2月, 2006 3 次提交
    • J
      combine-diff: Record diff status a bit more faithfully · d416df88
      Junio C Hamano 提交于
      This shows "new file mode XXXX" and "deleted file mode XXXX"
      lines like two-way diff-patch output does, by checking the
      status from each parent.
      
      The diff-raw output for combined diff is made a bit uglier by
      showing diff status letters with each parent.  While most of the
      case you would see "MM" in the output, an Evil Merge that
      touches a path that was added by inheriting from one parent is
      possible and it would be shown like these:
      
          $ git-diff-tree --abbrev -c HEAD
          2d7ca89675eb8888b0b88a91102f096d4471f09f
          ::000000 000000 100644 0000000... 0000000... 31dd686... AA	b
          ::000000 100644 100644 0000000... 6c884ae... c6d4fa8... AM	d
          ::100644 100644 100644 4f7cbe7... f8c295c... 19d5d80... RR	e
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      d416df88
    • J
      combine-diff: move formatting logic to show_combined_diff() · 0a798076
      Junio C Hamano 提交于
      This way, diff-files can make use of it.  Also implement the
      full suite of what diff_flush_raw() supports just for
      consistency.  With this, 'diff-tree -c -r --name-status' would
      show what is expected.
      
      There is no way to get the historical output (useful for
      debugging and low-level Plumbing work) anymore, so tentatively
      it makes '-m' to mean "do not combine and show individual diffs
      with parents".
      
      diff-files matches diff-tree to produce raw output for -c.  For
      textual combined diff, use -p -c.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      0a798076
    • L
      diff-tree -c raw output · ee638024
      Linus Torvalds 提交于
      NOTE! This makes "-c" be the default, which effectively means that merges 
      are never ignored any more, and "-m" is a no-op. So it changes semantics.
      
      I would also like to make "--cc" the default if you do patches, but didn't 
      actually do that.
      
      The raw output format is not wonderfully pretty, but it's distinguishable 
      from a "normal patch" in that a normal patch with just one parent has just 
      one colon at the beginning, while a multi-parent raw diff has <n> colons 
      for <n> parents.
      
      So now, in the kernel, when you do
      
      	git-diff-tree cce0cac125623f9b68f25dd1350f6d616220a8dd
      
      (to see the manual ARM merge that had a conflict in arch/arm/Kconfig), you 
      get
      
      	cce0cac125623f9b68f25dd1350f6d616220a8dd
      	::100644 100644 100644 4a63a8e2e45247a11c068c6ed66c6e7aba29ddd9 77eee38762d69d3de95ae45dd9278df9b8225e2c 2f61726d2f4b636f6e66696700dbf71a59dad287       arch/arm/Kconfig
      
      ie you see two colons (two parents), then three modes (parent modes 
      followed by result mode), then three sha1s (parent sha1s followed by
      result sha1).
      
      Which is pretty close to the normal raw diff output.
      
      Cool/stupid exercise:
      
      	$ git-whatchanged | grep '^::' | cut -f2- | sort |
      	  uniq -c | sort -n | less -S
      
      will show which files have needed the most file-level merge conflict
      resolution. Useful? Probably not. But kind of interesting.
      
      For the kernel, it's
      
           ....
           10 arch/ia64/Kconfig
           11 drivers/scsi/Kconfig
           12 drivers/net/Makefile
           17 include/linux/libata.h
           18 include/linux/pci_ids.h
           23 drivers/net/Kconfig
           24 drivers/scsi/libata-scsi.c
           28 drivers/scsi/libata-core.c
           43 MAINTAINERS
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      ee638024
  25. 07 2月, 2006 1 次提交
  26. 06 2月, 2006 1 次提交
  27. 01 2月, 2006 1 次提交
  28. 28 1月, 2006 1 次提交