Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve installation documentation for Windows users #225

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 25 additions & 2 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 5 additions & 2 deletions git-filter-repo
Original file line number Diff line number Diff line change
Expand Up @@ -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: <old_name:new_name>."))
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 "
Expand Down Expand Up @@ -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"))
Expand Down