newren / git-filter-repo

Quickly rewrite git repository history (filter-branch replacement)
Other
8.55k stars 708 forks source link

--paths-from-file only works with directories #583

Closed JonathonReinhart closed 4 months ago

JonathonReinhart commented 4 months ago

I ran git filter-repo --paths-from-file ../keep.txt where keep.txt has a list of file paths, and the result was only the initial (empty) commit from the repo.

When I put directory paths in keep.txt, those are kept in the history.

If I manually --path for each of the exact same strings, it works as expected.

Version

$ git filter-repo --version
ae71fad1d03f

Also happens on current HEAD:

~/code/github/git-filter-repo/git-filter-repo --version
3dfe55696f34
JonathonReinhart commented 4 months ago

Oops. Somehow when I produced my input file, there was a trailing space on each line, i.e. (_ for space):

foo_
bar_

Sorry for the false alarm!