Skip to content

File history for renamed files, with '--follow' equivalent to show the complete history #28253

@kanutron

Description

@kanutron

Feature Description

Consider the scenario where a given file has 1+ change in its commit history, then the file is renamed using git mv or so, and then the file receives another change.

In the command line git, you can get the log changes before renaming the file using --follow.

When viewing the same history in the Web UI, the history of that file ends where the file was last renamed. Giving the false impression of history lost.

A simple button/check to activate the --follow option would be much appreciated. In fact, I'd say this should be enabled by default.

To see it, given a file that was renamed, check its history in the web UI and then compare it with the following:

As Gitea does:

git log FILE

As Gitea should do:

git log --follow FILE

Screenshots

No response

Activity

added
type/proposalThe new feature has not been accepted yet but needs to be discussed first.
on Nov 28, 2023
Abyss777

Abyss777 commented on Dec 4, 2023

@Abyss777

Hello
Looks like it was removed intentionally 58a4407

Could it be made switchable? Somewhere in config. Not every installations have large repos, but having full history is rather convenient.

cswartzvi

cswartzvi commented on Dec 21, 2023

@cswartzvi

I would like to add that viewing the git blame in the Web UI will show you commits from before the rename. This might induce a head scratching moment because some of the commits in the blame may not be visible in the Web UI history.

Mosch0512

Mosch0512 commented on Feb 8, 2024

@Mosch0512

I think this should be triggerable via the history view of a file.

Where you could trigger it manually or remember it for that specific file and future renames.
grafik

this than triggers the --follow

Chi-Iroh

Chi-Iroh commented on Jun 5, 2025

@Chi-Iroh

Nice idea, I'd like that too.
EDIT: I'm working on it, but I haven't opened a PR for now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/proposalThe new feature has not been accepted yet but needs to be discussed first.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Participants

      @cswartzvi@kanutron@Abyss777@Mosch0512@Chi-Iroh

      Issue actions

        File history for renamed files, with '--follow' equivalent to show the complete history · Issue #28253 · go-gitea/gitea