From mboxrd@z Thu Jan 1 00:00:00 1970 From: john at keeping.me.uk (John Keeping) Date: Mon, 15 Apr 2013 13:38:45 +0100 Subject: log --follow In-Reply-To: <516BE9CF.3060809@necoro.eu> References: <516BE9CF.3060809@necoro.eu> Message-ID: <20130415123845.GF2278@serenity.lan> On Mon, Apr 15, 2013 at 01:51:43PM +0200, Ren? Neumann wrote: > I just noticed that cgit does not show history over renames. Is it > somehow reasonable to add "--follow" by default, or make it an option? > Or are there reasons against it? I don't think it should be turned on unconditionally, since it does require some more work to generate the log, but I see no reason why we couldn't add an option for it. The patch below should cause the log to be generated with "--follow", but obviously it needs more work to be turned into a proper patch. If this is useful I'll try to find some time to do this properly. -- >8 -- diff --git a/ui-log.c b/ui-log.c index 2aa12c3..01bddd1 100644 --- a/ui-log.c +++ b/ui-log.c @@ -342,7 +342,9 @@ void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern } if (path) { + static const char *follow_arg = "--follow"; static const char *double_dash_arg = "--"; + vector_push(&vec, &follow_arg, 0); vector_push(&vec, &double_dash_arg, 0); vector_push(&vec, &path, 0); }