git-filter-repo/t
Elijah Newren 509a624b6a filter-repo: fix issue with pruning of empty commits
In order to build the correct tree for a commit, git-fast-import always
takes a list of file changes for a merge commit relative to the first
parent.

When the entire first-parent history of a merge commit is pruned away
and the merge had paths with no difference relative to the first parent
but which differed relative to later parents, then we really need to
generate a new list of file changes in order to have one of those other
parents become the new first parent.  An example might help clarify...

Let's say that there is a merge commit, and:

  * it resolved differences in pathA between its two parents by taking
    the version of pathA from the first parent.

  * pathB was added in the history of the second parent (it is not
    present in the first parent) and is NOT included in the merge commit
    (either being deleted, or via rename treated as deleted and added as
    something else)

For this merge commit, neither pathA nor pathB differ from the first
parent, and thus wouldn't appear in the list of file changes shown by
fast-export.  However, when our filtering rules determine that the first
parent (and all its parents) should be pruned away, then the second
parent has to become the new first parent of the merge commit.  But to
end up with the right files in the merge commit despite using a
different parent, we need a list of file changes that specifies the
changes for both pathA and pathB.

Signed-off-by: Elijah Newren <newren@gmail.com>
2019-10-17 18:55:09 -07:00
..
t9390 filter-repo: allow users to adjust pruning of empty & degenerate commits 2019-05-11 13:01:19 -07:00
t9391 filter-repo: add a --state-branch option for incremental exporting 2019-10-17 18:55:09 -07:00
run_coverage filter-repo (python3): convert run_coverage 2019-05-08 08:57:51 -07:00
t9390-filter-repo.sh filter-repo: fix issue with pruning of empty commits 2019-10-17 18:55:09 -07:00
t9391-filter-repo-lib-usage.sh filter-repo (python3): shebang and imports 2019-05-08 08:57:51 -07:00
t9392-python-callback.sh filter-repo (python3): replace strings with bytestrings 2019-05-08 08:57:51 -07:00
test-lib-functions.sh filter-repo: add some basic tests, with git-style test-lib.sh 2019-03-12 14:19:38 -07:00
test-lib.sh filter-repo: add some basic tests, with git-style test-lib.sh 2019-03-12 14:19:38 -07:00