mirror of
https://github.com/newren/git-filter-repo.git
synced 2024-11-07 09:20:29 +00:00
6a6d21aff5
fast-import syntax declares how to specify the parents of a commit with 'from' and possibly 'merge' directives, but it oddly also allows parents to be implicitly specified via branch name. The documentation is easy to misread: "Omitting the from command in the first commit of a new branch will cause fast-import to create that commit with no ancestor." Note that the "in the first commit of a new branch" is key here. It is reinforced later in the document with: "Omitting the from command on existing branches is usually desired, as the current commit on that branch is automatically assumed to be the first ancestor of the new commit." Desirability of operating this way aside, this raises an interesting question: what if you only have one branch in some repository, but that branch has more than one root commit? How does one use the fast-import format to import such a repository? The fast-import documentation doesn't state as far as I can tell, but using a 'reset' directive without providing a 'from' reference for it is the way to go. Modify filter-repo to understand implicit 'from' commits, and to appropriately issue 'reset' directives when we need additional root commits. Signed-off-by: Elijah Newren <newren@gmail.com> |
||
---|---|---|
.. | ||
t9390 | ||
t9391 | ||
run_coverage | ||
t9390-filter-repo.sh | ||
t9391-filter-repo-lib-usage.sh | ||
t9392-python-callback.sh | ||
test-lib-functions.sh | ||
test-lib.sh |