Thread (1 message) 1 message, 1 author, 2016-06-15
  • (off-list ancestor, not in this archive)
  • Re: gitweb wishlist · Junio C Hamano <hidden> · 2016-06-15

Re: gitweb wishlist

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:41:58

quoted
quoted
quoted
quoted
"JCH" == Junio C Hamano [off-list ref] writes:
JCH> What _all_ Porcelain layer implementation would benefit from is
JCH> if we had a common output format routine that is similar to the
JCH> spirit of show_date() function.  Have format_commit_fancy()
JCH> function that takes a commit object and have it do the mapping.

Here is a small script called "whodunnit.sh", and its output can
be cleaned up if we had a git-format-commit command that used
format_commit_fancy(), that massages author/committer names (and
probably some other prettyprinting), instead of plain old
"git-cat-file commit".

#!/bin/sh
git-rev-list ${1:-HEAD} |
while read commit
do
	git-cat-file commit $commit |
	sed -ne '/^author \([^>]*>\).*/{s//\1/p;q;}'
done | sort | uniq -c | sort -n

The lines it currently spits out looks like this:

      6 ...
      8 Linus Torvalds <torvalds@ppc970.osdl.org.(none)>
        ...
    155 ...
    229 Linus Torvalds [off-list ref]

My suggestion for Thomas is not to volunteer changing
cvsps-to-git to munge names at conversion time, but instead to
volunteer doing the format_commit_fancy() on the core-ish side.
It would read from $GIT_DIR/author-names which would be a plain
text file that is a sequence of:

    "bogus name" TAB "good name" LF

where you would put ".(none)" version to "bogus" side and the
corrected one on the "good" side.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help