@@ -2,6 +2,10 @@
Show blank SHA-1 for boundary commits. This can also
be controlled via the `blame.blankboundary` config option.
+--blame-only::
+ Do not show any boundary commit lines created by revision range
+ specifiers. Only show blamed lines.
+
--root::
Do not treat root commits as boundaries. This can also be
controlled via the `blame.showRoot` config option.
@@ -9,7 +9,7 @@ SYNOPSIS
--------
[verse]
'git blame' [-c] [-b] [-l] [--root] [-t] [-f] [-n] [-s] [-e] [-p] [-w] [--incremental]
- [-L <range>] [-S <revs-file>] [-M] [-C] [-C] [-C] [--since=<date>]
+ [-L <range>] [-S <revs-file>] [-M] [-C] [-C] [-C] [--since=<date>] [--blame-only]
[--ignore-rev <rev>] [--ignore-revs-file <file>]
[--progress] [--abbrev=<n>] [<rev> | --contents <file> | --reverse <rev>..<rev>]
[--] <file>
@@ -45,6 +45,7 @@ static int max_score_digits;
static int show_root;
static int reverse;
static int blank_boundary;
+static int blame_only;
static int incremental;
static int xdl_opts;
static int abbrev = -1;
@@ -843,6 +844,7 @@ int cmd_blame(int argc, const char **argv, const char *prefix)
const struct option options[] = {
OPT_BOOL(0, "incremental", &incremental, N_("Show blame entries as we find them, incrementally")),
OPT_BOOL('b', NULL, &blank_boundary, N_("Show blank SHA-1 for boundary commits (Default: off)")),
+ OPT_BOOL(0, "blame-only", &blame_only, N_("Only show blamed commits (Default: off)")),
OPT_BOOL(0, "root", &show_root, N_("Do not treat root commits as boundaries (Default: off)")),
OPT_BOOL(0, "show-stats", &show_stats, N_("Show work cost statistics")),
OPT_BOOL(0, "progress", &show_progress, N_("Force progress reporting")),
For large files the will be many lines which are not blamed with the revision range or date period which clutter the output. Add an option to suppress the display of boundary commits lines, not just the object id (`-b` option). This is non-functional at this stage. The next commit will add functionality, tests, and documenation. Signed-off-by: Philip Oakley <philipoakley@iee.email> --- Documentation/blame-options.txt | 4 ++++ Documentation/git-blame.txt | 2 +- builtin/blame.c | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-)