List for cgit developers and users
 help / color / mirror / Atom feed
* [PATCH 0/3] Blame UI
@ 2015-08-12 13:03 john
  2015-08-12 13:03 ` [PATCH 1/3] ui-blame: add blame UI john
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: john @ 2015-08-12 13:03 UTC (permalink / raw)


This is an attempt at adding "blame" support to CGit.  Because git.git
doesn't include the blame implementation in libgit.a, I decided to
simply invoke git-blame(1) and parse its porcelain output.  I don't
think the result is too hideous (although I do perhaps need to extract
some helper functions from process_blame()) and given how expensive
blame is as an operation I can live with the overhead of an extra
process.

The UI is inspired by Gitweb's blame output (e.g. [1]).  I did want to
find a way to add a "blame parent" link, the implementation of which is
relatively straightforward, but I failed to invent a format I was happy
with (concise enough to keep the column narrow and also avoiding
confusion with Git's existing ref format).  You can still manage to
blame the parent by following links to the commit's parent and then
blaming the file there.


[1] http://repo.or.cz/w/cgit.git/blame/HEAD:/cgit.c

John Keeping (3):
  ui-blame: add blame UI
  ui-shared: add cgit_blame_link()
  ui-tree: generate blame links

 cgit.c       |   4 +-
 cgit.css     |   4 ++
 cgit.h       |   3 +
 cgit.mk      |   1 +
 cgitrc.5.txt |   4 ++
 cmd.c        |   7 +++
 ui-blame.c   | 202 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 ui-blame.h   |   6 ++
 ui-shared.c  |  40 ++++++++++++
 ui-shared.h  |   3 +
 ui-tree.c    |   9 +++
 11 files changed, 282 insertions(+), 1 deletion(-)
 create mode 100644 ui-blame.c
 create mode 100644 ui-blame.h

-- 
2.5.0.466.g9af26fa



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

end of thread, other threads:[~2015-08-12 15:26 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-12 13:03 [PATCH 0/3] Blame UI john
2015-08-12 13:03 ` [PATCH 1/3] ui-blame: add blame UI john
2015-08-12 13:03 ` [PATCH 2/3] ui-shared: add cgit_blame_link() john
2015-08-12 13:03 ` [PATCH 3/3] ui-tree: generate blame links john
2015-08-12 13:44 ` [PATCH 0/3] Blame UI Jason
2015-08-12 15:02   ` john
2015-08-12 15:07     ` Jason
2015-08-12 15:26       ` john

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 NNTP newsgroup(s).