Skip to content

Commit

Permalink
Merge branch 'en/update-commit-map-and-ref-map'
Browse files Browse the repository at this point in the history
Instead of overwriting the $GIT_DIR/filter-repo/{commit,ref}-map files
after every run, if someone does filtering in multiple invocations of
git-filter-repo then it is more useful to update these files instead of
overwrite.  Add new datastructures and modify the flow to enable and do
this.

Signed-off-by: Elijah Newren <[email protected]>
  • Loading branch information
newren committed Oct 21, 2024
2 parents 9388cd4 + 0ce7c09 commit f7c7244
Show file tree
Hide file tree
Showing 3 changed files with 622 additions and 71 deletions.
12 changes: 10 additions & 2 deletions Documentation/git-filter-repo.txt
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ OUTPUT
------

Every time filter-repo is run, files are created in the `.git/filter-repo/`
directory. These files are overwritten unconditionally on every run.
directory. These files are updated or overwritten on every run.

Commit map
~~~~~~~~~~
Expand Down Expand Up @@ -421,10 +421,18 @@ Concretely, this means:
and support usecase. You already passed or bypassed the "Fresh Clone"
check on your initial run.

* The commit-map and ref-map files above will be updated rather than
simply rewritten.

In other words, if the first filter-repo invocation rewrote commit
A to commit B, and the second filter-repo invocation rewrite
commit B to commit C, then the second run would have an "A C"
entry rather than a "B C" entry for the changed commit.

However, if the already_ran file exists but is older than 1 day when they
invoke git-filter-repo, the user will be prompted for whether the new run
should be considered a continuation of the previous run. If they do not
answer in the affirmative, then the above bullet will not apply.
answer in the affirmative, then the above two bullets will not apply.
This prompt exists because users might do a history rewrite in a repository,
forget about it and leave the $GIT_DIR/filter-repo directory around, and
then some months or years later need to do another rewrite. If commits
Expand Down
Loading

0 comments on commit f7c7244

Please sign in to comment.