Comments (3)
@newren: Thank you so much for the prompt response and the pointers. I really should have done the due diligence of upgrading each of my distributions before reporting this.
At this point, everything is working perfectly. It's really a remarkable tool. I previously used various calls to git-filter-branch
to accomplish this type of functionality, and have run into nearly every issue the Git documentation warns about at one time or another. Thank you so much for creating this!
In the end, there turned out to be three different issues that colluded together to make this a bit harder to troubleshoot. These seem a bit silly now that I've isolated them, but I'm going to leave them here in case they help anyone else reading this in the future:
- Microsoft has introduced a "feature" into Windows so that there's a stub of Python built into the operating system that provides a message on how to download Python. This means that nearly any path that ends in e.g.
python
,python3
, orpython3.exe
will not throw an exception, even if it's not being picked up by the actual Python interpreter. - When executing
git-filter-repo
—or any call that ends up getting captured by the Python stub—from the normal PowerShell environment, however, the above messages are not displayed. This is why I was getting no error, no response. - I have been unable to get any variation of
#!
paths to be accepted when called from my PowerShell or git bash environments—even when I'm quite confident that the path format and location are correct. That meant all requests were either failing, or getting intercepted by the Python stub.
When combined together, those three issues meant that I would get an error if I put in an obviously incorrect or malformed path, but wouldn't get an error if I put in a valid path that ended in python
or python3
—regardless of whether or not it was a correct path. With the first issue resolved, I'm able to see the error yielded from the third issue:
fatal: 'filter-repo' appears to be a git command, but we were not able to execute it. Maybe git-filter-repo is broken?
That said, if I run git-filter-repo
from my Anaconda PowerShell Prompt, everything works swimmingly! Indeed, it works right out of the box using your normal distribution without needing to modify the shebang at all, as the Anaconda distribution includes aliases to handle e.g. /usr/bin/env/ python3
.
I'm not entirely sure why this won't execute in the normal PowerShell or git bash. Part of the issue is that I don't have Python in my path, as I normally use it from iPython or the Anaconda PowerShell Prompt. That said, it should accept a fully-qualified path pointing to the Python interpreter; I'm not sure what's going on there, but am going to assume PEBCAK.
Thank you again for both your help as well as writing this tool.
from git-filter-repo.
git 2.16.1 doesn't have the necessary facilities to work with filter-repo; you should be running into this line of code:
if b'--combined-all-paths' not in output:
raise SystemExit(_("Error: need a version of git whose diff-tree "
"command has the --combined-all-paths option"))
I would assume that any string that it doesn't find a translation for it would just return the original and then output it, but I've not heard of anyone else failing to get any output so I am wondering if something is going awry with translations.
Without access to the system or more messages or something, it'll be hard for me to debug. But I'd start by either removing the call to the '_' function (just remove the underscore) and see if you get an error message, check for any special environment variables, and upgrade your git version to one that is supported once you do get error messages. Hope that helps you at least get started.
from git-filter-repo.
I'm glad it's working for you now. Thanks for the kind words, and the explanation of what you found on your end which might just help someone else if they hit something similar and search through the issues for similar keywords.
from git-filter-repo.
Related Issues (20)
- Update submodule hashes?
- Renaming paths into pre-existing path causes double-nested paths (sometimes)
- Keep last 3 months of package-lock.json diffs only HOT 1
- Question: prune lfs files
- remark: Pity that this tool can't run scripts/programs and it is not clearly stated HOT 1
- minor: Logic error with `_commits_referenced_but_removed` on a GitHub Gist web url in commit message 😂
- Crash when path contains emoji HOT 1
- Question: Recommended way to log the usage of git filter-repo and related changes? HOT 1
- Callback that gives both filename and blob
- Breaking change in git 2.43 or 2.44 HOT 2
- lint-history: --refs argument not working at all HOT 1
- Test suite succedes with Python 3.11 but has multiple failures with Python 3.12 HOT 7
- Turns out my assumption was wrong: `git lfs migrate export --everything --include="*"` does rewrite the whole history, across all branches, reinjecting all the large files' consecutive versions ([see here](https://github.com/git-lfs/git-lfs/issues/910#issuecomment-551566315)). Awesome! HOT 1
- Support for SHA256
- FR: Filter into new repo HOT 1
- clean-ignore of filter-repo-demos does not handle utf-8 characters HOT 1
- Trouble with Lock File HOT 1
- Really-43e2c HOT 2
- > main HOT 1
- Renaming path and then renaming it back to the original name deletes path rather than renaming it HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from git-filter-repo.