Skip to content

New commits appearing on master after filtering paths #715

@Dominic-Stafford

Description

@Dominic-Stafford

I have a large repo consisting of scripts and configuration cards, where I want to filter to only keep the scripts, as the repository size has become unmanageable. I have a long text file with all the scripts I want to keep, but for this example I will only attempt to keep one heavily used script. When I run:

git log -- bin/MadGraph5_aMCatNLO/gridpack_generation.sh
git filter-repo --path bin/MadGraph5_aMCatNLO/gridpack_generation.sh
git log -- bin/MadGraph5_aMCatNLO/gridpack_generation.sh

I see new commits in the second log which weren't there in the first: notably a commit which removed the script entirely two years ago, and was then reverted (but presumably on a different branch to master since it wasn't visible before). This is frustrating since it makes the blame misleading, as any changes older than two year show as the revert (and having a meaningful blame is one of our main reasons for choosing filter-repo rather than making a flat copy of the files we want from HEAD).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions