git submodule add broken (2.11.0-rc1): Cannot open git-sh-i18n

2 messages, 2 authors, 2016-11-07 · open the first message on its own page

git submodule add broken (2.11.0-rc1): Cannot open git-sh-i18n

From: Anthony Sottile <hidden>
Date: 2016-11-07 17:27:16

Noticed as part of my automated tests here:
https://travis-ci.org/pre-commit/pre-commit/jobs/173957051

Minimal reproduction:

rm -rf /tmp/git /tmp/foo /tmp/bar
git clone git://github.com/git/git --depth 1 /tmp/git
pushd /tmp/git
make -j 8
popd
export PATH="/tmp/git:$PATH"
git init /tmp/foo
git init /tmp/bar
cd /tmp/foo
git submodule add /tmp/bar baz

Output:

$ rm -rf /tmp/git /tmp/foo /tmp/bar
$ git clone git://github.com/git/git --depth 1 /tmp/git
Cloning into '/tmp/git'...
remote: Counting objects: 3074, done.
remote: Compressing objects: 100% (2735/2735), done.
remote: Total 3074 (delta 249), reused 1871 (delta 215), pack-reused 0
Receiving objects: 100% (3074/3074), 6.38 MiB | 905.00 KiB/s, done.
Resolving deltas: 100% (249/249), done.
Checking connectivity... done.
$ pushd /tmp/git
/tmp/git /tmp
$ make -j 8
GIT_VERSION = 2.11.0-rc0

... lots of make output ...

$ popd
/tmp
$ export PATH="/tmp/git:$PATH"
$ git init /tmp/foo
warning: templates not found /home/asottile/share/git-core/templates
Initialized empty Git repository in /tmp/foo/.git/
$ git init /tmp/bar
warning: templates not found /home/asottile/share/git-core/templates
Initialized empty Git repository in /tmp/bar/.git/
$ cd /tmp/foo
$ git submodule add /tmp/bar baz
/tmp/git/git-submodule: 46: .: Can't open
/home/asottile/libexec/git-core/git-sh-i18n
$ echo $?
2


Thanks

Anthony

Re: git submodule add broken (2.11.0-rc1): Cannot open git-sh-i18n

From: Stefan Beller <hidden>
Date: 2016-11-07 17:56:26

    $ git --version
    git version 1.8.5.6
    $ if [ "$LATEST_GIT" = "1" ]; then
    ...
         export PATH="/tmp/git:$PATH"
     fi
    ....
    make -j 8
    ...
    $ git --version
    git version 2.11.0-rc0

So you compile 2.11.0-rc0 yourself, but you do not install it, instead
the $PATH is pointed to /tmp/git instead, however the later calls fail with:

    Can't open /home/travis/libexec/git-core/git-sh-i18n

which is where 1.8.5.6 is installed.

So you're running into an internationalization problem
between 2 very different versions of Git (1.8 seems to be ancient)

Not sure if i can offer advice except from
"Don't do that, instead install Git properly". ;)

Thanks,
Stefan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help