Comments (7)
Okay, I added '-c core.ignorecase=false' to the command line for the git fast-import invocation, which should prevent anyone else from running into this issue (well, assuming they're using a the version from master or some future release of filter-repo).
Thanks for the detailed report, @m4tiz5zktonj !
from git-filter-repo.
Yeah, that's what I expected. When you clone a repository, git attempts to check if the filesystem is case-insensitive and sets that config value at clone time for the local repo accordingly.
It looks like git in config.c sets ignore_case based on the setting of core.ignoreCase, and then fast-import.c uses fspathncmp() to compare entries, which when ignore_case is true translates to strncasecmp(). That means fast-import is treating two files within a single commit as the same file. fast-export will emit both a delete-old-file and create-new-file-with-same-contents directive (likely in alphabetical order of the filenames) whenever it sees a rename, but fast-import is basically ignoring whichever of those directives came first since it treats them as the same file and considers the second as an override.
Can you try unsetting the local setting of core.ignoreCase (git config --unset core.ignoreCase
), then running filter-repo, then setting core.ignoreCase again (git config core.ignoreCase true
)?
from git-filter-repo.
What's the output of git config core.ignorecase
? I wonder if I need to override that and set it to false...
from git-filter-repo.
$ git config --local core.ignoreCase
true
$ git config --global core.ignoreCase
<empty output>
I haven't changed it so it falls back to default values for git
installation and for .git
folder template for new repositories.
from git-filter-repo.
Yes, you're right.
With unset core.ignoreCase
everything works fine on test repo: tree
is the same and git log
is correct.
On my real giant repo everything seem OK too, at least tree
as I expected has not changed and history of several problematic files looks normal.
Thank you very much!
from git-filter-repo.
Would be great to add this to the manual or readme. Or even embed to the script.
I am using git-filter-repo as part of migration of two android repositories to the monorepo. Had an issues with project building on CI server (hosted on Linux) while it was running fine on my local machine (Mac OS). Had to spend almost two days to figure out that somewhere in the middle directory name was upper case while it is lowercase in the original repo.
from git-filter-repo.
Would be great to add this to the manual or readme. Or even embed to the script.
I am using git-filter-repo as part of migration of two android repositories to the monorepo. Had an issues with project building on CI server (hosted on Linux) while it was running fine on my local machine (Mac OS). Had to spend almost two days to figure out that somewhere in the middle directory name was upper case while it is lowercase in the original repo.
Sorry that insane broken-by-design filesystems caused you so much pain, it's a pity we can't just get rid of those and instead have to waste so many engineering cycles working around them. But, since they won't be going away, it does make sense to try to work around them where practical. Anyway, embedding the workaround in git-filter-repo is precisely the plan; this issue was left open as a reminder to do that.
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.