Comments (4)
FileChange expects information about the contents that the file is going to have, not what it used to have. Since a deleted file has no hash or mode, those should not be passed. (You may also want to check out the fast-import documentation, which shows that for filemodify it needs the M character, the filename, the mode, and the hash, but for filedelete it only needs the D character and the filename; filter-repo is basically just glue between fast-export and fast-import allowing you to quickly set up the needed fast-import stream.) But what's worse here is that you decided to pass the hash as the second object to the FileChange constructor; that's rather perplexing. No example does that, neither for deleted nor modified files. And if you check out the function signature, indeed the filename is always expected to be the second parameter.
It is hard to catch all mistakes, but the few places where it is easy I have assertions in the code. If the code dies with an AssertionError that is directly in git-filter-repo source, as has happened here, then you've violated a basic assumption. The traceback will even tell you the line number, e.g. line 583 here. (And if you want more context, the previous line shows in what function and line the code was at before it called the function that had the assertion error. And the line before that shows where that function was called, and so on.)
Anyway, hope that explanation helps you not only fix this issue but understand a little bit how to debug and work out other issues.
from git-filter-repo.
i am sorry to waste your time , in any way thanks for all your explanation.
from git-filter-repo.
Sorry if I came across as short; didn't mean to. Maybe a side-effect of waking up sick this morning.
from git-filter-repo.
Hope you feel better
just wanted to thank you for a great tool
compared to filter branch
### filter-repo is 105X faster
Big Repo 11GB
125000 commits
Add files to commits
Filter-Repo ~ 1000Sec
Filter-Branch ~ 105000Sec
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
- 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 1
- lint-history: --refs argument not working at all
- Test suite succedes with Python 3.11 but has multiple failures with Python 3.12 HOT 4
- 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
- clean-ignore of filter-repo-demos does not handle utf-8 characters
- 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.