[RFC PATCH 2/4] ui-blame: create placeholder and links
John Keeping
john at keeping.me.uk
Sat Jul 22 13:31:19 CEST 2017
On Wed, Jun 07, 2017 at 09:18:08PM -0500, Jeff Smith wrote:
> Create a placeholder for and links to a page that will contain the
> 'blame' for a file in the repository.
>
> Signed-off-by: Jeff Smith <whydoubt at gmail.com>
> ---
> cgit.mk | 1 +
> cmd.c | 8 ++-
> ui-blame.c | 160 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> ui-blame.h | 7 +++
> ui-shared.c | 20 ++++++--
> ui-shared.h | 3 ++
> ui-tree.c | 8 ++-
> 7 files changed, 202 insertions(+), 5 deletions(-)
> create mode 100644 ui-blame.c
> create mode 100644 ui-blame.h
>
> diff --git a/cgit.mk b/cgit.mk
> index 90a2346..3fcc1ca 100644
> --- a/cgit.mk
> +++ b/cgit.mk
> @@ -77,6 +77,7 @@ CGIT_OBJ_NAMES += parsing.o
> CGIT_OBJ_NAMES += scan-tree.o
> CGIT_OBJ_NAMES += shared.o
> CGIT_OBJ_NAMES += ui-atom.o
> +CGIT_OBJ_NAMES += ui-blame.o
> CGIT_OBJ_NAMES += ui-blob.o
> CGIT_OBJ_NAMES += ui-clone.o
> CGIT_OBJ_NAMES += ui-commit.o
> diff --git a/cmd.c b/cmd.c
> index d280e95..262e31f 100644
> --- a/cmd.c
> +++ b/cmd.c
> @@ -1,6 +1,6 @@
> /* cmd.c: the cgit command dispatcher
> *
> - * Copyright (C) 2006-2014 cgit Development Team <cgit at lists.zx2c4.com>
> + * Copyright (C) 2006-2017 cgit Development Team <cgit at lists.zx2c4.com>
> *
> * Licensed under GNU General Public License v2
> * (see COPYING for full license text)
> @@ -11,6 +11,7 @@
> #include "cache.h"
> #include "ui-shared.h"
> #include "ui-atom.h"
> +#include "ui-blame.h"
> #include "ui-blob.h"
> #include "ui-clone.h"
> #include "ui-commit.h"
> @@ -63,6 +64,10 @@ static void about_fn(void)
> cgit_print_site_readme();
> }
>
> +static void blame_fn(void)
> +{
> + cgit_print_blame();
> +}
Missing blank line here.
> static void blob_fn(void)
> {
> cgit_print_blob(ctx.qry.sha1, ctx.qry.path, ctx.qry.head, 0);
I don't have any comments on the rest of this patch, although I'm not
sure about the order of this series. I think it would be cleaner to
have:
- a patch adding ui-blame.[ch] in their final form along with the
Makefile change to enable building but no other changes
- follow-up patch(es) to link the blame UI in to the rest of the system
(I don't know if this should be one patch, or a series adding the
command handling, then ui-shared changes followed by links in various
other ui-*.c files)
More information about the CGit
mailing list