]> Pileus Git - ~andy/git/commitdiff
Merge branch 'tr/line-log'
authorJunio C Hamano <gitster@pobox.com>
Sun, 2 Jun 2013 23:00:44 +0000 (16:00 -0700)
committerJunio C Hamano <gitster@pobox.com>
Sun, 2 Jun 2013 23:00:44 +0000 (16:00 -0700)
* tr/line-log:
  git-log(1): remove --full-line-diff description
  line-log: fix documentation formatting
  log -L: improve comments in process_all_files()
  log -L: store the path instead of a diff_filespec
  log -L: test merge of parallel modify/rename
  t4211: pass -M to 'git log -M -L...' test
  log -L: fix overlapping input ranges
  log -L: check range set invariants when we look it up
  Speed up log -L... -M
  log -L: :pattern:file syntax to find by funcname
  Implement line-history search (git log -L)
  Export rewrite_parents() for 'log -L'
  Refactor parse_loc

1  2 
Documentation/git-log.txt
Makefile
builtin/blame.c
builtin/log.c
log-tree.c
revision.c
revision.h

index a976534ab870a89a236ec7190f985e20f771e7f7,65707ce13ccfaba5034235439a5000eb826b6641..4687fe8192594b358f7058dcdec985ab30c2a3fb
@@@ -62,15 -69,19 +62,28 @@@ produced by --stat etc
        Note that only message is considered, if also a diff is shown
        its size is not included.
  
+ -L <start>,<end>:<file>, -L :<regex>:<file>::
+       Trace the evolution of the line range given by "<start>,<end>"
+       (or the funcname regex <regex>) within the <file>.  You may
+       not give any pathspec limiters.  This is currently limited to
+       a walk starting from a single revision, i.e., you may only
+       give zero or one positive revision arguments.
+       You can specify this option more than once.
+ +
+ <start> and <end> can take one of these forms:
+ include::line-range-format.txt[]
 +<revision range>::
 +      Show only commits in the specified revision range.  When no
 +      <revision range> is specified, it defaults to `HEAD` (i.e. the
 +      whole history leading to the current commit).  `origin..HEAD`
 +      specifies all the commits reachable from the current commit
 +      (i.e. `HEAD`), but not from `origin`. For a complete list of
 +      ways to spell <revision range>, see the "Specifying Ranges"
 +      section of linkgit:gitrevisions[7].
 +
  [\--] <path>...::
        Show only commits that are enough to explain how the files
        that match the specified paths came to be.  See "History
diff --cc Makefile
Simple merge
diff --cc builtin/blame.c
Simple merge
diff --cc builtin/log.c
index 6e56a50002194e0a452266a580932b9e4e9647c9,d584ff1a39209a656581b347f645c93fbaf26996..9e2123295ffa80ecab83977099ed6a43fd4a93f9
@@@ -98,13 -117,17 +118,17 @@@ static void cmd_log_init_finish(int arg
  {
        struct userformat_want w;
        int quiet = 0, source = 0, mailmap = 0;
+       static struct line_opt_callback_data line_cb = {NULL, NULL, STRING_LIST_INIT_DUP};
  
        const struct option builtin_log_options[] = {
 -              OPT_BOOLEAN(0, "quiet", &quiet, N_("suppress diff output")),
 -              OPT_BOOLEAN(0, "source", &source, N_("show source")),
 -              OPT_BOOLEAN(0, "use-mailmap", &mailmap, N_("Use mail map file")),
 +              OPT_BOOL(0, "quiet", &quiet, N_("suppress diff output")),
 +              OPT_BOOL(0, "source", &source, N_("show source")),
 +              OPT_BOOL(0, "use-mailmap", &mailmap, N_("Use mail map file")),
                { OPTION_CALLBACK, 0, "decorate", NULL, NULL, N_("decorate options"),
                  PARSE_OPT_OPTARG, decorate_callback},
+               OPT_CALLBACK('L', NULL, &line_cb, "n,m:file",
+                            "Process line range n,m in file, counting from 1",
+                            log_line_range_callback),
                OPT_END()
        };
  
diff --cc log-tree.c
index 1946e9ce8d88b73f134490760f76e00b63f1be69,793d2c8e9963b22e8684a318d8cd854e0a324857..2eb69bcfed096d28bff736deca715458605d902a
@@@ -9,7 -9,7 +9,8 @@@
  #include "string-list.h"
  #include "color.h"
  #include "gpg-interface.h"
 +#include "sequencer.h"
+ #include "line-log.h"
  
  struct decoration name_decoration = { "object names" };
  
diff --cc revision.c
Simple merge
diff --cc revision.h
Simple merge