List for cgit developers and users
 help / color / mirror / Atom feed
From: john at keeping.me.uk (John Keeping)
Subject: [PATCH] log: allow users to follow a file
Date: Fri, 19 Apr 2013 08:54:37 +0100	[thread overview]
Message-ID: <20130419075437.GD2278@serenity.lan> (raw)
In-Reply-To: <51702E0B.7030107@necoro.eu>

On Thu, Apr 18, 2013 at 07:31:55PM +0200, Ren? Neumann wrote:
> Thanks a lot for your patch, it is a huge step in the right direction
> (it is way more involved than I could imagine). One issue remains: It
> still displays empty diffstats (example: see [1]) for the commits
> _before_ the rename, as they are limited to the _new_ name. This might
> even lead to wrong commits if you have a commit "A -> B, C -> A" and are
> looking at the history of the new file A.

Thanks for trying this out.  I need to think about how to do this for a
bit because we'll need to change the links in the log to point to the
correct (pre-rename) file path, but then the "Log" link at the top of
the page will link to the log with that file name and we will only show
the pre-rename commits.

The answer to that should help with the corner case of the rename commit
itself, where we want to show both file paths, but I think it becomes
complicated when there are multiple renames in the history.

I don't really want to introduce two new query parameters, one of them
just so that clicking "Log" does the same as navigating back in the
browser.  Perhaps we should accept that once you click on a pre-rename
commit you are now examining that file path, so clicking "Log" doesn't
show any changes after it has been renamed.

That way we only need a bit of extra state to show the rename commit
itself, and the "follow" flag I'm already introducing should be
sufficient for that.




  reply	other threads:[~2013-04-19  7:54 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-15 11:51 log --follow 
2013-04-15 12:38 ` john
2013-04-15 17:30   ` 
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 [this message]
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=20130419075437.GD2278@serenity.lan \
    --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).