All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH/RFC] git log --oneline alternative with dates, times and initials
@ 2016-09-29  5:34 Kyle J. McKay
  2016-09-29  8:33 ` Jeff King
  0 siblings, 1 reply; 20+ messages in thread
From: Kyle J. McKay @ 2016-09-29  5:34 UTC (permalink / raw)
  To: Git mailing list; +Cc: Junio C Hamano

Simple example output from the Git repository:

git log-times --graph --date-order --decorate --no-merges -n 5 v2.5.3

    === 2015-09-17 ===
  * ee6ad5f4 12:16 jch (tag: v2.5.3) Git 2.5.3
    === 2015-09-09 ===
  * b9d66899 14:22 js  am --skip/--abort: merge HEAD/ORIG_HEAD tree into index
  |   === 2015-09-04 ===
  | * 27ea6f85 10:46 jch (tag: v2.5.2) Git 2.5.2
  * 74b67638 10:36 jch (tag: v2.4.9) Git 2.4.9
                       ..........
  * ecad27cf 10:32 jch (tag: v2.3.9) Git 2.3.9

I have been wanting a compact one line output format that included dates,
times and initials for some time that is compatible with --graph, clearly
shows root commits and eliminates confusion over whether or not two adjacent
lines in the output are related as parent/child (the --show-linear-break
option does not work with --graph).

The git-log-times utility is the result.  Except for --notes, --pretty and
--format options (which would make the output a non-oneline format) any
other `git log` option may be used (including things like --cherry-mark,
--patch, --raw, --stat, --summary, --show-linear-break etc.),

There are a few new options specific to git-log-times which are described
in the README and the `git-log-times -h` output that can be used to alter
the dates, times and/or initials displayed.

The patch below adds a contrib/git-log-times directory containing the
executable (git-log-times) and the README.

--Kyle

P.S. git am complains about 26 lines with whitespace errors.  They are
     not whitespace errors.  The README is in markdown format and they
     are explicit line break instructions to markdown (2 trailing blanks).
     Removing them would corrupt the markdown output.

P.P.S A picture is worth a thousand words, so the formatted help text,
      and several images of actual git-log-times output are available at
      https://gist.github.com/mackyle/4c33e4802a8269b3f200f2c00352ce6a

-- 8< --
Subject: [PATCH] contrib/git-log-times: alternative git log --oneline utility

The git-log-times utility provides an alternative interface to using
git log --oneline that includes dates, times and author initials.

Additionally root commits are marked for easy identification and
when using --graph mode breaks are inserted when necessary to prevent
two adjacent output lines from being misconstrued as having a parent
child relationship when they actually do not.

Other than --notes, --pretty and --format options which are not
allowed (because that would no longer be a one line format) all git
log options are available for use.

Output will be colorized using the same rules used for git log
output.

The three extra items in the output (dates, times and initials) use
'color.log-times.date', 'color.log-times.time' and
'color.log-times.initials' to change their default color.

Other options specific to git-log-times may be shown by using the
-h option (i.e. `git-log-times -h`).

One or more default options which behave as though they are the
first option argument(s) on the command line may be set by assigning
them to the 'log-times.defaults' config value as space-separated
options each including its leading '-' or '--'.

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
---
 contrib/git-log-times/README        | 256 ++++++++++++++++++++
 contrib/git-log-times/git-log-times | 464 ++++++++++++++++++++++++++++++++++++
 2 files changed, 720 insertions(+)
 create mode 100644 contrib/git-log-times/README
 create mode 100755 contrib/git-log-times/git-log-times

diff --git a/contrib/git-log-times/README b/contrib/git-log-times/README
new file mode 100644
index 00000000..65f1d2c5
--- /dev/null
+++ b/contrib/git-log-times/README
@@ -0,0 +1,256 @@
+git-log-times
+=============
+
+An alterative to `git log --oneline` that includes dates, times and
+author initials in a compact one line output format.
+
+The `--notes`, `--pretty` and `--format` options are not allowed but any
+other `git log` options should work fine including `--graph`.
+
+In both `--graph` and non `--graph` modes:
+
+   * Root commits are identified by `_` on either side of the hash
+
+When `--graph` mode is enabled, the graph output is enhanced as follows:
+
+   * Breaks are inserted when necessary to avoid parent/child ambiguity
+
+
+Installation
+------------
+
+Put the `git-log-times` executable file in one of the directories
+included in the `PATH` environment variable.
+
+Optionally set a global alias to save typing such as `lo` like so:
+
+    git config --global alias.lo log-times
+
+Optionally set global default options such as `--two-initials` and
+`--abbrev=8` like so:
+
+    git config --global log-times.defaults "--two-initials --abbrev=8"
+
+
+Dates & Times
+-------------
+
+Dates and times are shown in the local timezone.  Set the TZ variable
+before running `git log-times` (e.g. `TZ=UTC git log-times` to show
+dates and times in UTC) or use the `--time-zone=` option (e.g.
+`git log-times --time-zone=UTC`) to change that.
+
+Dates are shown on a date line all by themselves like so:
+
+    === 2015-11-13 ===
+
+The date line indicates that the times on all the following lines
+(regardless of whether or not `--reverse` is being used) up until
+the next date line take place on the indicated date.  For example
+this output:
+
+    === 2015-09-28 ===
+    be08dee9 13:18 jc (tag: v2.6.0) Git 2.6
+    === 2015-09-21 ===
+    8d530c4d 13:26 jc (tag: v2.6.0-rc3) Git 2.6-rc3
+    904f6e7c 10:51 bn send-email: fix uninitialized var warning for $
+    === 2015-09-20 ===
+    18a21c19 09:49 ps l10n: de.po: better language for one string
+    2e0f3663 09:49 rt l10n: de.po: translate 2 messages
+    5fc31c1f 09:44 tq l10n: Update and review Vietnamese translation
+
+shows one commit on 2015-09-28, two commits on 2015-09-21 and three
+commits on 2015-09-20.
+
+Note that a date line may appear more than once for the same date
+(this is especially common when using `--graph` with its defualt
+`--topo-order`).
+
+The purpose of a date line is to indicate what date has been elided
+from the following lines, nothing more.
+
+
+Examples
+--------
+
+For example, running `git log-times --decorate --graph -n 17 v2.6.1`
+on the Git repository produces this output (which will be colorized
+on the terminal if color is enabled):
+
+      === 2015-09-28 ===
+    * 22f698cb 19:19 jch (tag: v2.6.1) Git 2.6.1
+    *   3adc4ec7 19:16 jch Sync with v2.5.4
+    |\
+    | * 24358560 15:34 jch (tag: v2.5.4) Git 2.5.4
+    | *   11a458be 15:33 jch Sync with 2.4.10
+    | |\
+    | | * a2558fb8 15:30 jch (tag: v2.4.10) Git 2.4.10
+    | | *   6343e2f6 15:28 jch Sync with 2.3.10
+    | | |\
+    | | | * 18b58f70 15:26 jch (tag: v2.3.10) Git 2.3.10
+    | | | *   92cdfd21 14:59 jch Merge branch 'jk/xdiff-memory-limits
+    | | | |\
+    | | | | * 83c4d380 14:58 jk  merge-file: enforce MAX_XDIFF_SIZE o
+    | | | | * dcd1742e 14:57 jk  xdiff: reject files larger than ~1GB
+    | | | | * 3efb9880 14:57 jk  react to errors in xdi_diff
+    | | | * |   f2df3104 14:46 jch Merge branch 'jk/transfer-limit-re
+    | | | |\ \
+    | | | | | | === 2015-09-25 ===
+    | | | | * | b2581164 15:32 bb  http: limit redirection depth
+    | | | | * | f4113cac 15:30 bb  http: limit redirection to protoco
+    | | | | * | 5088d3b3 15:28 jk  transport: refactor protocol white
+    | | | | | |   === 2015-09-28 ===
+    | | | * | |   df37727a 14:33 jch Merge branch 'jk/transfer-limit-
+    | | | |\ \ \
+    | | | | |/ /
+    | | | | | /
+    | | | | |/
+    | | | |/|
+    | | | | | === 2015-09-23 ===
+    | | | | * 33cfccbb 11:35 jk  submodule: allow only certain protoc
+
+The output will be colorized according to the same settings used to enable/
+disable color for git log output.
+
+Additionally, the color of the three new items (dates, times and
+initials) can be controlled with the `color.log-times.date`,
+`color.log-times.time` and `color.log-times.initials` config options.
+
+Running `git log-times --graph --max-parents=0` on the Git repository gives:
+
+      === 2009-04-24 ===
+    *_0ca71b37_11:13 ap  basic options parsing and whatnot.
+      === 2007-01-30 ===
+    *_16d6b8ab_15:16 sh  Initial import of a python script to import ch
+      === 2006-11-06 ===
+    *_cb07fc2a_11:20 sop git-gui: Initial revision.
+      === 2005-08-07 ===
+    *_161332a5_10:49 ks  first working version
+      === 2005-04-11 ===
+    *_2744b234_23:46 lt  Start of early patch applicator tools for git.
+      === 2005-05-08 ===
+    *_1db95b00_21:08 pm  Add initial version of gitk to the CVS reposit
+      === 2005-04-07 ===
+    *_e83c5163_15:13 lt  Initial revision of "git", the information man
+
+Notice the `_` on either side of the hash identifying those commits
+as root commits.  The `_` will only appear on the left side of the
+hash if the selected output format would have normally included a
+space there.  In `--graph` mode, all the spaces between the commit mark
+(e.g. `*`) and the hash are turned into `_`.
+
+Running `git log-times --decorate --graph --no-merges -n 13 v2.6.1`
+on the Git repository results in this output:
+
+      === 2015-09-28 ===
+    * 22f698cb 19:19 jch (tag: v2.6.1) Git 2.6.1
+                         ..........
+    * 24358560 15:34 jch (tag: v2.5.4) Git 2.5.4
+                         ..........
+    * a2558fb8 15:30 jch (tag: v2.4.10) Git 2.4.10
+                         ..........
+    * 18b58f70 15:26 jch (tag: v2.3.10) Git 2.3.10
+                         ..........
+    * 83c4d380 14:58 jk  merge-file: enforce MAX_XDIFF_SIZE on incomi
+    * dcd1742e 14:57 jk  xdiff: reject files larger than ~1GB
+    * 3efb9880 14:57 jk  react to errors in xdi_diff
+    |   === 2015-09-25 ===
+    | * b2581164 15:32 bb  http: limit redirection depth
+    | * f4113cac 15:30 bb  http: limit redirection to protocol-whitel
+    | * 5088d3b3 15:28 jk  transport: refactor protocol whitelist cod
+    | | === 2015-09-23 ===
+    | * 33cfccbb 11:35 jk  submodule: allow only certain protocols fo
+    | * a5adaced 11:35 jk  transport: add a protocol-whitelist enviro
+    |/
+    |   === 2015-09-28 ===
+    | * be08dee9 13:18 jch (tag: v2.6.0) Git 2.6
+
+Notice how four linear breaks (`..........`) were automatically
+inserted to avoid parent child relationship confusion.
+
+In non `--graph` mode, linear breaks are NOT automatically inserted.
+They must be requested with the usual `--show-linear-break` option.
+
+
+Options
+-------
+
+In addition to allowing all the normal `git log` options except for
+`--notes`, `--format` and `--pretty` (`--oneline` is allowed and
+silently ignored), the following additional options may be utilized:
+
+   * `--seconds`  
+     include seconds in the time (i.e. HH:MM:SS instead of just HH:MM)
+
+   * `--minutes`  
+     include minutes but not seconds in the time (i.e. HH:MM not HH:MM:SS)  
+     This is the default
+
+   * `--no-times`  
+     omit the time field entirely
+
+   * `--two-initials`  
+     only show at most two initials instead of the usual three  
+     This is the default if `--initials=author,committer` or
+     `--initials=committer,author` is used.
+
+   * `--three-initials`  
+     show at most three initials  
+     This is the default unless `--initials=author,committer` or
+     `--initials=committer,author` is used.
+
+   * `--no-initials`  
+     omit the initials field entirely
+
+   * `--commit-message`  
+     when using `--walk-reflogs` show commit message not reflog message
+
+   * `--author-date`  
+     force use of author dates and times  
+     The default is to use committer dates and times unless
+     `--author-date-order` is in effect.  This option forces author
+     dates and times to always be used and overrides `--committer-date`.
+
+   * `--committer-date`  
+     force use of committer dates and times  
+     The default is to use committer dates and times if `--date-order` or
+     `--topo-order` is in effect or `--author-date-order` is NOT in effect.
+     This option forces committer dates and times to always be used and
+     overrides a previous `--author-date` option.
+
+   * `--initials=author`  
+     show author initials  
+     This is the default behavior
+
+   * `--initials=committer`  
+     show committer initials instead of author initials
+
+   * `--initials=author,committer`  
+     show author and commiter initials separated by a `/`  
+     This changes the initials width default from three to two.
+
+   * `--initials=committer,author`  
+     show commiter and author initials separated by a `/`  
+     This changes the initials width default from three to two.
+
+   * `--time-zone=zone`  
+     set the TZ environment variable to `zone`  
+     This is an alterative to setting TZ before running `git log-times`
+     and will affect the time zone dates and times are displayed in.
+
+   * `--weekday`  
+     show the weekday with the date
+
+   * `--no-weekday`  
+     do not show the weekday with the date  
+     This is the default behavior
+
+In addition to the above options, color output is controlled as normal
+for `git log` with the addition of `color.log-times.date`,
+`color.log-times.time` and `color.log-times.initials` config options to alter
+the default colors for dates, times and initials respectively.
+
+Furthermore, default options may be set in the `log-times.defaults`
+config value and they will be treated as though they appeared at
+the very beginning of the `git log-times` command line option list
+(e.g. `git config log-times.defaults "--abbrev=8 --seconds"`).
diff --git a/contrib/git-log-times/git-log-times b/contrib/git-log-times/git-log-times
new file mode 100755
index 00000000..d0e5face
--- /dev/null
+++ b/contrib/git-log-times/git-log-times
@@ -0,0 +1,464 @@
+#!/usr/bin/env perl
+
+# git-log-times.pl -- git log --oneline variation with dates, times and initials
+# Copyright (C) 2015,2016 Kyle J. McKay <mackyle@gmail.com>.  All rights reserved.
+
+# License GPL v2
+
+# Version 1.0
+
+use 5.008;
+use strict;
+use warnings;
+use File::Basename qw(basename);
+use POSIX qw(strftime _exit);
+use Encode;
+
+my $USAGE = <<'USAGE';
+usage: git%slog-times [<options>] [<revision-range>] [[--] <path>...]
+
+    -h                    Show this help
+    --seconds             Use HH:MM:SS instead of just the default HH:MM
+    --minutes             Use just HH:MM (default) for times not HH:MM:SS
+    --no-times            Omit the time field entirely
+    --two-initials        Use maximum of two initials instead of default three
+    --three-initials      Use maximum of three initials (default)
+    --no-initials         Omit the initials field entirely
+    --commit-message      Show the commit message when using --walk-reflogs
+    --author-date         Use author dates and times
+    --committer-date      Use committer dates and times (default)
+    --initials=author     Use author initials (default)
+    --initials=committer  Use committer initials
+    --intiials=author,committer
+                          Use author/committer initials and --two-initials
+    --intiials=committer,author
+                          Use committer/author initials and --two-initials
+    --time-zone=<zone>    Set TZ environment variable to <zone>
+    --weekday             Show the weekday with the date
+    --no-weekday          Do not show the weekday with the date (default)
+
+    other log options     See `git help log` for more information
+
+Default colors for dates, times and initials may be changed by setting
+`color.log-times.date`, `color.log-times.time` and/or
+`color.log-times.initials` config values.  Dates and times are shown in the
+local time zone if TZ is not set in the environment and the `--time-zone`
+option has not been used.  Default options may be set in the
+`log-times.defaults` config value and they will be treated as though they were
+listed first in the command line options list (e.g.
+`git config log-times.defaults "--abbrev=8 --seconds"`)
+USAGE
+
+my $timeformat = "%H:%M";
+
+$SIG{PIPE} = sub {_exit 1};
+
+sub dodie {
+	my $msg = join(" ", @_);
+	chomp $msg;
+	die basename($0).": fatal: ".$msg."\n";
+}
+
+my ($setusedecorate, $usedecorate);
+sub use_decorate {
+	return $usedecorate if $setusedecorate;
+	my $do = qx(git config --get log.decorate 2>/dev/null) || "0";
+	chomp $do;
+	return 0 if $do eq "0" || $do eq "false" || $do eq "off";
+	return 0 if $do eq "auto" && ! -t STDOUT;
+	return 1;
+}
+
+my $iw;
+sub get_initials {
+	my $initials = shift;
+	my $wasutf8 = utf8::decode($initials);
+	$initials = lc($initials)." ";
+	$initials =~ s/[.]/ /g;
+	$initials =~ s/ iii? / /g;
+	$initials =~ s/ iv / /g;
+	$initials =~ s/ [js]r / /g;
+	$initials =~ s/[,;:'\042+_-]//g;
+	$initials =~ s/\([^(]*?\)/ /g;
+	$initials =~ s/\[[^[]*?\]/ /g;
+	$initials =~ s/\s+/ /g;
+	$initials =~ s/^ //g;
+	return "jc" if $iw == 2 && $initials eq "junio c hamano ";
+	$initials =~ s/([^ ])[^ ]* /$1/g;
+	if ($iw == 2) {
+		$initials =~ s/^(.).+(.)$/$1$2/;
+	} else {
+		$initials =~ s/^(..).+(.)$/$1$2/;
+	}
+	utf8::encode($initials) if $wasutf8;
+	return $initials;
+}
+
+sub get_nocolor_indent {
+	my $indent = shift;
+	$indent =~ s/\033[^m]*m//g;
+	$indent =~ s/\s+$//;
+	$indent =~ s/-+\.$//;
+	return $indent;
+}
+
+sub get_blank_graph_indent {
+	my $indent = shift;
+	chomp $indent;
+	$indent =~ s/\033[^m]*m//g;
+	$indent =~ s/^[\s|]+//;
+	return $indent;
+}
+
+sub get_first_indent {
+	my $indent = shift;
+	$indent =~ s/\033[^m]*m//g;
+	$indent =~ s/./ /gs;
+	return $indent;
+}
+
+my $nobar;
+my $barcolor;
+my $resetcolor = "";
+
+sub get_bar_color {
+	my ($prefix, $index) = @_;
+	my $c = (split(m{[-=^<>*+o /|\\_]}, $prefix))[$index];
+	$c =~ s/\Q$resetcolor\E//g if $resetcolor;
+	return $c;
+}
+
+sub get_indent {
+	my $indent = shift;
+	if ($nobar) {
+		$indent =~ tr/\-=^<>*+o./         /;
+	} else {
+		$indent =~ s/[-=^<>*+o]/$barcolor ? $barcolor."|".$resetcolor : "|"/e;
+		$indent =~ tr/\-./  /;
+	}
+	return $indent;
+}
+
+sub get_prefix {
+	my $indent = shift;
+	$indent =~ tr'\/'||';
+	return $indent;
+}
+
+sub get_defaults {
+	# defaults are cumulative, but an empty setting resets
+	my @defaults = ();
+	my $opts = qx(git config --get-all log-times.defaults 2>/dev/null);
+	chomp($opts);
+	foreach (split(/\r\n|\r|\n/, $opts, -1)) {
+		s/^\s+//; s/\s+$//;
+		if ($_ eq "") {
+			@defaults = ();
+			next;
+		}
+		push(@defaults, $_);
+	}
+	return split(" ", join(" ", @defaults));
+}
+
+system("git rev-parse --git-dir >/dev/null") == 0 or exit(1);
+my ($usemark, $usegraph, $usereflog, $useboundary, $useleftright, $usecherry, $setusecolor, $usecolor, $usecad);
+my @args = ();
+my $lastwasgrep;
+my $dateopt = "%ct";
+my $usewkday;
+my $reflogsubj = "%gs";
+my $sawdashdash;
+$iw = undef;
+my $iw2 = "";
+my ($committer, $author, $ivar, $ivar2);
+$ivar = \$author;
+foreach my $arg (get_defaults(), @ARGV) {
+	my $nextisgrep;
+	if ($sawdashdash || $lastwasgrep) {
+		push(@args, $arg);
+		$lastwasgrep = $nextisgrep;
+		next;
+	}
+	if ($arg eq "-h") {
+		my $dash = "-";
+		my $exec_path = qx(git --exec-path 2>/dev/null);
+		chomp $exec_path;
+		$dash = " " if $ENV{PATH} =~ /^\Q$exec_path\E:/;
+		printf "$USAGE\n", $dash;
+		exit 0;
+	} elsif ($arg eq "--oneline") {
+		# silently ignore --oneline as we are always in a one line format
+		next;
+	} elsif ($arg eq "--seconds") {
+		# extra option
+		$timeformat = "%H:%M:%S";
+		next;
+	} elsif ($arg eq "--minutes") {
+		# extra option
+		$timeformat = "%H:%M";
+		next;
+	} elsif ($arg eq "--no-times") {
+		# extra option
+		$timeformat = "";
+		next;
+	} elsif ($arg eq "--two-initials") {
+		# extra option
+		$iw = 2;
+		next;
+	} elsif ($arg eq "--three-initials") {
+		# extra option
+		$iw = 3;
+		next;
+	} elsif ($arg eq "--no-initials") {
+		# extra option
+		$iw = 0;
+		next;
+	} elsif ($arg eq "--two-initials") {
+		# extra option
+		$iw = 3;
+		next;
+	} elsif ($arg eq "--commit-message") {
+		# extra option
+		$reflogsubj = "%s";
+		next;
+	} elsif ($arg eq "--author-date") {
+		# extra option
+		$dateopt = "%at";
+		$usecad = 1;
+		next;
+	} elsif ($arg eq "--committer-date") {
+		# extra option
+		$dateopt = "%ct";
+		$usecad = 1;
+		next;
+	} elsif ($arg eq "--weekday") {
+		# extra option
+		$usewkday = 1;
+		next;
+	} elsif ($arg eq "--no-weekday") {
+		# extra option
+		$usewkday = undef;
+		next;
+	} elsif ($arg =~ /^--initials=/) {
+		# extra option
+		$arg =~ s/^--initials=//;
+		if ($arg eq "author") {
+			$ivar = \$author;
+			$ivar2 = undef;
+		} elsif ($arg eq "committer") {
+			$ivar = \$committer;
+			$ivar2 = undef;
+		} elsif ($arg eq "committer,author" || $arg eq "committer/author") {
+			$ivar = \$committer;
+			$ivar2 = \$author;
+		} elsif ($arg eq "author,committer" || $arg eq "author/committer") {
+			$ivar = \$author;
+			$ivar2 = \$committer;
+		} else {
+			dodie "--initials= requires 'author', 'committer' or 'committer,author'";
+		}
+		next;
+	} elsif ($arg =~ /^--time-zone=/) {
+		# extra option
+		$arg =~ s/^--time-zone=//;
+		$ENV{TZ} = $arg;
+		next;
+	} elsif ($arg eq "--date-order" || $arg eq "--topo-order") {
+		$dateopt = "%ct" unless $usecad;
+	} elsif ($arg eq "--author-date-order") {
+		$dateopt = "%at";
+	} elsif ($arg =~ /^--(pretty|pretty=.*|format=.*|notes|show-notes|show-notes=.*|standard-notes)$/) {
+		dodie "formatting/notes option not allowed: $arg";
+	} elsif ($arg eq "--no-decorate" || $arg eq "--decorate=no") {
+		$setusedecorate = 1;
+		$usedecorate = undef;
+	} elsif ($arg eq "--decorate=auto") {
+		$setusedecorate = 1;
+		$usedecorate = -t STDOUT ? 1 : undef;
+	} elsif ($arg eq "--decorate" || $arg =~ /^--decorate=/) {
+		$setusedecorate = 1;
+		$usedecorate = 1;
+	} elsif ($arg eq "--color" || $arg eq "--color=always") {
+		$setusecolor = 1;
+		$usecolor = 1;
+	} elsif ($arg eq "--no-color" || $arg eq "--color=never") {
+		$setusecolor = 1;
+		$usecolor = undef;
+	} elsif ($arg eq "--color=auto") {
+		$setusecolor = 1;
+		$usecolor = -t STDOUT ? 1 : undef;
+	} elsif ($arg eq "-g" || $arg eq "--walk-reflogs") {
+		$usereflog = 1;
+	} elsif ($arg eq "--boundary") {
+		$useboundary = 1;
+		$usemark = 1;
+	} elsif ($arg eq "--cherry-mark" || $arg eq "--cherry") {
+		$usecherry = 1;
+		$usemark = 1;
+	} elsif ($arg eq "--left-right") {
+		$useleftright = 1;
+		$usemark = 1;
+	} elsif ($arg eq "--graph") {
+		$usegraph = 1;
+	} elsif ($arg =~ /^(--grep|--grep-reflog|-S|-G)$/) {
+		$nextisgrep = 1;
+	} elsif ($arg eq "--") {
+		$sawdashdash = 1;
+	}
+	push(@args, $arg);
+	$lastwasgrep = $nextisgrep;
+}
+$iw = defined($ivar2) ? 2 : 3 unless defined($iw);
+$iw = "" if !$iw;
+$iw2 = $iw if defined($ivar2);
+my ($mark, $fixmark) = ("");
+$mark = "%m " unless $usegraph || !$usemark;
+if ($mark && !$useleftright) {
+	$fixmark = " ";
+	$fixmark = "+" if $usecherry;
+}
+
+my $color = "never";
+my ($hashcolor, $datecolor, $timecolor, $initialscolor, $autocolor) = ("", "", "", "", "");
+$usecolor = 1 if !$setusecolor && system("git", "config", "--get-colorbool", "color.diff") == 0;
+if ($usecolor) {
+	$color = "always";
+	$autocolor = "%C(auto)";
+	$hashcolor= qx(git config --get-color color.diff.commit "yellow");
+	$datecolor= qx(git config --get-color color.log-times.date "bold blue");
+	$timecolor= qx(git config --get-color color.log-times.time "green") if $timeformat;
+	$initialscolor = qx(git config --get-color color.log-times.initials "red") if $iw;
+	$resetcolor = qx(git config --get-color "" "reset");
+}
+my $decopt = "";
+$decopt = "$autocolor%d" if use_decorate;
+my $pager = qx(git var GIT_PAGER);
+defined($pager) and chomp $pager;
+$ENV{LESS} = "-FRX" unless exists $ENV{LESS};
+$ENV{LV} = "-c" unless exists $ENV{LV};
+
+my ($lastdate, $lastprefix, $lastplainprefix) = ("");
+my $msgopt = "%s";
+$msgopt = "%gd: $reflogsubj" if $usereflog;
+my $lastwasroot = 1;
+open(LOG, '-|', "git", "log", "--color=$color",
+	"--format=tformat:$mark%x1fCOMMIT %H %h $dateopt%x1f%cn%x1f%an%x1f%P%x1f$decopt $msgopt%x1f",
+	@args) or exit(1);
+if (defined($pager) && $pager ne "cat") {
+	open OUT, "|$pager" or dodie "could not run pager \"$pager\": $!\n";
+} else {
+	open OUT, '>&STDOUT' or die "could not dupe STDOUT: $!";
+}
+select((select(OUT),$|=1)[0]);
+my $delblank;
+my @lastparents = ();
+my $lastwascommit;
+my ($prefix, $data, $parentlist, $subject);
+while (my $logline = <LOG>) {
+	($prefix, $data, $committer, $author, $parentlist, $subject) = split(/\x1f/, $logline, -1);
+	$subject =~ s/ // if $subject;
+	my ($flag, $fullhash, $hash, $timestamp) = split(" ", $data, 4) if defined($data);
+	if (!defined($flag) || $flag ne "COMMIT") {
+		chomp $prefix;
+		$delblank = 0, next if $delblank && !$usegraph && $prefix =~ /^\s*$/;
+		$delblank = 0, next if $delblank && $usegraph && !get_blank_graph_indent($prefix);
+		print OUT "$prefix\n";
+		$lastprefix = $prefix;
+		$lastplainprefix = undef;
+		@lastparents = ();
+		$lastwascommit = undef;
+		next;
+	}
+	my $isroot = !$parentlist;
+	my @parents = split(' ', $parentlist) if $usegraph;
+	my $initials = $iw ? get_initials($$ivar) : "";
+	my $initials2 = $iw2 ? get_initials($$ivar2) : "";
+	my ($newdate, $newday, $newtime) = split(" ", strftime("%Y-%m-%d %a $timeformat", localtime($timestamp)));
+	$newdate .= " " . $newday if $usewkday;
+	my $mightneedbreak = $lastwascommit && !$lastwasroot && $usegraph && !grep($_ eq $fullhash, @lastparents);
+	if ($lastdate ne $newdate || $mightneedbreak) {
+		my $indent = "";
+		if (!$lastdate || $mark) {
+			$indent = get_first_indent($prefix);
+			$lastprefix = $prefix;
+			$lastplainprefix = undef;
+		} elsif ($prefix ne "") {
+			my $newplainprefix = get_nocolor_indent($prefix);
+			defined($lastplainprefix) or $lastplainprefix = get_nocolor_indent($lastprefix);
+			$nobar = undef;
+			$barcolor = undef;
+			if ($newplainprefix =~ /^(.*?[-=^<>*+o])/) {{
+				my $marklen = length($1);
+				my $difflen = length($lastplainprefix) - length($1);
+				$nobar = 1;
+				if ($difflen >= 0) {
+					my $lastmark = substr($lastplainprefix, $marklen-1, 1);
+					$lastmark =~ /[-=^<>*+o]/ and $nobar = $lastwasroot || $mightneedbreak, last;
+					$lastmark eq "|" && $lastdate ne $newdate and
+						$nobar = 0,
+						$barcolor = get_bar_color($lastprefix, $marklen - 1),
+						last;
+				}
+				if ($lastdate eq $newdate) {
+					$lastprefix = $prefix;
+					$lastplainprefix = $newplainprefix;
+					goto NOBREAKNEEDED;
+				}
+				$difflen >= -1 or last;
+				substr($lastplainprefix, $marklen-2, 1) eq "\\" and
+					$nobar = 0,
+					$barcolor = get_bar_color($lastprefix, $marklen - 2),
+					last;
+				$difflen >= 1 &&
+				substr($lastplainprefix, $marklen, 1) eq "/" and
+					$nobar = 0,
+					$barcolor = get_bar_color($lastprefix, $marklen);
+			}}
+			$indent = get_indent($prefix);
+			$lastprefix = $prefix;
+			$prefix = get_prefix($prefix);
+			$lastplainprefix = $newplainprefix;
+		}
+		if ($lastdate ne $newdate) {
+			printf OUT "%s%s=== %s ===%s\n", $indent,
+				$datecolor, $newdate, $resetcolor;
+			$lastdate = $newdate;
+		} else {
+			printf OUT "%s%s %s%s%-${iw}s%s%-${iw2}s %s\n", $indent,
+				' ' x length($hash), ' ' x length($newtime),
+				($iw ? " " : ""), "", ($iw2 ? " " : ""), "",
+				"..........";
+		}
+	} else {
+		$lastprefix = $prefix;
+		$lastplainprefix = undef;
+	}
+NOBREAKNEEDED:
+	$lastwasroot = $isroot;
+	@lastparents = @parents;
+	$lastwascommit = 1;
+	my $rootflag = " ";
+	if ($isroot) {
+		$rootflag = "_";
+		$prefix = substr($prefix, 0, length($prefix) - 1) . "_"
+			if length($prefix);
+		if ($prefix =~ /^(.*?[-=^<>*+o])(.+)$/) {
+			my ($initial, $trail) = ($1, $2);
+			$trail =~ tr/ /_/;
+			$prefix = $initial . $trail;
+		}
+	}
+	if ($fixmark) {
+		$prefix = $fixmark . substr($prefix, 1)
+			if $prefix =~ /^[<>]/;
+	}
+	printf OUT "%s%s%s%s%s%-${iw}s%s%-${iw2}s%s%s\n", $prefix,
+		"$hashcolor$hash$resetcolor",
+		$rootflag, ($timeformat ? "$timecolor$newtime$resetcolor " : ""),
+		$initialscolor, $initials, ($iw2 ? "/" : ""), $initials2,
+		($iw ? "$resetcolor " : ""), $subject;
+	$delblank = 1;
+}
+close LOG;
+close OUT;
---

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

* Re: [PATCH/RFC] git log --oneline alternative with dates, times and initials
  2016-09-29  5:34 [PATCH/RFC] git log --oneline alternative with dates, times and initials Kyle J. McKay
@ 2016-09-29  8:33 ` Jeff King
  2016-09-29  8:33   ` [PATCH 1/5] pretty: allow formatting DATE_SHORT Jeff King
                     ` (5 more replies)
  0 siblings, 6 replies; 20+ messages in thread
From: Jeff King @ 2016-09-29  8:33 UTC (permalink / raw)
  To: Kyle J. McKay; +Cc: Git mailing list, Junio C Hamano

On Wed, Sep 28, 2016 at 10:34:51PM -0700, Kyle J. McKay wrote:

> git log-times --graph --date-order --decorate --no-merges -n 5 v2.5.3
> 
>     === 2015-09-17 ===
>   * ee6ad5f4 12:16 jch (tag: v2.5.3) Git 2.5.3
>     === 2015-09-09 ===
>   * b9d66899 14:22 js  am --skip/--abort: merge HEAD/ORIG_HEAD tree into index
>   |   === 2015-09-04 ===
>   | * 27ea6f85 10:46 jch (tag: v2.5.2) Git 2.5.2
>   * 74b67638 10:36 jch (tag: v2.4.9) Git 2.4.9
>                        ..........
>   * ecad27cf 10:32 jch (tag: v2.3.9) Git 2.3.9

I was surprised to see this as a separate script, but it is true that we
cannot quite pull it off with --format. I think we are very close,
though.  With the patches below I think you can do:

  git log \
    --commit-header='%C(auto,bold blue)== %as ==%C(auto,reset)'
    --format='%C(auto)%h %C(auto,green)%ad %C(auto,red)%aS/%cS%C(auto)%d%C(auto,reset) %s' \
    --graph --no-merges --author-date-order --date=format:%H:%M

and get the same (or very similar) output.

  [1/5]: pretty: allow formatting DATE_SHORT
  [2/5]: pretty: allow formatting names as initials
  [3/5]: graph: fix extra spaces in graph_padding_line
  [4/5]: graph: helper functions for printing commit header
  [5/5]: log: add --commit-header option

Each of those commits[1] needs some minor polish, and as I'm not really
that interested in fancy log output myself, I don't plan on working on
them further. I was mostly curious just how close we were. But if you'd
like to pursue it, feel free to use them as a starting point.

-Peff

[1] Actually, I think patch 3 is a legitimate bug fix on its own but I
    do not think there is any way to actually trigger it in practice
    without the rest of this series.

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

* [PATCH 1/5] pretty: allow formatting DATE_SHORT
  2016-09-29  8:33 ` Jeff King
@ 2016-09-29  8:33   ` Jeff King
  2016-09-30  6:17     ` Jacob Keller
  2016-09-29  8:36   ` [PATCH 2/5] pretty: allow formatting names as initials Jeff King
                     ` (4 subsequent siblings)
  5 siblings, 1 reply; 20+ messages in thread
From: Jeff King @ 2016-09-29  8:33 UTC (permalink / raw)
  To: Kyle J. McKay; +Cc: Git mailing list, Junio C Hamano

There's no way to do this short of "%ad" and --date=short,
but that limits you to having a single date format in the
output.

This would possibly be better done with something more like
"%ad(short)".

Signed-off-by: Jeff King <peff@peff.net>
---
 pretty.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/pretty.c b/pretty.c
index 493edb0..c532c17 100644
--- a/pretty.c
+++ b/pretty.c
@@ -727,6 +727,9 @@ static size_t format_person_part(struct strbuf *sb, char part,
 	case 'I':	/* date, ISO 8601 strict */
 		strbuf_addstr(sb, show_ident_date(&s, DATE_MODE(ISO8601_STRICT)));
 		return placeholder_len;
+	case 's':
+		strbuf_addstr(sb, show_ident_date(&s, DATE_MODE(SHORT)));
+		return placeholder_len;
 	}
 
 skip:
-- 
2.10.0.566.g5365f87


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

* [PATCH 2/5] pretty: allow formatting names as initials
  2016-09-29  8:33 ` Jeff King
  2016-09-29  8:33   ` [PATCH 1/5] pretty: allow formatting DATE_SHORT Jeff King
@ 2016-09-29  8:36   ` Jeff King
  2016-09-29 17:31     ` Junio C Hamano
  2016-09-29  8:37   ` [PATCH 3/5] graph: fix extra spaces in graph_padding_line Jeff King
                     ` (3 subsequent siblings)
  5 siblings, 1 reply; 20+ messages in thread
From: Jeff King @ 2016-09-29  8:36 UTC (permalink / raw)
  To: Kyle J. McKay; +Cc: Git mailing list, Junio C Hamano

Initials are shorter and often unique enough in a
per-project setting, so they can be used to give a more
informative version of --oneline.

The 'S' in the placeholder is for "short" (and 's' is
already taken by DATE_SHORT), but obviously that's pretty
arcane.

Possibly there should be more customization of initials,
asking for only 2-letter initials, etc.

Signed-off-by: Jeff King <peff@peff.net>
---
When I first tested it with "git log --format=%aS" I had to wonder "who
the heck is ntnd?". So using only the first-and-last would match the git
project's practice better, at least.

 pretty.c | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/pretty.c b/pretty.c
index c532c17..de62405 100644
--- a/pretty.c
+++ b/pretty.c
@@ -674,6 +674,23 @@ static int mailmap_name(const char **email, size_t *email_len,
 	return mail_map->nr && map_user(mail_map, email, email_len, name, name_len);
 }
 
+static void format_initials(struct strbuf *out, const char *name, size_t len)
+{
+	int initial = 1;
+	size_t i;
+
+	for (i = 0; i < len; i++) {
+		char c = name[i];
+		if (isspace(c)) {
+			initial = 1;
+			continue;
+		}
+		if (initial && isalpha(c))
+			strbuf_addch(out, tolower(c));
+		initial = 0;
+	}
+}
+
 static size_t format_person_part(struct strbuf *sb, char part,
 				 const char *msg, int len,
 				 const struct date_mode *dmode)
@@ -702,6 +719,10 @@ static size_t format_person_part(struct strbuf *sb, char part,
 		strbuf_add(sb, mail, maillen);
 		return placeholder_len;
 	}
+	if (part == 'S') {
+		format_initials(sb, name, namelen);
+		return placeholder_len;
+	}
 
 	if (!s.date_begin)
 		goto skip;
-- 
2.10.0.566.g5365f87


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

* [PATCH 3/5] graph: fix extra spaces in graph_padding_line
  2016-09-29  8:33 ` Jeff King
  2016-09-29  8:33   ` [PATCH 1/5] pretty: allow formatting DATE_SHORT Jeff King
  2016-09-29  8:36   ` [PATCH 2/5] pretty: allow formatting names as initials Jeff King
@ 2016-09-29  8:37   ` Jeff King
  2016-09-29  8:38   ` [PATCH 4/5] graph: helper functions for printing commit header Jeff King
                     ` (2 subsequent siblings)
  5 siblings, 0 replies; 20+ messages in thread
From: Jeff King @ 2016-09-29  8:37 UTC (permalink / raw)
  To: Kyle J. McKay; +Cc: Git mailing list, Junio C Hamano

The graph_padding_line() function outputs a series of "|"
columns, and then pads with spaces to graph->width by
calling graph_pad_horizontally(). However, we tell the
latter that we wrote graph->num_columns characters, which is
not true; we also needed spaces between the columns. Let's
keep a count of how many characters we've written, which is
what all the other callers of graph_pad_horizontally() do.

Without this, any output that is written at the end of a
padding line will be bumped out by at least an extra
graph->num_columns spaces. Presumably nobody ever noticed
the bug because there's no code path that actually writes to
the end of a padding line.

Signed-off-by: Jeff King <peff@peff.net>
---
 graph.c | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/graph.c b/graph.c
index 06f1139..d4e8519 100644
--- a/graph.c
+++ b/graph.c
@@ -1175,6 +1175,7 @@ int graph_next_line(struct git_graph *graph, struct strbuf *sb)
 static void graph_padding_line(struct git_graph *graph, struct strbuf *sb)
 {
 	int i;
+	int chars_written = 0;
 
 	if (graph->state != GRAPH_COMMIT) {
 		graph_next_line(graph, sb);
@@ -1190,14 +1191,21 @@ static void graph_padding_line(struct git_graph *graph, struct strbuf *sb)
 	 */
 	for (i = 0; i < graph->num_columns; i++) {
 		struct column *col = &graph->columns[i];
+
 		strbuf_write_column(sb, col, '|');
-		if (col->commit == graph->commit && graph->num_parents > 2)
-			strbuf_addchars(sb, ' ', (graph->num_parents - 2) * 2);
-		else
+		chars_written++;
+
+		if (col->commit == graph->commit && graph->num_parents > 2) {
+			int len = (graph->num_parents - 2) * 2;
+			strbuf_addchars(sb, ' ', len);
+			chars_written += len;
+		} else {
 			strbuf_addch(sb, ' ');
+			chars_written++;
+		}
 	}
 
-	graph_pad_horizontally(graph, sb, graph->num_columns);
+	graph_pad_horizontally(graph, sb, chars_written);
 
 	/*
 	 * Update graph->prev_state since we have output a padding line
-- 
2.10.0.566.g5365f87


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

* [PATCH 4/5] graph: helper functions for printing commit header
  2016-09-29  8:33 ` Jeff King
                     ` (2 preceding siblings ...)
  2016-09-29  8:37   ` [PATCH 3/5] graph: fix extra spaces in graph_padding_line Jeff King
@ 2016-09-29  8:38   ` Jeff King
  2016-09-29  8:38   ` [PATCH 5/5] log: add --commit-header option Jeff King
  2016-09-29 11:00   ` [PATCH/RFC] git log --oneline alternative with dates, times and initials Kyle J. McKay
  5 siblings, 0 replies; 20+ messages in thread
From: Jeff King @ 2016-09-29  8:38 UTC (permalink / raw)
  To: Kyle J. McKay; +Cc: Git mailing list, Junio C Hamano

The idea here is to make it possible to print something
right _before_ a commit in the graph. It's a bit ugly, but
it seems to work.

Signed-off-by: Jeff King <peff@peff.net>
---
 graph.c | 14 +++++++++++++-
 graph.h |  6 ++++++
 2 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/graph.c b/graph.c
index d4e8519..56daa70 100644
--- a/graph.c
+++ b/graph.c
@@ -1218,7 +1218,7 @@ int graph_is_commit_finished(struct git_graph const *graph)
 	return (graph->state == GRAPH_PADDING);
 }
 
-void graph_show_commit(struct git_graph *graph)
+static void graph_show_commit_1(struct git_graph *graph, int only_pre)
 {
 	struct strbuf msgbuf = STRBUF_INIT;
 	int shown_commit_line = 0;
@@ -1239,6 +1239,8 @@ void graph_show_commit(struct git_graph *graph)
 	}
 
 	while (!shown_commit_line && !graph_is_commit_finished(graph)) {
+		if (only_pre && graph->state == GRAPH_COMMIT)
+			break;
 		shown_commit_line = graph_next_line(graph, &msgbuf);
 		fwrite(msgbuf.buf, sizeof(char), msgbuf.len,
 			graph->revs->diffopt.file);
@@ -1252,6 +1254,16 @@ void graph_show_commit(struct git_graph *graph)
 	strbuf_release(&msgbuf);
 }
 
+void graph_show_precommit(struct git_graph *graph)
+{
+	graph_show_commit_1(graph, 1);
+}
+
+void graph_show_commit(struct git_graph *graph)
+{
+	graph_show_commit_1(graph, 0);
+}
+
 void graph_show_oneline(struct git_graph *graph)
 {
 	struct strbuf msgbuf = STRBUF_INIT;
diff --git a/graph.h b/graph.h
index af62339..e13e97f 100644
--- a/graph.h
+++ b/graph.h
@@ -97,6 +97,12 @@ int graph_width(struct git_graph *graph);
  */
 void graph_show_commit(struct git_graph *graph);
 
+/*
+ * Same as graph_show_commit, but stop just _before_ printing
+ * the actual commit line.
+ */
+void graph_show_precommit(struct git_graph *graph);
+
 /*
  * If the graph is non-NULL, print one line of the history graph to stdout.
  * Does not print a terminating newline on the last line.
-- 
2.10.0.566.g5365f87


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

* [PATCH 5/5] log: add --commit-header option
  2016-09-29  8:33 ` Jeff King
                     ` (3 preceding siblings ...)
  2016-09-29  8:38   ` [PATCH 4/5] graph: helper functions for printing commit header Jeff King
@ 2016-09-29  8:38   ` Jeff King
  2016-09-29 17:49     ` Junio C Hamano
  2016-09-29 11:00   ` [PATCH/RFC] git log --oneline alternative with dates, times and initials Kyle J. McKay
  5 siblings, 1 reply; 20+ messages in thread
From: Jeff King @ 2016-09-29  8:38 UTC (permalink / raw)
  To: Kyle J. McKay; +Cc: Git mailing list, Junio C Hamano

This lets you stick a header right before a commit, but
suppresses headers that are duplicates. This means you can
do something like:

  git log --graph --author-date-order --commit-header='== %as =='

to get a marker in the graph whenever the day changes.

This probably needs some refactoring around the setup of the
pretty-print context.

Signed-off-by: Jeff King <peff@peff.net>
---
 log-tree.c | 31 +++++++++++++++++++++++++++++++
 revision.c |  4 ++++
 revision.h |  3 +++
 3 files changed, 38 insertions(+)

diff --git a/log-tree.c b/log-tree.c
index 8c24157..76cef51 100644
--- a/log-tree.c
+++ b/log-tree.c
@@ -536,6 +536,28 @@ static void show_mergetag(struct rev_info *opt, struct commit *commit)
 	for_each_mergetag(show_one_mergetag, commit, opt);
 }
 
+static void show_commit_header(struct rev_info *opt,
+			       struct pretty_print_context *pp,
+			       struct commit *commit)
+{
+	struct strbuf out = STRBUF_INIT;
+
+	format_commit_message(commit, opt->commit_header, &out, pp);
+	strbuf_complete_line(&out);
+
+	if (!strbuf_cmp(&out, &opt->last_commit_header)) {
+		strbuf_release(&out);
+		return;
+	}
+
+	graph_show_precommit(opt->graph);
+	graph_show_padding(opt->graph);
+	fwrite(out.buf, 1, out.len, opt->diffopt.file);
+
+	strbuf_swap(&out, &opt->last_commit_header);
+	strbuf_release(&out);
+}
+
 void show_log(struct rev_info *opt)
 {
 	struct strbuf msgbuf = STRBUF_INIT;
@@ -591,6 +613,15 @@ void show_log(struct rev_info *opt)
 	}
 	opt->shown_one = 1;
 
+	if (opt->commit_header) {
+		/*
+		 * XXX probably the initialization of the pretty ctx from "opt"
+		 * below should happen sooner so we can use it.
+		 */
+		ctx.color = opt->diffopt.use_color;
+		show_commit_header(opt, &ctx, commit);
+	}
+
 	/*
 	 * If the history graph was requested,
 	 * print the graph, up to this commit's line
diff --git a/revision.c b/revision.c
index 969b3d1..229ff86 100644
--- a/revision.c
+++ b/revision.c
@@ -1361,6 +1361,8 @@ void init_revisions(struct rev_info *revs, const char *prefix)
 	}
 
 	revs->notes_opt.use_default_notes = -1;
+
+	strbuf_init(&revs->last_commit_header, 0);
 }
 
 static void add_pending_commit_list(struct rev_info *revs,
@@ -1844,6 +1846,8 @@ static int handle_revision_opt(struct rev_info *revs, int argc, const char **arg
 		revs->verbose_header = 1;
 		revs->pretty_given = 1;
 		get_commit_format(arg+9, revs);
+	} else if (skip_prefix(arg, "--commit-header=", &arg)) {
+		revs->commit_header = arg;
 	} else if (!strcmp(arg, "--expand-tabs")) {
 		revs->expand_tabs_in_log = 8;
 	} else if (!strcmp(arg, "--no-expand-tabs")) {
diff --git a/revision.h b/revision.h
index 9fac1a6..39ec092 100644
--- a/revision.h
+++ b/revision.h
@@ -170,6 +170,9 @@ struct rev_info {
 	int		show_log_size;
 	struct string_list *mailmap;
 
+	const char *commit_header;
+	struct strbuf last_commit_header;
+
 	/* Filter by commit log message */
 	struct grep_opt	grep_filter;
 	/* Negate the match of grep_filter */
-- 
2.10.0.566.g5365f87

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

* Re: [PATCH/RFC] git log --oneline alternative with dates, times and initials
  2016-09-29  8:33 ` Jeff King
                     ` (4 preceding siblings ...)
  2016-09-29  8:38   ` [PATCH 5/5] log: add --commit-header option Jeff King
@ 2016-09-29 11:00   ` Kyle J. McKay
  2016-09-29 12:52     ` Jeff King
  5 siblings, 1 reply; 20+ messages in thread
From: Kyle J. McKay @ 2016-09-29 11:00 UTC (permalink / raw)
  To: Jeff King; +Cc: Git mailing list, Junio C Hamano

On Sep 29, 2016, at 01:33, Jeff King wrote:

> On Wed, Sep 28, 2016 at 10:34:51PM -0700, Kyle J. McKay wrote:
>
>> git log-times --graph --date-order --decorate --no-merges -n 5 v2.5.3
>>
>>    === 2015-09-17 ===
>>  * ee6ad5f4 12:16 jch (tag: v2.5.3) Git 2.5.3
>>    === 2015-09-09 ===
>>  * b9d66899 14:22 js  am --skip/--abort: merge HEAD/ORIG_HEAD tree  
>> into index
>>  |   === 2015-09-04 ===
>>  | * 27ea6f85 10:46 jch (tag: v2.5.2) Git 2.5.2
>>  * 74b67638 10:36 jch (tag: v2.4.9) Git 2.4.9
>>                       ..........
>>  * ecad27cf 10:32 jch (tag: v2.3.9) Git 2.3.9
>
> I was surprised to see this as a separate script, but it is true  
> that we
> cannot quite pull it off with --format. I think we are very close,
> though.  With the patches below I think you can do:
>
>  git log \
>    --commit-header='%C(auto,bold blue)== %as ==%C(auto,reset)'
>    --format='%C(auto)%h %C(auto,green)%ad %C(auto,red)%aS/%cS%C(auto) 
> %d%C(auto,reset) %s' \
>    --graph --no-merges --author-date-order --date=format:%H:%M
>
> and get the same (or very similar) output.
>
>  [1/5]: pretty: allow formatting DATE_SHORT
>  [2/5]: pretty: allow formatting names as initials
>  [3/5]: graph: fix extra spaces in graph_padding_line
>  [4/5]: graph: helper functions for printing commit header
>  [5/5]: log: add --commit-header option
>
> Each of those commits[1] needs some minor polish, and as I'm not  
> really
> that interested in fancy log output myself, I don't plan on working on
> them further. I was mostly curious just how close we were. But if  
> you'd
> like to pursue it, feel free to use them as a starting point.

Those patches are missing some of the features like showing root  
commits, handling two letter initials, showing the weekday, inserting  
a break where needed to avoid parent-child confusion in graph output  
and properly handling Duy's initials. :)

I suppose if all the objects that output a date took a '(' <strftime>  
')' option that would get you part of the way -- it could replace  
DATE_SHORT with DATE_STRFTIME.

Also the above example doesn't handle marks properly in graph mode.   
Yes, you can add the "%m" format option but it does something odd and  
the script fixes it up.

On the other hand, git-log-times started out as a script for something  
else (a shell script actually) and just got embellished further and  
turned into a perl script for speed.

Your patches are a good first start though but reading the --graph  
code gives me headaches and I figured it would be like going down a  
rabbit hole to make the code support everything the script does.

The script also has one big advantage.  It works with the version of  
Git everybody already has installed.  :)

And nobody is ever going to want to type several lines of arcane  
formatting instructions to get the output.  ;_)

It would need a new option, perhaps --oneline-extended or something.

The patches are a good start but that doesn't help anyone using Git  
today which is why git-log-times is submitted as a contrib script --  
much like the way diff-highlight is still a contrib script and not  
supported directly by Git either.

--Kyle


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

* Re: [PATCH/RFC] git log --oneline alternative with dates, times and initials
  2016-09-29 11:00   ` [PATCH/RFC] git log --oneline alternative with dates, times and initials Kyle J. McKay
@ 2016-09-29 12:52     ` Jeff King
  2016-09-29 17:38       ` Junio C Hamano
  0 siblings, 1 reply; 20+ messages in thread
From: Jeff King @ 2016-09-29 12:52 UTC (permalink / raw)
  To: Kyle J. McKay; +Cc: Git mailing list, Junio C Hamano

On Thu, Sep 29, 2016 at 04:00:06AM -0700, Kyle J. McKay wrote:

> > Each of those commits[1] needs some minor polish, and as I'm not really
> > that interested in fancy log output myself, I don't plan on working on
> > them further. I was mostly curious just how close we were. But if you'd
> > like to pursue it, feel free to use them as a starting point.
> 
> Those patches are missing some of the features like showing root commits,
> handling two letter initials, showing the weekday, inserting a break where
> needed to avoid parent-child confusion in graph output and properly handling
> Duy's initials. :)

I'm not too surprised. I literally looked at the first screenshot from
your output and thought "surely git can do that with some minor tweaks".
Nor am I surprised that there are cases where the output is funny (99%
of the time I spent on it was tracking down that graph-padding bug).

I have no problem taking this in contrib or whatever, until a point when
Git is capable of doing the same thing itself. I just hoped to trick you
into working on Git. :)

-Peff

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

* Re: [PATCH 2/5] pretty: allow formatting names as initials
  2016-09-29  8:36   ` [PATCH 2/5] pretty: allow formatting names as initials Jeff King
@ 2016-09-29 17:31     ` Junio C Hamano
  2016-09-29 17:32       ` Jeff King
  0 siblings, 1 reply; 20+ messages in thread
From: Junio C Hamano @ 2016-09-29 17:31 UTC (permalink / raw)
  To: Jeff King; +Cc: Kyle J. McKay, Git mailing list

Jeff King <peff@peff.net> writes:

> Initials are shorter and often unique enough in a
> per-project setting, so they can be used to give a more
> informative version of --oneline.
>
> The 'S' in the placeholder is for "short" (and 's' is
> already taken by DATE_SHORT), but obviously that's pretty
> arcane.
>
> Possibly there should be more customization of initials,
> asking for only 2-letter initials, etc.
>
> Signed-off-by: Jeff King <peff@peff.net>
> ---
> When I first tested it with "git log --format=%aS" I had to wonder "who
> the heck is ntnd?". So using only the first-and-last would match the git
> project's practice better, at least.

And there is also "isalpha() good enough?" question.

I think we have a few Chinese and Hangul as well as Cyrillic names
in our history, some of them having outside-ascii first letters.
One of the more prolific contributor's initial is ÆAB ;-)

>  pretty.c | 21 +++++++++++++++++++++
>  1 file changed, 21 insertions(+)
>
> diff --git a/pretty.c b/pretty.c
> index c532c17..de62405 100644
> --- a/pretty.c
> +++ b/pretty.c
> @@ -674,6 +674,23 @@ static int mailmap_name(const char **email, size_t *email_len,
>  	return mail_map->nr && map_user(mail_map, email, email_len, name, name_len);
>  }
>  
> +static void format_initials(struct strbuf *out, const char *name, size_t len)
> +{
> +	int initial = 1;
> +	size_t i;
> +
> +	for (i = 0; i < len; i++) {
> +		char c = name[i];
> +		if (isspace(c)) {
> +			initial = 1;
> +			continue;
> +		}
> +		if (initial && isalpha(c))
> +			strbuf_addch(out, tolower(c));
> +		initial = 0;
> +	}
> +}
> +
>  static size_t format_person_part(struct strbuf *sb, char part,
>  				 const char *msg, int len,
>  				 const struct date_mode *dmode)
> @@ -702,6 +719,10 @@ static size_t format_person_part(struct strbuf *sb, char part,
>  		strbuf_add(sb, mail, maillen);
>  		return placeholder_len;
>  	}
> +	if (part == 'S') {
> +		format_initials(sb, name, namelen);
> +		return placeholder_len;
> +	}
>  
>  	if (!s.date_begin)
>  		goto skip;

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

* Re: [PATCH 2/5] pretty: allow formatting names as initials
  2016-09-29 17:31     ` Junio C Hamano
@ 2016-09-29 17:32       ` Jeff King
  0 siblings, 0 replies; 20+ messages in thread
From: Jeff King @ 2016-09-29 17:32 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Kyle J. McKay, Git mailing list

On Thu, Sep 29, 2016 at 10:31:30AM -0700, Junio C Hamano wrote:

> > When I first tested it with "git log --format=%aS" I had to wonder "who
> > the heck is ntnd?". So using only the first-and-last would match the git
> > project's practice better, at least.
> 
> And there is also "isalpha() good enough?" question.
> 
> I think we have a few Chinese and Hangul as well as Cyrillic names
> in our history, some of them having outside-ascii first letters.
> One of the more prolific contributor's initial is ÆAB ;-)

Heh, true. In case it was not clear, these were mostly quick-and-dirty
patches. I think the right test is probably '!isspace()".

-Peff

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

* Re: [PATCH/RFC] git log --oneline alternative with dates, times and initials
  2016-09-29 12:52     ` Jeff King
@ 2016-09-29 17:38       ` Junio C Hamano
  2016-09-29 18:30         ` Jeff King
  0 siblings, 1 reply; 20+ messages in thread
From: Junio C Hamano @ 2016-09-29 17:38 UTC (permalink / raw)
  To: Jeff King; +Cc: Kyle J. McKay, Git mailing list

Jeff King <peff@peff.net> writes:

>> Those patches are missing some of the features like showing root commits,
>> handling two letter initials, showing the weekday, inserting a break where
>> needed to avoid parent-child confusion in graph output and properly handling
>> Duy's initials. :)
>
> I'm not too surprised. I literally looked at the first screenshot from
> your output and thought "surely git can do that with some minor tweaks".
> Nor am I surprised that there are cases where the output is funny (99%
> of the time I spent on it was tracking down that graph-padding bug).
>
> I have no problem taking this in contrib or whatever, until a point when
> Git is capable of doing the same thing itself. I just hoped to trick you
> into working on Git. :)

I thought we stopped adding random things to contrib/, though.

Unlike the earlier days of Git, if a custom command that uses Git is
very userful, it can live its own life and flourish within the much
larger Git userbase we have these days.

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

* Re: [PATCH 5/5] log: add --commit-header option
  2016-09-29  8:38   ` [PATCH 5/5] log: add --commit-header option Jeff King
@ 2016-09-29 17:49     ` Junio C Hamano
  2016-09-29 18:31       ` Jeff King
  0 siblings, 1 reply; 20+ messages in thread
From: Junio C Hamano @ 2016-09-29 17:49 UTC (permalink / raw)
  To: Jeff King; +Cc: Kyle J. McKay, Git mailing list

Jeff King <peff@peff.net> writes:

> This lets you stick a header right before a commit, but
> suppresses headers that are duplicates. This means you can
> do something like:
>
>   git log --graph --author-date-order --commit-header='== %as =='
>
> to get a marker in the graph whenever the day changes.

That's interesting.  So it is not really "commit" header, but a
header for groups of commits.  Credits for realizing the usefulness
of such grouping may go to Kyle, but the implementation is also
brilliant ;-).

> This probably needs some refactoring around the setup of the
> pretty-print context.


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

* Re: [PATCH/RFC] git log --oneline alternative with dates, times and initials
  2016-09-29 17:38       ` Junio C Hamano
@ 2016-09-29 18:30         ` Jeff King
  2016-09-29 18:50           ` Junio C Hamano
  0 siblings, 1 reply; 20+ messages in thread
From: Jeff King @ 2016-09-29 18:30 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Kyle J. McKay, Git mailing list

On Thu, Sep 29, 2016 at 10:38:14AM -0700, Junio C Hamano wrote:

> > I have no problem taking this in contrib or whatever, until a point when
> > Git is capable of doing the same thing itself. I just hoped to trick you
> > into working on Git. :)
> 
> I thought we stopped adding random things to contrib/, though.
> 
> Unlike the earlier days of Git, if a custom command that uses Git is
> very userful, it can live its own life and flourish within the much
> larger Git userbase we have these days.

I dunno. I said "contrib or whatever" to duck that question. :)

I do not have a strong opinion either way. In some ways this script is
similar to diff-highlight, which is in contrib. Perhaps that is only
because diff-highlight is grandfathered. But I also think it somewhat
makes sense, because in an ideal world diff-highlight gets thrown away
in favor of git's internal diff routines learning to do the same thing.
And in theory this script is in the same position.

But I also buy the argument that contrib/ is simply a hassle. This
script can live in its own repository somewhere, and handle
announcements and patches on the list. For that matter, so could
diff-highlight, and I don't mind ripping it out of contrib if that's the
consensus.  My only real objection is that doing so is more work than
leaving it as-is, and I'm lazy.

-Peff

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

* Re: [PATCH 5/5] log: add --commit-header option
  2016-09-29 17:49     ` Junio C Hamano
@ 2016-09-29 18:31       ` Jeff King
  0 siblings, 0 replies; 20+ messages in thread
From: Jeff King @ 2016-09-29 18:31 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Kyle J. McKay, Git mailing list

On Thu, Sep 29, 2016 at 10:49:04AM -0700, Junio C Hamano wrote:

> Jeff King <peff@peff.net> writes:
> 
> > This lets you stick a header right before a commit, but
> > suppresses headers that are duplicates. This means you can
> > do something like:
> >
> >   git log --graph --author-date-order --commit-header='== %as =='
> >
> > to get a marker in the graph whenever the day changes.
> 
> That's interesting.  So it is not really "commit" header, but a
> header for groups of commits.  Credits for realizing the usefulness
> of such grouping may go to Kyle, but the implementation is also
> brilliant ;-).

Yeah, I really don't like the name "--commit-header" that much. I
initially thought to call it "--graph-header", but it is potentially
useful without a graph, too. Maybe "--group-header" or something.
I dunno. I'd leave that to somebody who actually wanted to polish the
patches up enough for submission. That might even be me someday, but not
today. :)

-Peff

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

* Re: [PATCH/RFC] git log --oneline alternative with dates, times and initials
  2016-09-29 18:30         ` Jeff King
@ 2016-09-29 18:50           ` Junio C Hamano
  0 siblings, 0 replies; 20+ messages in thread
From: Junio C Hamano @ 2016-09-29 18:50 UTC (permalink / raw)
  To: Jeff King; +Cc: Kyle J. McKay, Git mailing list

Jeff King <peff@peff.net> writes:

> But I also buy the argument that contrib/ is simply a hassle. This
> script can live in its own repository somewhere, and handle
> announcements and patches on the list.

I think the output of this script is largely personal preference,
which can be made to a project preference for a project enough of
whose participant so desires.

For example, I would not be surprised if this appeared next to
checkpatch.pl script in the kernel archive.  When a project that
uses Git to store its sources finds a need to summarize its log in a
standardized way that is not produced natively by Git, such a
project may add this script to its scripts/ area, just like a
project that wants to have a standard way to help its contributors
to avoid common style errors a lot more than our "diff" (which only
highlights whitespace errors) does may ship checkpatch.pl in it.

So in that sense, while I do not mean to say that the script itself
must become a standalone project that has only one script in it, I
do not think it belongs "our" contrib/, as we do not see a need to
standardize its output as the log summary standard we the Git
project uses on its own history.

On the other hand, your illustration of the needed bits to express
this particular output format used by Kyle's script, when polished,
does fit in our codebase.  We are interested in making it possible
for projects and users to do more by using Git with its standard
customization features.

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

* Re: [PATCH 1/5] pretty: allow formatting DATE_SHORT
  2016-09-29  8:33   ` [PATCH 1/5] pretty: allow formatting DATE_SHORT Jeff King
@ 2016-09-30  6:17     ` Jacob Keller
  2016-09-30 10:56       ` SZEDER Gábor
  0 siblings, 1 reply; 20+ messages in thread
From: Jacob Keller @ 2016-09-30  6:17 UTC (permalink / raw)
  To: Jeff King; +Cc: Kyle J. McKay, Git mailing list, Junio C Hamano

On Thu, Sep 29, 2016 at 1:33 AM, Jeff King <peff@peff.net> wrote:
> There's no way to do this short of "%ad" and --date=short,
> but that limits you to having a single date format in the
> output.
>
> This would possibly be better done with something more like
> "%ad(short)".
>
> Signed-off-by: Jeff King <peff@peff.net>
> ---
>  pretty.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/pretty.c b/pretty.c
> index 493edb0..c532c17 100644
> --- a/pretty.c
> +++ b/pretty.c
> @@ -727,6 +727,9 @@ static size_t format_person_part(struct strbuf *sb, char part,
>         case 'I':       /* date, ISO 8601 strict */
>                 strbuf_addstr(sb, show_ident_date(&s, DATE_MODE(ISO8601_STRICT)));
>                 return placeholder_len;
> +       case 's':
> +               strbuf_addstr(sb, show_ident_date(&s, DATE_MODE(SHORT)));
> +               return placeholder_len;
>         }
>
>  skip:
> --
> 2.10.0.566.g5365f87
>

Nice. I use date=short in some of my aliases and switching to this is
nicer. I assume this turns into "%(as)"?

What about documenting this in  pretty-formats.txt?

Thanks,
Jake

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

* Re: [PATCH 1/5] pretty: allow formatting DATE_SHORT
  2016-09-30  6:17     ` Jacob Keller
@ 2016-09-30 10:56       ` SZEDER Gábor
  2016-09-30 22:04         ` Jacob Keller
  2016-10-01  9:18         ` Jeff King
  0 siblings, 2 replies; 20+ messages in thread
From: SZEDER Gábor @ 2016-09-30 10:56 UTC (permalink / raw)
  To: Jacob Keller
  Cc: SZEDER Gábor, Jeff King, Kyle J. McKay, Git mailing list,
	Junio C Hamano

> On Thu, Sep 29, 2016 at 1:33 AM, Jeff King <peff@peff.net> wrote:
> > There's no way to do this short of "%ad" and --date=short,
> > but that limits you to having a single date format in the
> > output.
> >
> > This would possibly be better done with something more like
> > "%ad(short)".
> >
> > Signed-off-by: Jeff King <peff@peff.net>
> > ---
> >  pretty.c | 3 +++
> >  1 file changed, 3 insertions(+)
> >
> > diff --git a/pretty.c b/pretty.c
> > index 493edb0..c532c17 100644
> > --- a/pretty.c
> > +++ b/pretty.c
> > @@ -727,6 +727,9 @@ static size_t format_person_part(struct strbuf *sb, char part,
> >         case 'I':       /* date, ISO 8601 strict */
> >                 strbuf_addstr(sb, show_ident_date(&s, DATE_MODE(ISO8601_STRICT)));
> >                 return placeholder_len;
> > +       case 's':
> > +               strbuf_addstr(sb, show_ident_date(&s, DATE_MODE(SHORT)));
> > +               return placeholder_len;
> >         }
> >
> >  skip:
> > --
> > 2.10.0.566.g5365f87
> >
> 
> Nice. I use date=short in some of my aliases and switching to this is
> nicer. I assume this turns into "%(as)"?
> 
> What about documenting this in  pretty-formats.txt?

Here you go :)

  http://public-inbox.org/git/1444235305-8718-1-git-send-email-szeder@ira.uka.de/


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

* Re: [PATCH 1/5] pretty: allow formatting DATE_SHORT
  2016-09-30 10:56       ` SZEDER Gábor
@ 2016-09-30 22:04         ` Jacob Keller
  2016-10-01  9:18         ` Jeff King
  1 sibling, 0 replies; 20+ messages in thread
From: Jacob Keller @ 2016-09-30 22:04 UTC (permalink / raw)
  To: SZEDER Gábor
  Cc: Jeff King, Kyle J. McKay, Git mailing list, Junio C Hamano

On Fri, Sep 30, 2016 at 3:56 AM, SZEDER Gábor <szeder@ira.uka.de> wrote:
>> On Thu, Sep 29, 2016 at 1:33 AM, Jeff King <peff@peff.net> wrote:
>> > There's no way to do this short of "%ad" and --date=short,
>> > but that limits you to having a single date format in the
>> > output.
>> >
>> > This would possibly be better done with something more like
>> > "%ad(short)".
>> >
>> > Signed-off-by: Jeff King <peff@peff.net>
>> > ---
>> >  pretty.c | 3 +++
>> >  1 file changed, 3 insertions(+)
>> >
>> > diff --git a/pretty.c b/pretty.c
>> > index 493edb0..c532c17 100644
>> > --- a/pretty.c
>> > +++ b/pretty.c
>> > @@ -727,6 +727,9 @@ static size_t format_person_part(struct strbuf *sb, char part,
>> >         case 'I':       /* date, ISO 8601 strict */
>> >                 strbuf_addstr(sb, show_ident_date(&s, DATE_MODE(ISO8601_STRICT)));
>> >                 return placeholder_len;
>> > +       case 's':
>> > +               strbuf_addstr(sb, show_ident_date(&s, DATE_MODE(SHORT)));
>> > +               return placeholder_len;
>> >         }
>> >
>> >  skip:
>> > --
>> > 2.10.0.566.g5365f87
>> >
>>
>> Nice. I use date=short in some of my aliases and switching to this is
>> nicer. I assume this turns into "%(as)"?
>>
>> What about documenting this in  pretty-formats.txt?
>
> Here you go :)
>
>   http://public-inbox.org/git/1444235305-8718-1-git-send-email-szeder@ira.uka.de/
>

Nice, thanks!

Regards,
Jake

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

* Re: [PATCH 1/5] pretty: allow formatting DATE_SHORT
  2016-09-30 10:56       ` SZEDER Gábor
  2016-09-30 22:04         ` Jacob Keller
@ 2016-10-01  9:18         ` Jeff King
  1 sibling, 0 replies; 20+ messages in thread
From: Jeff King @ 2016-10-01  9:18 UTC (permalink / raw)
  To: SZEDER Gábor
  Cc: Jacob Keller, Kyle J. McKay, Git mailing list, Junio C Hamano

On Fri, Sep 30, 2016 at 12:56:39PM +0200, SZEDER Gábor wrote:

> > Nice. I use date=short in some of my aliases and switching to this is
> > nicer. I assume this turns into "%(as)"?
> > 
> > What about documenting this in  pretty-formats.txt?
> 
> Here you go :)
> 
>   http://public-inbox.org/git/1444235305-8718-1-git-send-email-szeder@ira.uka.de/

The review on that thread is basically "do we want to add every
abbreviation under the sun, or do we want to come up with a better
placeholder scheme?". And that has come up several other times (e.g.,
Ted's recent %gt placeholder).

I _do_ think that's the right way forward, but as nobody has been
pushing it that way, and these things come up from time to time, maybe
we should just accept it and add the ones people want in the interim.
It's not like it makes the situation significantly worse, or harder to
migrate to %(authordate:short).

-Peff

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

end of thread, other threads:[~2016-10-01  9:18 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-29  5:34 [PATCH/RFC] git log --oneline alternative with dates, times and initials Kyle J. McKay
2016-09-29  8:33 ` Jeff King
2016-09-29  8:33   ` [PATCH 1/5] pretty: allow formatting DATE_SHORT Jeff King
2016-09-30  6:17     ` Jacob Keller
2016-09-30 10:56       ` SZEDER Gábor
2016-09-30 22:04         ` Jacob Keller
2016-10-01  9:18         ` Jeff King
2016-09-29  8:36   ` [PATCH 2/5] pretty: allow formatting names as initials Jeff King
2016-09-29 17:31     ` Junio C Hamano
2016-09-29 17:32       ` Jeff King
2016-09-29  8:37   ` [PATCH 3/5] graph: fix extra spaces in graph_padding_line Jeff King
2016-09-29  8:38   ` [PATCH 4/5] graph: helper functions for printing commit header Jeff King
2016-09-29  8:38   ` [PATCH 5/5] log: add --commit-header option Jeff King
2016-09-29 17:49     ` Junio C Hamano
2016-09-29 18:31       ` Jeff King
2016-09-29 11:00   ` [PATCH/RFC] git log --oneline alternative with dates, times and initials Kyle J. McKay
2016-09-29 12:52     ` Jeff King
2016-09-29 17:38       ` Junio C Hamano
2016-09-29 18:30         ` Jeff King
2016-09-29 18:50           ` Junio C Hamano

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.