Skip to contentSkip to conversation

contrib/mw-to-git/Git/Mediawiki.pm

DISCUSSION Torsten Bögershausen 4 participants 7 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

I just discovered a major problem for
Mac OS and Windows people:

In contrib/mw-to-git/ there is a file called "git". And there is a directory called "Git".

This does not work very well on case insensitive file systems. When the file "git" is created, we can not create a directory called "Git", as "Git" is mapped to "git".
And vice versa.

Can we try to rename one of them ?

The other interesting thing is that git 1.8.3 didn't like the situation:
After checking out the pu branch,
git status says:
deleted: contrib/mw-to-git/Git/Mediawiki.pm

So I could not change to another branch/commit...
git stash didn't resolve the situation either.

The following saved my repo:
git mv contrib/mw-to-git/git contrib/mw-to-git/git.exe git checkout contrib/mw-to-git/Git/Mediawiki.pm git checkout -b xxx_git_Git_conflict
git commit -a -m xxx_git_Git_conflict

/Torsten

#1 lore raw

Oops, so sorry :/

It's defintely doable since the lowercase 'git' is only a bin-wrapper for git to ease development in contrib/mw-to-git/ .

Junio, Matthieu : should I resend a new version of my serie which renames the 'git' (lowercase) file into something like 'git-dev' ? (some comments directly mentionning the 'git' (lowercase) file needs to be updated as well in the Makefile)

Benoit

#2 lore raw
Quoted 4 lines · Benoît Person

Oops, so sorry :/

It's defintely doable since the lowercase 'git' is only a bin-wrapper for git to ease development in contrib/mw-to-git/ .

Hmph. Does it even need to be in-tree then? Is it insufficient to run ../../git from that directory instead?

Quoted 6 lines

Junio, Matthieu : should I resend a new version of my serie which renames the 'git' (lowercase) file into something like 'git-dev' ? (some comments directly mentionning the 'git' (lowercase) file needs to be updated as well in the Makefile)

Benoit

#3 lore raw
In reply to Benoît Person
Quoted 2 lines · Benoît Person

Junio, Matthieu : should I resend a new version of my serie which renames the 'git' (lowercase) file into something like 'git-dev' ?

I'd call it bin-wrapper/git, so that people can put bin-wrapper/ in their $PATH if needed, and by analogy with ../../bin-wrapper. If you go this way, don't forget to update the $0 relative paths.

git-dev is OK with me too.

Quoted 2 lines

(some comments directly mentionning the 'git' (lowercase) file needs to be updated as well in the Makefile)

Yes.

Signature · 2 lines
Matthieu Moy
http://www-verimag.imag.fr/~moy/
#4 lore raw
Quoted 9 lines · Matthieu Moy
Quoted 2 lines · Benoît Person

Junio, Matthieu : should I resend a new version of my serie which renames the 'git' (lowercase) file into something like 'git-dev' ?

I'd call it bin-wrapper/git, so that people can put bin-wrapper/ in their $PATH if needed, and by analogy with ../../bin-wrapper. If you go this way, don't forget to update the $0 relative paths.

Quoted 6 lines

git-dev is OK with me too.

Quoted 2 lines

(some comments directly mentionning the 'git' (lowercase) file needs to be updated as well in the Makefile)

Yes.

I just noticed that the script is not strictly a text file, ending with an incomplete line, by the way.

#5 lore raw
Quoted 2 lines

Hmph. Does it even need to be in-tree then? Is it insufficient to run ../../git from that directory instead?

Well, the fact is we use Perl packages now (Git.pm and Git::Mediawiki.pm in contrib/mw-to-git/Git/). The way we build perl scripts in the toplevel's Makefile makes those packages accessible only in $GITPERLLIB if it's defined and defaults to $INSTLIBDIR to seek for installed version of those packages.

We use a bin-wrapper to define that $GITPERLLIB variable so that the installed version gets bypassed by the one presents in the directory defined in $GITPERLLIB.

Quoted 2 lines

I just noticed that the script is not strictly a text file, ending with an incomplete line, by the way.

an incomplete line ?