diff --git a/INSTALL.md b/INSTALL.md index 8e6791ef..621f7816 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -19,8 +19,31 @@ these versions. # Notes for Windows Users -It seems that the default python on Windows is not fully functional, -and windows might not allow executing python scripts by default. See +If you don't do a full blown Python web development on Windows the +best way to install git-filter-repo is to use Python and pip from +[Microsoft +Store](https://docs.microsoft.com/en-us/windows/python/beginners). +Follow these simple steps: + +1. Install Python from Microsoft Store. +2. Run `pip install git-filter-repo` from the Windows Command Prompt. +3. Copy git-filter-repo file from + *%LOCALAPPDATA%\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts* + to the directory pointed to by `git --exec-path`, + + or + + add + *%LOCALAPPDATA%\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts* + to you PATH environment variable. + + The folder above could be different depending on your Python's + version. + +If you have Python installed via +[WSL](https://docs.microsoft.com/en-us/windows/python/web-frameworks) +or from official [Python for Windows +installer](https://www.python.org/downloads/windows/) see [issue 124](https://github.com/newren/git-filter-repo/issues/124), [issue 36](https://github.com/newren/git-filter-repo/issues/36), and [this git mailing list diff --git a/git-filter-repo b/git-filter-repo index 10401e45..ae03111b 100755 --- a/git-filter-repo +++ b/git-filter-repo @@ -1622,7 +1622,10 @@ class FilteringOptions(object): if suffix.startswith('rename'): mod_type = 'rename' match_type = option_string[len('--path-rename-'):] or 'match' - values = values.split(b':', 1) + values = values.split(b':') + if len(values) != 2: + raise SystemExit(_("Error: --path-rename expects one colon in its" + " argument: .")) if values[0] and values[1] and not ( values[0].endswith(b'/') == values[1].endswith(b'/')): raise SystemExit(_("Error: With --path-rename, if OLD_NAME and " @@ -1862,7 +1865,7 @@ EXAMPLES "part of git history, historical versions of the file will " "be ignored; only the current contents are consulted.")) people.add_argument('--use-mailmap', dest='mailmap', - action='store_const', const='.mailmap', + action='store_const', const=b'.mailmap', help=_("Same as: '--mailmap .mailmap' ")) parents = parser.add_argument_group(title=_("Parent rewriting"))