0

Or, put in another way, is there any pretty interface to git-annotate or you have to do the legwork yourself? What I am lookig for is some tool that would use plain git-annotate or git-annotate --porcelain (which I can't really figure out and I haven't found a place that describes it properly, BTW (and that's a side question)) and output a HTML (or TeX or RTF) file with, say, two columns: text on the left had side and properly aligned messages on the right hand side. That is, take something like this (output of git annotate)

c6230de3        ( JJ Merelo     2014-01-13 18:59:17 +0100       1)<!--- -*-  eval: (typopunct-mode 1); eval: (typopunct-change-language: spanish) -*- -->
c6230de3        ( JJ Merelo     2014-01-13 18:59:17 +0100       2)
412c8ed1        ( JJ Merelo     2014-01-19 10:56:27 +0100       3)<h1>#slash</h1>
e736fc14        ( JJ Merelo     2014-01-03 08:50:19 +0100       4)
c6230de3        ( JJ Merelo     2014-01-13 18:59:17 +0100       5)
c6230de3        ( JJ Merelo     2014-01-13 18:59:17 +0100       6)

And produce something like this

| Text  | Annotation |
---------------------
|       | Commit msg |
----------------------
|#shlash| Commit msg'|
----------------------

And so on... Optionally, text could be filtered using Markdown to HTML or some syntax highlighting filter, but I can figure that out if I have the source.

jjmerelo
  • 22,578
  • 8
  • 40
  • 86
  • Have you tried [`git-blame`](https://www.kernel.org/pub/software/scm/git/docs/git-blame.html)? – Agis Jan 19 '14 at 13:24
  • git-blame is pretty much the same, and it uses teh same format. You still have to process stuff to get to a human-readable format like HTML. – jjmerelo Jan 19 '14 at 16:25

1 Answers1

1

You can actually do that using git log and format. However, its a bit onerous.

Example:

git log tagv1..tagv2 --pretty=format:'<table><tr> <td>
<a href="http://github.com/xxxx/xxxx/commit/%H"> %h</a></td> <td>%s</td> 
<td>%an</td></tr></table> ' --reverse > test.html

The other way if you have Linux or Mac you can use column command

Example:

git log tagv1..tagv2 --pretty=format:'%h ^ %s ^ %an' --reverse | column -s ^ -t 

3e70f9a    Update README.md                  Foo Bar
73ae95f    Merge branch 'master'             Moo Bar
a6b69bb    Bumped version to 2.6             Mr. Sandman
First Zero
  • 21,586
  • 6
  • 46
  • 45
  • Hum, not exactly what I'm looking for. This creates a table with the commits in chronological order and the author; what I want is the text itself annotated with the commit; the table was just an example of a possible layout. – jjmerelo Jan 21 '14 at 06:23