Merge branch 'mm/usage-log-l-can-take-regex'
authorJunio C Hamano <gitster@pobox.com>
Wed, 6 May 2015 04:00:36 +0000 (21:00 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 6 May 2015 04:00:36 +0000 (21:00 -0700)
Documentation fix.

* mm/usage-log-l-can-take-regex:
log -L: improve error message on malformed argument
Documentation: change -L:<regex> to -L:<funcname>

1  2 
Documentation/blame-options.txt
Documentation/git-log.txt
line-log.c
index b299b5902360bdd9f784e5b3acdae3b558a6565a,23b8ff80df0b2a85049fb1d45903991e9b9131a4..a09969ba086609af5d35bbb3c5f30dfea5db00b6
@@@ -4,13 -4,13 +4,13 @@@
  
  --root::
        Do not treat root commits as boundaries.  This can also be
 -      controlled via the `blame.showroot` config option.
 +      controlled via the `blame.showRoot` config option.
  
  --show-stats::
        Include additional statistics at the end of blame output.
  
  -L <start>,<end>::
- -L :<regex>::
+ -L :<funcname>::
        Annotate only the given line range. May be specified multiple times.
        Overlapping ranges are allowed.
  +
index 18bc716a0c89e42d91973b510da1d61d33aad977,6e65c5aa328d6dfc918f614aea4e08a569f51221..5692945a0b38c0b9e8e79e73a9a755c292224c98
@@@ -62,9 -62,9 +62,9 @@@ produced by `--stat`, etc
        output by allowing them to allocate space in advance.
  
  -L <start>,<end>:<file>::
- -L :<regex>:<file>::
+ -L :<funcname>:<file>::
        Trace the evolution of the line range given by "<start>,<end>"
-       (or the funcname regex <regex>) within the <file>.  You may
+       (or the function name regex <funcname>) 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.
@@@ -184,7 -184,7 +184,7 @@@ log.date:
        `--date` option.)  Defaults to "default", which means to write
        dates like `Sat May 8 19:35:34 2010 -0500`.
  
 -log.showroot::
 +log.showRoot::
        If `false`, `git log` and related commands will not treat the
        initial commit as a big creation event.  Any root commits in
        `git log -p` output would be shown without a diff attached.
diff --combined line-log.c
index b43ac5869857903bd105546d9cf07fb2b2451d31,1a6bc5921b4890273e4e9edab4d456cc27fd4064..a5ed9e3642271afd69a0434876515b97aaceb657
@@@ -237,7 -237,7 +237,7 @@@ static void diff_ranges_release(struct 
        range_set_release(&diff->target);
  }
  
 -void line_log_data_init(struct line_log_data *r)
 +static void line_log_data_init(struct line_log_data *r)
  {
        memset(r, 0, sizeof(struct line_log_data));
        range_set_init(&r->ranges, 0);
@@@ -575,7 -575,7 +575,7 @@@ parse_lines(struct commit *commit, cons
  
                name_part = skip_range_arg(item->string);
                if (!name_part || *name_part != ':' || !name_part[1])
-                       die("-L argument '%s' not of the form start,end:file",
+                       die("-L argument not 'start,end:file' or ':funcname:file': %s",
                            item->string);
                range_part = xstrndup(item->string, name_part - item->string);
                name_part++;
@@@ -1099,7 -1099,6 +1099,7 @@@ static int process_all_files(struct lin
                        rg->pair = diff_filepair_dup(queue->queue[i]);
                        memcpy(&rg->diff, pairdiff, sizeof(struct diff_ranges));
                }
 +              free(pairdiff);
        }
  
        return changed;