log --follow
René Neumann
lists at necoro.eu
Mon Apr 15 19:30:11 CEST 2013
Am 15.04.2013 14:38, schrieb John Keeping:
> 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.
Unfortunately, this does not work. Now, when showing the log of one
file, it shows the complete history of the repository (where all
non-corresponding patches are empty).
I can't explain, why it behaves like that...
> -- >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);
> }
>
More information about the CGit
mailing list