Re: Trouble with case-insensitive filesystems
- From
Jeff King <peff@peff.net>
- Date
- Oct 26, 2007, 16:34 UTC
- Message-ID
- <20071026163450.GA19673@coredump.intra.peff.net>
- In-Reply-To
- <4722064C.1000201@op5.se>
On Fri, Oct 26, 2007 at 05:22:52PM +0200, Andreas Ericsson wrote:
> There are no areas in git to patch. There's no sane way to handle your > case, so the best you could opt for is to import it to a system with > sane case-handling, alter the repo so no two filenames clash, and then > check it out on your case-insensitive filesystem. Note that you'll
You don't need a sane system, since git's index provides one:
# make our new repo without checking anything out git-clone -n /path/to/other/repo repo cd repo
# grab a text representation of what would be checked out git-ls-tree -r HEAD >files # fix up any broken filenames $EDITOR files # and shove it into the index git-update-index --index-info <files
# update your working tree git-checkout-index -a # and optionally save the commit git-commit -m 'broken filenames hack'
Of course, all of the prior commits won't be usable. You would have to repeat this hack on every commit using git-filter-branch for that.
-Peff