git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH 0/3] Colorful blame output
@ 2018-04-24  0:08 Stefan Beller
  2018-04-24  0:08 ` [PATCH 1/3] builtin/blame: dim uninteresting metadata lines Stefan Beller
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Stefan Beller @ 2018-04-24  0:08 UTC (permalink / raw)
  To: git; +Cc: gitster, sunshine, Stefan Beller

This is a revamp of
https://public-inbox.org/git/20180416220955.46163-1-sbeller@google.com/

Junio had some issue with that version, as it would collide config and command
line options. This is fixed now by introducing another option.

Thanks,
Stefan

Stefan Beller (3):
  builtin/blame: dim uninteresting metadata lines
  builtin/blame: highlight recently changed lines
  builtin/blame: add new coloring scheme config

 Documentation/config.txt |  27 ++++++++
 builtin/blame.c          | 129 +++++++++++++++++++++++++++++++++++++--
 t/t8012-blame-colors.sh  |  48 +++++++++++++++
 3 files changed, 200 insertions(+), 4 deletions(-)
 create mode 100755 t/t8012-blame-colors.sh

-- 
2.17.0.441.gb46fe60e1d-goog


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/3] builtin/blame: dim uninteresting metadata lines
  2018-04-24  0:08 [PATCH 0/3] Colorful blame output Stefan Beller
@ 2018-04-24  0:08 ` Stefan Beller
  2018-04-24  0:08 ` [PATCH 2/3] builtin/blame: highlight recently changed lines Stefan Beller
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Stefan Beller @ 2018-04-24  0:08 UTC (permalink / raw)
  To: git; +Cc: gitster, sunshine, Stefan Beller

When using git-blame lots of lines contain redundant information, for
example in hunks that consist of multiple lines, the metadata (commit
name, author, date) are repeated. A reader may not be interested in those,
so offer an option to color the information that is repeated from the
previous line differently. Traditionally, we use CYAN for lines that
are less interesting than others (e.g. hunk header), so go with that.

The command line option '--color-lines' will trigger the coloring of
repeated lines, and the config option 'color.blame.colorLines' is
provided to select the color. Setting the config option doesn't imply
that repeated lines are colored. A later patch will introduce a config
to enable this mode by default.

Signed-off-by: Stefan Beller <sbeller@google.com>
---
 Documentation/config.txt |  5 +++++
 builtin/blame.c          | 39 +++++++++++++++++++++++++++++++++++----
 t/t8012-blame-colors.sh  | 19 +++++++++++++++++++
 3 files changed, 59 insertions(+), 4 deletions(-)
 create mode 100755 t/t8012-blame-colors.sh

diff --git a/Documentation/config.txt b/Documentation/config.txt
index 2659153cb3..9445a3a548 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -1218,6 +1218,11 @@ color.status.<slot>::
 	status short-format), or
 	`unmerged` (files which have unmerged changes).
 
+color.blame.repeatedLines::
+	Use the customized color for the part of git-blame output that
+	is repeated meta information per line (such as commit id,
+	author name, date and timezone). Defaults to cyan.
+
 color.ui::
 	This variable determines the default value for variables such
 	as `color.diff` and `color.grep` that control the use of color
diff --git a/builtin/blame.c b/builtin/blame.c
index db38c0b307..4d5fc64880 100644
--- a/builtin/blame.c
+++ b/builtin/blame.c
@@ -7,6 +7,7 @@
 
 #include "cache.h"
 #include "config.h"
+#include "color.h"
 #include "builtin.h"
 #include "commit.h"
 #include "diff.h"
@@ -46,6 +47,7 @@ static int xdl_opts;
 static int abbrev = -1;
 static int no_whole_file_rename;
 static int show_progress;
+static char repeated_meta_color[COLOR_MAXLEN];
 
 static struct date_mode blame_date_mode = { DATE_ISO8601 };
 static size_t blame_date_width;
@@ -316,10 +318,11 @@ static const char *format_time(timestamp_t time, const char *tz_str,
 #define OUTPUT_PORCELAIN	010
 #define OUTPUT_SHOW_NAME	020
 #define OUTPUT_SHOW_NUMBER	040
-#define OUTPUT_SHOW_SCORE      0100
-#define OUTPUT_NO_AUTHOR       0200
+#define OUTPUT_SHOW_SCORE	0100
+#define OUTPUT_NO_AUTHOR	0200
 #define OUTPUT_SHOW_EMAIL	0400
-#define OUTPUT_LINE_PORCELAIN 01000
+#define OUTPUT_LINE_PORCELAIN	01000
+#define OUTPUT_COLOR_LINE	02000
 
 static void emit_porcelain_details(struct blame_origin *suspect, int repeat)
 {
@@ -375,6 +378,7 @@ static void emit_other(struct blame_scoreboard *sb, struct blame_entry *ent, int
 	struct commit_info ci;
 	char hex[GIT_MAX_HEXSZ + 1];
 	int show_raw_time = !!(opt & OUTPUT_RAW_TIMESTAMP);
+	const char *color = NULL, *reset = NULL;
 
 	get_commit_info(suspect->commit, &ci, 1);
 	oid_to_hex_r(hex, &suspect->commit->object.oid);
@@ -384,6 +388,18 @@ static void emit_other(struct blame_scoreboard *sb, struct blame_entry *ent, int
 		char ch;
 		int length = (opt & OUTPUT_LONG_OBJECT_NAME) ? GIT_SHA1_HEXSZ : abbrev;
 
+		if (opt & OUTPUT_COLOR_LINE) {
+			if (cnt > 0) {
+				color = repeated_meta_color;
+				reset = GIT_COLOR_RESET;
+			} else  {
+				color = NULL;
+				reset = NULL;
+			}
+		}
+		if (color)
+			fputs(color, stdout);
+
 		if (suspect->commit->object.flags & UNINTERESTING) {
 			if (blank_boundary)
 				memset(hex, ' ', length);
@@ -433,6 +449,8 @@ static void emit_other(struct blame_scoreboard *sb, struct blame_entry *ent, int
 			printf(" %*d) ",
 			       max_digits, ent->lno + 1 + cnt);
 		}
+		if (reset)
+			fputs(reset, stdout);
 		do {
 			ch = *cp++;
 			putchar(ch);
@@ -607,6 +625,12 @@ static int git_blame_config(const char *var, const char *value, void *cb)
 		parse_date_format(value, &blame_date_mode);
 		return 0;
 	}
+	if (!strcmp(var, "color.blame.repeatedlines")) {
+		if (color_parse_mem(value, strlen(value), repeated_meta_color))
+			warning(_("invalid color '%s' in color.blame.repeatedLines"),
+				value);
+		return 0;
+	}
 
 	if (git_diff_heuristic_config(var, value, cb) < 0)
 		return -1;
@@ -690,6 +714,7 @@ int cmd_blame(int argc, const char **argv, const char *prefix)
 		OPT_BIT('s', NULL, &output_option, N_("Suppress author name and timestamp (Default: off)"), OUTPUT_NO_AUTHOR),
 		OPT_BIT('e', "show-email", &output_option, N_("Show author email instead of name (Default: off)"), OUTPUT_SHOW_EMAIL),
 		OPT_BIT('w', NULL, &xdl_opts, N_("Ignore whitespace differences"), XDF_IGNORE_WHITESPACE),
+		OPT_BIT(0, "color-lines", &output_option, N_("color redundant metadata from previous line differently"), OUTPUT_COLOR_LINE),
 
 		/*
 		 * The following two options are parsed by parse_revision_opt()
@@ -949,8 +974,14 @@ int cmd_blame(int argc, const char **argv, const char *prefix)
 
 	blame_coalesce(&sb);
 
-	if (!(output_option & OUTPUT_PORCELAIN))
+	if (!(output_option & OUTPUT_PORCELAIN)) {
 		find_alignment(&sb, &output_option);
+		if (!*repeated_meta_color &&
+		    (output_option & OUTPUT_COLOR_LINE))
+			strcpy(repeated_meta_color, GIT_COLOR_CYAN);
+	}
+	if (output_option & OUTPUT_ANNOTATE_COMPAT)
+		output_option &= ~OUTPUT_COLOR_LINE;
 
 	output(&sb, output_option);
 	free((void *)sb.final_buf);
diff --git a/t/t8012-blame-colors.sh b/t/t8012-blame-colors.sh
new file mode 100755
index 0000000000..98a22a3c8d
--- /dev/null
+++ b/t/t8012-blame-colors.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+test_description='colored git blame'
+. ./test-lib.sh
+
+PROG='git blame -c'
+. "$TEST_DIRECTORY"/annotate-tests.sh
+
+test_expect_success 'colored blame colors contiguous lines' '
+	git -c color.blame.repeatedLines=yellow blame --color-lines --abbrev=12 hello.c >actual.raw &&
+	test_decode_color <actual.raw >actual &&
+	grep "<YELLOW>" <actual >darkened &&
+	grep "(F" darkened > F.expect &&
+	grep "(H" darkened > H.expect &&
+	test_line_count = 2 F.expect &&
+	test_line_count = 3 H.expect
+'
+
+test_done
-- 
2.17.0.441.gb46fe60e1d-goog


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/3] builtin/blame: highlight recently changed lines
  2018-04-24  0:08 [PATCH 0/3] Colorful blame output Stefan Beller
  2018-04-24  0:08 ` [PATCH 1/3] builtin/blame: dim uninteresting metadata lines Stefan Beller
@ 2018-04-24  0:08 ` Stefan Beller
  2018-04-24  0:09 ` [PATCH 3/3] builtin/blame: add new coloring scheme config Stefan Beller
  2018-04-24  2:09 ` [PATCH 0/3] Colorful blame output Junio C Hamano
  3 siblings, 0 replies; 6+ messages in thread
From: Stefan Beller @ 2018-04-24  0:08 UTC (permalink / raw)
  To: git; +Cc: gitster, sunshine, Stefan Beller

Choose a different color for dates and imitate a 'temperature cool down'
depending upon age.

Originally I had planned to have the temperature cool down dependent on
the age of the project or file for example, as that might scale better,
but that can be added on top of this commit, e.g. instead of giving a
date, you could imagine giving a percentage that would be the linearly
interpolated between now and the beginning of the file.

Similarly to the previous patch, this offers the command line option
'--color-by-age' to enable this mode and the config option
'color.blame.highlightrecent' to select colors. A later patch will offer
a config option to select the default mode.


Signed-off-by: Stefan Beller <sbeller@google.com>
---
 Documentation/config.txt | 17 +++++++++
 builtin/blame.c          | 80 ++++++++++++++++++++++++++++++++++++++--
 t/t8012-blame-colors.sh  | 25 +++++++++++++
 3 files changed, 118 insertions(+), 4 deletions(-)

diff --git a/Documentation/config.txt b/Documentation/config.txt
index 9445a3a548..1496fa4917 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -1223,6 +1223,23 @@ color.blame.repeatedLines::
 	is repeated meta information per line (such as commit id,
 	author name, date and timezone). Defaults to cyan.
 
+color.blame.highlightRecent::
+	This can be used to color the metadata of a blame line depending
+	on age of the line.
++
+This setting should be set to a comma-separated list of color and date settings,
+starting and ending with a color, the dates should be set from oldest to newest.
+The metadata will be colored given the colors if the the line was introduced
+before the given timestamp, overwriting older timestamped colors.
++
+Instead of an absolute timestamp relative timestamps work as well, e.g.
+2.weeks.ago is valid to address anything older than 2 weeks.
++
+It defaults to 'blue,12 month ago,white,1 month ago,red', which colors
+everything older than one year blue, recent changes between one month and
+one year old are kept white, and lines introduced within the last month are
+colored red.
+
 color.ui::
 	This variable determines the default value for variables such
 	as `color.diff` and `color.grep` that control the use of color
diff --git a/builtin/blame.c b/builtin/blame.c
index 4d5fc64880..d1d469c0b5 100644
--- a/builtin/blame.c
+++ b/builtin/blame.c
@@ -24,6 +24,7 @@
 #include "dir.h"
 #include "progress.h"
 #include "blame.h"
+#include "string-list.h"
 
 static char blame_usage[] = N_("git blame [<options>] [<rev-opts>] [<rev>] [--] <file>");
 
@@ -323,6 +324,7 @@ static const char *format_time(timestamp_t time, const char *tz_str,
 #define OUTPUT_SHOW_EMAIL	0400
 #define OUTPUT_LINE_PORCELAIN	01000
 #define OUTPUT_COLOR_LINE	02000
+#define OUTPUT_SHOW_AGE_WITH_COLOR	04000
 
 static void emit_porcelain_details(struct blame_origin *suspect, int repeat)
 {
@@ -370,6 +372,63 @@ static void emit_porcelain(struct blame_scoreboard *sb, struct blame_entry *ent,
 		putchar('\n');
 }
 
+static struct color_field {
+	timestamp_t hop;
+	char col[COLOR_MAXLEN];
+} *colorfield;
+static int colorfield_nr, colorfield_alloc;
+
+static void parse_color_fields(const char *s)
+{
+	struct string_list l = STRING_LIST_INIT_DUP;
+	struct string_list_item *item;
+	enum { EXPECT_DATE, EXPECT_COLOR } next = EXPECT_COLOR;
+
+	colorfield_nr = 0;
+
+	/* Ideally this would be stripped and split at the same time? */
+	string_list_split(&l, s, ',', -1);
+	ALLOC_GROW(colorfield, colorfield_nr + 1, colorfield_alloc);
+
+	for_each_string_list_item(item, &l) {
+		switch (next) {
+		case EXPECT_DATE:
+			colorfield[colorfield_nr].hop = approxidate(item->string);
+			next = EXPECT_COLOR;
+			colorfield_nr++;
+			ALLOC_GROW(colorfield, colorfield_nr + 1, colorfield_alloc);
+			break;
+		case EXPECT_COLOR:
+			if (color_parse(item->string, colorfield[colorfield_nr].col))
+				die(_("expecting a color: %s"), item->string);
+			next = EXPECT_DATE;
+			break;
+		}
+	}
+
+	if (next == EXPECT_COLOR)
+		die (_("must end with a color"));
+
+	colorfield[colorfield_nr].hop = TIME_MAX;
+}
+
+static void setup_default_color_by_age(void)
+{
+	parse_color_fields("blue,12 month ago,white,1 month ago,red");
+}
+
+static void determine_line_heat(struct blame_entry *ent, const char **dest_color)
+{
+	int i = 0;
+	struct commit_info ci;
+	get_commit_info(ent->suspect->commit, &ci, 1);
+
+	while (i < colorfield_nr && ci.author_time > colorfield[i].hop)
+		i++;
+
+	*dest_color = colorfield[i].col;
+}
+
 static void emit_other(struct blame_scoreboard *sb, struct blame_entry *ent, int opt)
 {
 	int cnt;
@@ -378,12 +437,19 @@ static void emit_other(struct blame_scoreboard *sb, struct blame_entry *ent, int
 	struct commit_info ci;
 	char hex[GIT_MAX_HEXSZ + 1];
 	int show_raw_time = !!(opt & OUTPUT_RAW_TIMESTAMP);
-	const char *color = NULL, *reset = NULL;
+	const char *default_color = NULL, *color = NULL, *reset = NULL;
 
 	get_commit_info(suspect->commit, &ci, 1);
 	oid_to_hex_r(hex, &suspect->commit->object.oid);
 
 	cp = blame_nth_line(sb, ent->lno);
+
+	if (opt & OUTPUT_SHOW_AGE_WITH_COLOR) {
+		determine_line_heat(ent, &default_color);
+		color = default_color;
+		reset = GIT_COLOR_RESET;
+	}
+
 	for (cnt = 0; cnt < ent->num_lines; cnt++) {
 		char ch;
 		int length = (opt & OUTPUT_LONG_OBJECT_NAME) ? GIT_SHA1_HEXSZ : abbrev;
@@ -393,8 +459,8 @@ static void emit_other(struct blame_scoreboard *sb, struct blame_entry *ent, int
 				color = repeated_meta_color;
 				reset = GIT_COLOR_RESET;
 			} else  {
-				color = NULL;
-				reset = NULL;
+				color = default_color ? default_color : NULL;
+				reset = default_color ? GIT_COLOR_RESET : NULL;
 			}
 		}
 		if (color)
@@ -631,6 +697,10 @@ static int git_blame_config(const char *var, const char *value, void *cb)
 				value);
 		return 0;
 	}
+	if (!strcmp(var, "color.blame.highlightrecent")) {
+		parse_color_fields(value);
+		return 0;
+	}
 
 	if (git_diff_heuristic_config(var, value, cb) < 0)
 		return -1;
@@ -715,6 +785,7 @@ int cmd_blame(int argc, const char **argv, const char *prefix)
 		OPT_BIT('e', "show-email", &output_option, N_("Show author email instead of name (Default: off)"), OUTPUT_SHOW_EMAIL),
 		OPT_BIT('w', NULL, &xdl_opts, N_("Ignore whitespace differences"), XDF_IGNORE_WHITESPACE),
 		OPT_BIT(0, "color-lines", &output_option, N_("color redundant metadata from previous line differently"), OUTPUT_COLOR_LINE),
+		OPT_BIT(0, "color-by-age", &output_option, N_("color lines by age"), OUTPUT_SHOW_AGE_WITH_COLOR),
 
 		/*
 		 * The following two options are parsed by parse_revision_opt()
@@ -739,6 +810,7 @@ int cmd_blame(int argc, const char **argv, const char *prefix)
 	unsigned int range_i;
 	long anchor;
 
+	setup_default_color_by_age();
 	git_config(git_blame_config, &output_option);
 	init_revisions(&revs, NULL);
 	revs.date_mode = blame_date_mode;
@@ -981,7 +1053,7 @@ int cmd_blame(int argc, const char **argv, const char *prefix)
 			strcpy(repeated_meta_color, GIT_COLOR_CYAN);
 	}
 	if (output_option & OUTPUT_ANNOTATE_COMPAT)
-		output_option &= ~OUTPUT_COLOR_LINE;
+		output_option &= ~(OUTPUT_COLOR_LINE | OUTPUT_SHOW_AGE_WITH_COLOR);
 
 	output(&sb, output_option);
 	free((void *)sb.final_buf);
diff --git a/t/t8012-blame-colors.sh b/t/t8012-blame-colors.sh
index 98a22a3c8d..ae9aa79d4e 100755
--- a/t/t8012-blame-colors.sh
+++ b/t/t8012-blame-colors.sh
@@ -16,4 +16,29 @@ test_expect_success 'colored blame colors contiguous lines' '
 	test_line_count = 3 H.expect
 '
 
+test_expect_success 'color by age consistently colors old code' '
+	git blame --color-by-age hello.c >actual.raw &&
+	test_decode_color <actual.raw >actual &&
+	grep "<BLUE>" <actual >colored &&
+	test_line_count = 10 colored
+'
+
+test_expect_success 'blame color by age: new code is different' '
+	cat >>hello.c <<-EOF &&
+		void qfunc();
+	EOF
+	git add hello.c &&
+	GIT_AUTHOR_DATE="" git commit -m "new commit" &&
+
+	git -c color.blame.highlightRecent="yellow,1 month ago, cyan" blame --color-by-age hello.c >actual.raw &&
+	test_decode_color <actual.raw >actual &&
+
+	grep "<YELLOW>" <actual >colored &&
+	test_line_count = 10 colored &&
+
+	grep "<CYAN>" <actual >colored &&
+	test_line_count = 1 colored &&
+	grep qfunc colored
+'
+
 test_done
-- 
2.17.0.441.gb46fe60e1d-goog


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 3/3] builtin/blame: add new coloring scheme config
  2018-04-24  0:08 [PATCH 0/3] Colorful blame output Stefan Beller
  2018-04-24  0:08 ` [PATCH 1/3] builtin/blame: dim uninteresting metadata lines Stefan Beller
  2018-04-24  0:08 ` [PATCH 2/3] builtin/blame: highlight recently changed lines Stefan Beller
@ 2018-04-24  0:09 ` Stefan Beller
  2018-04-24  2:09 ` [PATCH 0/3] Colorful blame output Junio C Hamano
  3 siblings, 0 replies; 6+ messages in thread
From: Stefan Beller @ 2018-04-24  0:09 UTC (permalink / raw)
  To: git; +Cc: gitster, sunshine, Stefan Beller

Add a config option that allows selecting the default color scheme for
blame. The command line still takes precedence over the configuration.

It is to be seen, how color.ui will integrate with blame coloring.

Signed-off-by: Stefan Beller <sbeller@google.com>
---
 Documentation/config.txt |  5 +++++
 builtin/blame.c          | 18 ++++++++++++++++++
 t/t8012-blame-colors.sh  |  4 ++++
 3 files changed, 27 insertions(+)

diff --git a/Documentation/config.txt b/Documentation/config.txt
index 1496fa4917..c03e20cf23 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -1240,6 +1240,11 @@ everything older than one year blue, recent changes between one month and
 one year old are kept white, and lines introduced within the last month are
 colored red.
 
+blame.coloring::
+	This determines the coloring scheme to be applied to blame
+	output. It can be 'repeatedLines', 'highlightRecent',
+	or 'none' which is the default.
+
 color.ui::
 	This variable determines the default value for variables such
 	as `color.diff` and `color.grep` that control the use of color
diff --git a/builtin/blame.c b/builtin/blame.c
index d1d469c0b5..fede1cf1e3 100644
--- a/builtin/blame.c
+++ b/builtin/blame.c
@@ -49,6 +49,7 @@ static int abbrev = -1;
 static int no_whole_file_rename;
 static int show_progress;
 static char repeated_meta_color[COLOR_MAXLEN];
+static int coloring_mode;
 
 static struct date_mode blame_date_mode = { DATE_ISO8601 };
 static size_t blame_date_width;
@@ -702,6 +703,20 @@ static int git_blame_config(const char *var, const char *value, void *cb)
 		return 0;
 	}
 
+	if (!strcmp(var, "blame.coloring")) {
+		if (!strcmp(value, "repeatedLines")) {
+			coloring_mode |= OUTPUT_COLOR_LINE;
+		} else if (!strcmp(value, "highlightRecent")) {
+			coloring_mode |= OUTPUT_SHOW_AGE_WITH_COLOR;
+		} else if (!strcmp(value, "none")) {
+			coloring_mode &= ~(OUTPUT_COLOR_LINE |
+					    OUTPUT_SHOW_AGE_WITH_COLOR);
+		} else {
+			warning(_("invalid value for blame.coloring"));
+			return 0;
+		}
+	}
+
 	if (git_diff_heuristic_config(var, value, cb) < 0)
 		return -1;
 	if (userdiff_config(var, value) < 0)
@@ -1046,6 +1061,9 @@ int cmd_blame(int argc, const char **argv, const char *prefix)
 
 	blame_coalesce(&sb);
 
+	if (!(output_option & (OUTPUT_COLOR_LINE | OUTPUT_SHOW_AGE_WITH_COLOR)))
+		output_option |= coloring_mode;
+
 	if (!(output_option & OUTPUT_PORCELAIN)) {
 		find_alignment(&sb, &output_option);
 		if (!*repeated_meta_color &&
diff --git a/t/t8012-blame-colors.sh b/t/t8012-blame-colors.sh
index ae9aa79d4e..ed38f74de9 100755
--- a/t/t8012-blame-colors.sh
+++ b/t/t8012-blame-colors.sh
@@ -8,6 +8,8 @@ PROG='git blame -c'
 
 test_expect_success 'colored blame colors contiguous lines' '
 	git -c color.blame.repeatedLines=yellow blame --color-lines --abbrev=12 hello.c >actual.raw &&
+	git -c color.blame.repeatedLines=yellow -c blame.coloring=repeatedLines blame --abbrev=12 hello.c >actual.raw.2 &&
+	test_cmp actual.raw actual.raw.2 &&
 	test_decode_color <actual.raw >actual &&
 	grep "<YELLOW>" <actual >darkened &&
 	grep "(F" darkened > F.expect &&
@@ -18,6 +20,8 @@ test_expect_success 'colored blame colors contiguous lines' '
 
 test_expect_success 'color by age consistently colors old code' '
 	git blame --color-by-age hello.c >actual.raw &&
+	git -c blame.coloring=highlightRecent blame hello.c >actual.raw.2 &&
+	test_cmp actual.raw actual.raw.2 &&
 	test_decode_color <actual.raw >actual &&
 	grep "<BLUE>" <actual >colored &&
 	test_line_count = 10 colored
-- 
2.17.0.441.gb46fe60e1d-goog


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/3] Colorful blame output
  2018-04-24  0:08 [PATCH 0/3] Colorful blame output Stefan Beller
                   ` (2 preceding siblings ...)
  2018-04-24  0:09 ` [PATCH 3/3] builtin/blame: add new coloring scheme config Stefan Beller
@ 2018-04-24  2:09 ` Junio C Hamano
  2018-04-24 18:05   ` Stefan Beller
  3 siblings, 1 reply; 6+ messages in thread
From: Junio C Hamano @ 2018-04-24  2:09 UTC (permalink / raw)
  To: Stefan Beller; +Cc: git, sunshine

Stefan Beller <sbeller@google.com> writes:

> This is a revamp of
> https://public-inbox.org/git/20180416220955.46163-1-sbeller@google.com/
>
> Junio had some issue with that version, as it would collide config and command
> line options. This is fixed now by introducing another option.

Heh, that sounds as if the series was rerolled unnecessarily, only
because I had unreasonable complaints.  I was hoping that issues the
series had were fixed, and my involvement was merely that I happened
to be the one who pointed out first.

In any case, will replace and take a look at it.  Thanks.

>
> Thanks,
> Stefan
>
> Stefan Beller (3):
>   builtin/blame: dim uninteresting metadata lines
>   builtin/blame: highlight recently changed lines
>   builtin/blame: add new coloring scheme config
>
>  Documentation/config.txt |  27 ++++++++
>  builtin/blame.c          | 129 +++++++++++++++++++++++++++++++++++++--
>  t/t8012-blame-colors.sh  |  48 +++++++++++++++
>  3 files changed, 200 insertions(+), 4 deletions(-)
>  create mode 100755 t/t8012-blame-colors.sh

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/3] Colorful blame output
  2018-04-24  2:09 ` [PATCH 0/3] Colorful blame output Junio C Hamano
@ 2018-04-24 18:05   ` Stefan Beller
  0 siblings, 0 replies; 6+ messages in thread
From: Stefan Beller @ 2018-04-24 18:05 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, Eric Sunshine

On Mon, Apr 23, 2018 at 7:09 PM, Junio C Hamano <gitster@pobox.com> wrote:
> Stefan Beller <sbeller@google.com> writes:
>
>> This is a revamp of
>> https://public-inbox.org/git/20180416220955.46163-1-sbeller@google.com/
>>
>> Junio had some issue with that version, as it would collide config and command
>> line options. This is fixed now by introducing another option.
>
> Heh, that sounds as if the series was rerolled unnecessarily, only
> because I had unreasonable complaints.

Sorry for that wording, the complaints were of educational nature, so
I rerolled it.

> I was hoping that issues the
> series had were fixed, and my involvement was merely that I happened
> to be the one who pointed out first.

There were multiple issues (many fixed already), but there was one
outstanding design bug, so I had to reroll.

>
> In any case, will replace and take a look at it.  Thanks.

Thanks for looking at it,
Stefan

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-04-24 18:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-24  0:08 [PATCH 0/3] Colorful blame output Stefan Beller
2018-04-24  0:08 ` [PATCH 1/3] builtin/blame: dim uninteresting metadata lines Stefan Beller
2018-04-24  0:08 ` [PATCH 2/3] builtin/blame: highlight recently changed lines Stefan Beller
2018-04-24  0:09 ` [PATCH 3/3] builtin/blame: add new coloring scheme config Stefan Beller
2018-04-24  2:09 ` [PATCH 0/3] Colorful blame output Junio C Hamano
2018-04-24 18:05   ` Stefan Beller

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).