1. 06 11月, 2006 2 次提交
  2. 05 11月, 2006 5 次提交
  3. 02 11月, 2006 1 次提交
  4. 01 11月, 2006 1 次提交
    • J
      Introduce a new revision set operator <rev>^! · 62476c8e
      Junio C Hamano 提交于
      This is a shorthand for "<rev> --not <rev>^@", i.e. "include
      this commit but exclude any of its parents".
      
      When a new file $F is introduced by revision $R, this notation
      can be used to find a copy-and-paste from existing file in the
      parents of that revision without annotating the ancestry of the
      lines that were copied from:
      
      	git pickaxe -f -C $R^! -- $F
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      62476c8e
  5. 31 10月, 2006 3 次提交
  6. 30 10月, 2006 3 次提交
  7. 21 10月, 2006 8 次提交
    • J
      git-pickaxe: swap comparison loop used for -C · aec8fa1f
      Junio C Hamano 提交于
      When assigning blames for code movements across file boundaries,
      we used to iterate over blame entries (i.e. groups of lines to
      be blamed) in the outer loop and compared each entry with paths
      in the parent commit in an inner loop.  This meant that we
      opened the blob data from each path number of times.
      
      Reorganize the loop so that we read the same path only once, and
      compare it against all relevant blame entries.
      
      This should perform better, but seems to give mixed results,
      though.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      aec8fa1f
    • J
      git-pickaxe: get rid of wasteful find_origin(). · f6c0e191
      Junio C Hamano 提交于
      After finding out which path in the parent to scan to pass
      blames, using get_tree_entry() to extract the blob information
      again was quite wasteful, since diff-tree already gave us that
      information.  Separate the function to create an origin out as
      get_origin().
      
      You'll never know what is more efficient unless you try and/or
      think hard.  I somehow thought that extracting one known path
      out of commit's tree is cheaper than running a diff-tree for the
      current path between the commit and its parent, but it is not
      the case.  In real, non-toy projects, most commits do not touch
      the path you are interested in, and if the path is a few levels
      away from the toplevel, whole-subdirectory comparison logic
      diff-tree allows us to skip opening lower subdirectories.
      
      This commit rewrites find_origin() function to use a single-path
      diff-tree to see if the parent has the same blob as the current
      suspect, which is cheaper than extracting the blob information
      using get_tree_entry() and comparing it with what the current
      suspect has.  This shaves about 6% overhead when annotating
      kernel/sched.c in the Linux kernel repository on my machine.
      The saving rises to 25% for arch/i386/kernel/Makefile.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      f6c0e191
    • J
      git-pickaxe: do not confuse two origins that are the same. · 46014766
      Junio C Hamano 提交于
      It used to be that we can compare the address of the origin
      structure to determine if they are the same because they are
      always registered with scoreboard.  After introduction of the
      loop to try finding the best split, that is not true anymore.
      
      The current code has rather serious leaks with origin structure,
      but more importantly it gets confused when two origins that
      points at the same commit and same path.
      
      We might eventually have to refcount and gc origin, but let's
      fix the correctness issue first.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      46014766
    • J
      git-pickaxe: do not keep commit buffer. · 612702e8
      Junio C Hamano 提交于
      We need the commit buffer data while generating the final result,
      but until then we do not need them.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      612702e8
    • J
      git-pickaxe: introduce heuristics to avoid "trivial" chunks · 4a0fc95f
      Junio C Hamano 提交于
      This adds scoring logic to blame_entry to prevent blames on very
      trivial chunks (e.g. lots of empty lines, indent followed by a
      closing brace) from being passed down to unrelated lines in the
      parent.
      
      The current heuristics are quite simple and may need to be
      tweaked later, but we need to start somewhere.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      4a0fc95f
    • J
      git-pickaxe: improve "best match" heuristics · 5ff62c30
      Junio C Hamano 提交于
      Instead of comparing number of lines matched, look at the
      matched characters and count alnums, so that we do not pass
      blame on not-so-interesting lines, such as an empty line and
      a line that is indentation followed by a closing brace.
      
      Add an option --score-debug to show the score of each
      blame_entry while we cook this further on the "next" branch.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      5ff62c30
    • J
      git-pickaxe: fix nth_line() · 1ca6ca87
      Junio C Hamano 提交于
      We would want to be able to refer to the end of the file as
      "the beginning of Nth line" for a file that is N lines long.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      1ca6ca87
    • J
      git-pickaxe: pagenate output by default. · 1617baa5
      Junio C Hamano 提交于
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      1617baa5
  8. 20 10月, 2006 5 次提交
    • J
      git-pickaxe -C: blame cut-and-pasted lines. · 18abd745
      Junio C Hamano 提交于
      This completes the initial round of git-pickaxe.  In addition to
      the detection of line movements we already have, this finds new
      lines that were created by moving or cutting-and-pasting lines
      from different files in the parent.
      
      With this,
      
      	git pickaxe -f -n -C v1.4.0 -- revision.c
      
      finds that a major part of that file actually came from
      rev-list.c when Linus split the latter at commit ae563642 and
      blames them to earlier commits that touch rev-list.c.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      18abd745
    • J
      git-pickaxe -M: blame line movements within a file. · d24bba80
      Junio C Hamano 提交于
      This makes pickaxe more intelligent than the classic blame.
      
      A typical example is a change that moves one static C function
      from lower part of the file to upper part of the same file,
      because you added a new caller in the middle.
      
      The versions in the parent and the child would look like this:
      
              parent            child
      
              A                 static foo() {
              B                 ...
              C                 }
              D                 A
              E                 B
              F                 C
              G                 D
              static foo() {    ... call foo();
              ...               E
              }                 F
              H                 G
                                H
      
      With the classic blame algorithm, we can blame lines A B C D E F
      G and H to the parent.  The child is guilty of introducing the
      line "... call foo();", and the blame is placed on the child.
      However, the classic blame algorithm fails to notice that the
      implementation of foo() at the top of the file is not new, and
      moved from the lower part of the parent.
      
      This commit introduces detection of such line movements, and
      correctly blames the lines that were simply moved in the file to
      the parent.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      d24bba80
    • J
      git-pickaxe: blame rewritten. · cee7f245
      Junio C Hamano 提交于
      Currently it does what git-blame does, but only faster.
      
      More importantly, its internal structure is designed to support
      content movement (aka cut-and-paste) more easily by allowing
      more than one paths to be taken from the same commit.
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      cee7f245
    • J
      Merge branch 'maint' · e19343ad
      Junio C Hamano 提交于
      * maint:
        git-apply: prepare for upcoming GNU diff -u format change.
      e19343ad
    • L
      git-apply: prepare for upcoming GNU diff -u format change. · b507b465
      Linus Torvalds 提交于
      The latest GNU diff from CVS emits an empty line to express
      an empty context line, instead of more traditional "single
      white space followed by a newline".  Do not get broken by it.
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      b507b465
  9. 19 10月, 2006 12 次提交
    • J
      Don't use $author_name undefined when $from contains no /\s</. · 7768e27e
      Jim Meyering 提交于
      I noticed a case not handled in a recent patch.
      Demonstrate it like this:
      
        $ touch new-file
        $ git-send-email --dry-run --from j --to k new-file 2>err
        new-file
        OK. Log says:
        Date: Thu, 19 Oct 2006 10:26:24 +0200
        Sendmail: /usr/sbin/sendmail
        From: j
        Subject:
        Cc:
        To: k
      
        Result: OK
        $ cat err
        Use of uninitialized value in pattern match (m//) at /p/bin/git-send-email line 416.
        Use of uninitialized value in concatenation (.) or string at /p/bin/git-send-email line 420.
        Use of uninitialized value in concatenation (.) or string at /p/bin/git-send-email line 468.
      
      There's a patch for the $author_name part below.
      
      The example above shows that $subject may also be used uninitialized.
      That should be easy to fix, too.
      Signed-off-by: NJim Meyering <jim@meyering.net>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      7768e27e
    • J
      Merge branch 'mw/pathinfo' · 72bbc38b
      Junio C Hamano 提交于
      * mw/pathinfo:
        gitweb: Fix search form when PATH_INFO is enabled
        gitweb: Document features better
        gitweb: warn if feature cannot be overridden.
        gitweb: start to generate PATH_INFO URLs.
      
      Conflicts:
      
      	gitweb/README
      72bbc38b
    • J
      Merge branch 'js/diff' · 65606f35
      Junio C Hamano 提交于
      * js/diff:
        Turn on recursive with --summary
      65606f35
    • J
      Merge branch 'jc/send-email' · 2dcd3ce8
      Junio C Hamano 提交于
      * jc/send-email:
        Make git-send-email detect mbox-style patches more readily
        git-send-email: real name with period need to be dq-quoted on From: line
        git-send-email: do not drop custom headers the user prepared
      2dcd3ce8
    • J
      Merge branch 'jc/grep' · 9100c9dc
      Junio C Hamano 提交于
      * jc/grep:
        teach revision walker about --all-match.
        grep --all-match
      9100c9dc
    • J
      Merge early part of branch 'jc/diff-apply-patch' · 17250ac1
      Junio C Hamano 提交于
      17250ac1
    • J
      Merge branch 'jc/diff-numstat' · f73a5e89
      Junio C Hamano 提交于
      * jc/diff-numstat:
        diff --numstat
      f73a5e89
    • J
      Merge branch 'pb/bisect' · 8719f93b
      Junio C Hamano 提交于
      * pb/bisect:
        bisect reset: Leave the tree in usable state if git-checkout failed
      8719f93b
    • J
      Merge branch 'mw/send-email' · 32788ad6
      Junio C Hamano 提交于
      * mw/send-email:
        Add --dry-run option to git-send-email
      32788ad6
    • J
      Merge branch 'rs/rebase' · a420585f
      Junio C Hamano 提交于
      * rs/rebase:
        git-rebase: Add a -v option to show a diffstat of the changes upstream at the start of a rebase.
        git-rebase: Use --ignore-if-in-upstream option when executing git-format-patch.
      a420585f
    • J
      Merge branch 'sb/fetch' · a4c6ae5a
      Junio C Hamano 提交于
      * sb/fetch:
        merge and resolve: Output short hashes and .. in "Updating ..."
        fetch: Misc output cleanup
      a4c6ae5a
    • J
      Merge branch 'sk/svn' · 170487fb
      Junio C Hamano 提交于
      * sk/svn:
        git-svnimport.perl: copying directory from original SVN place
      170487fb