From e834379254ff4d2e89f28b8c902dc710f1571e72 Mon Sep 17 00:00:00 2001 From: Elijah Newren Date: Sat, 16 May 2020 17:46:24 -0700 Subject: [PATCH] filter-repo: clarify usage of --use-base-name fast-export/fast-import only work with filenames (using full path from the root of the repository); thus that's all that filter-repo works with. Full pathnames implicitly include all leading directories as part of the pathname, which is what allows us to match against directories. However, it obviously means --use-base-name can't be used to match paths against directories. Signed-off-by: Elijah Newren --- Documentation/git-filter-repo.txt | 3 ++- git-filter-repo | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Documentation/git-filter-repo.txt b/Documentation/git-filter-repo.txt index bc0652b..6c3ae7a 100644 --- a/Documentation/git-filter-repo.txt +++ b/Documentation/git-filter-repo.txt @@ -106,7 +106,8 @@ Filtering based on paths (see also --filename-callback) --use-base-name:: Match on file base name instead of full path from the top of - the repo. Incompatible with --path-rename. + the repo. Incompatible with --path-rename, and incompatible + with matching against directory names. Renaming based on paths (see also --filename-callback) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/git-filter-repo b/git-filter-repo index 476cfcf..a7eca70 100755 --- a/git-filter-repo +++ b/git-filter-repo @@ -1777,7 +1777,8 @@ EXAMPLES "paths")) path.add_argument('--use-base-name', action='store_true', help=_("Match on file base name instead of full path from the top " - "of the repo. Incompatible with --path-rename.")) + "of the repo. Incompatible with --path-rename, and " + "incompatible with matching against directory names.")) rename = parser.add_argument_group(title=_("Renaming based on paths " "(see also --filename-callback)"))