git-filter-repo/t
Elijah Newren df6c8652a2 filter-repo: fix ugly bug with mixing path filtering and renaming
There's also a fix in here to make sure to throw an error if users are
trying to rename paths and use --invert-paths; it's not clear at all
what that would even mean.  But that also becomes important later...

Due to the ability to either filter wanted paths (default), or to just
specify unwanted paths (with --invert-paths), I keep a special
args.inclusive variable to track whether a "match" means we want the
path or not.  There are some special cases, notably when there are no
filters present (meaning e.g. no --path specifications, at most there
are some --path-rename values provided).  When there are no filters
present, that means we should keep paths even if we don't "find a match"
against any of the filters.

Now, since the rename code was embedded in the same loop as the filter
checks, it unfortunately was also being checked against the
args.inclusive setting despite never setting whether it found a match.
That happened to work in the special case that there were no filtering
paths but only because of the special logic for that case.  Since
renaming only makes sense if --invert-paths is not specified, any path
we rename is one we always want to keep.  Make sure we do.

Reported-by: Nadège (@nagreme on GitHub)
Signed-off-by: Elijah Newren <newren@gmail.com>
2020-05-25 12:35:34 -07:00
..
t9390 filter-repo: add new --no-ff option 2020-01-01 10:49:56 -08:00
t9391 filter-repo: consistently use bytestrings for directory names 2019-10-21 09:09:23 -07:00
run_coverage run_coverage: prefer coverage3 to python3-coverage 2019-11-21 16:19:26 -08:00
t9390-filter-repo.sh filter-repo: fix ugly bug with mixing path filtering and renaming 2020-05-25 12:35:34 -07:00
t9391-filter-repo-lib-usage.sh filter-repo: use more expensive prunability checks when needed 2020-03-23 14:55:07 -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