List for cgit developers and users
 help / color / mirror / Atom feed
Subject: log --follow
Date: Mon, 15 Apr 2013 19:30:11 +0200	[thread overview]
Message-ID: <516C3923.3060700@necoro.eu> (raw)
In-Reply-To: <20130415123845.GF2278@serenity.lan>

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);
>  	}
> 





  reply	other threads:[~2013-04-15 17:30 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-15 11:51 
2013-04-15 12:38 ` john
2013-04-15 17:30   `  [this message]
2013-04-16  8:48     ` john
2013-04-17 19:48       ` [PATCH] log: allow users to follow a file john
2013-04-18 17:31         ` 
2013-04-19  7:54           ` john
2013-04-20 10:14             ` [PATCH v2 0/2] Allow users to follow file renames john
2013-04-20 10:14               ` [PATCH v2 1/2] shared: make cgit_diff_tree_cb public john
2013-04-20 10:14               ` [PATCH v2 2/2] log: allow users to follow a file john
2013-04-20 11:21                 ` 
2013-04-20 12:21                 ` [PATCH 2/2 v3] " john
2015-03-24  6:02                   ` 
2015-08-12 14:34                   ` [PATCH v4 1/2] shared: make cgit_diff_tree_cb public john
2015-08-12 14:55                     ` [PATCH v4 2/2] log: allow users to follow a file john
2015-08-12 15:01                       ` Jason
2015-08-12 15:41                     ` [PATCH v4 1/2] shared: make cgit_diff_tree_cb public Jason
2013-04-26 13:52               ` [PATCH v2 0/2] Allow users to follow file renames Jason

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=516C3923.3060700@necoro.eu \
    --to=cgit@lists.zx2c4.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).