Search code examples
gitgithubpharo

Pharo GitFileTree SubscriptOutOfBounds when adding a repository


I decided to try some Pharo and found https://www.peteruhnak.com/blog/2016/07/25/how-to-use-git-and-github-with-pharo/.

However, when I try to follow the steps to add a repository, I get an error, whenever I try to do the following:

A file dialog will appear (left new File Dialog, right old Morphic File Dialog). Note that you should navigate into the target directory, so in both images you have to go one level deeper into the repository directory.

I have a local (cloned from github) git repository under ~/development/Pharo/PharoGitTest/ which looks like this:

.git
repository  # folder
  (empty)
.gitignore
LICENSE
README.md
test.md

It makes no difference, when I navigate to one of PharoGitTest or PharoGitTest/repository, in both cases I cannot add the repository to Pharo by clicking OK:

enter image description here

I get the error:

enter image description here

Basically some array seems to be empty but is expected to have at least 1 item:

enter image description here

The result of the git command shown in the code of the 4. stack frame from the top of the stack trace (see the following screenshot)

enter image description here

is:

[12:38:37]:[~/development/Pharo/PharoGitTest]: git rev-parse --is-inside-work-tree
true

and inside the repository subfolder:

[12:39:22]:[~/development/Pharo/PharoGitTest/repository]: git rev-parse --is-inside-work-tree
true

It seems something is broken in the stable version of GitFileTree or the guide I follow is wrong. How can I fix this? I see already other Pharo or Smalltalk projects on Github, but I could not find the right place yet, to post this as an issue of GitFileTree. Maybe it also isn't and I am doing something wrong here.

Additional Info

  • My version of Pharo is: pharo6.1-64, running on Xubuntu 16.04.3.
  • My version of git is: git version 2.7.4.

Solution

  • (written as of September 2017, I should it will be fixed in the future)

    The reason for the error is that underlying library accessing git (OSSubprocess) is not yet supported on 64bit Pharo.

    Therefore the solution is to use 32bit Pharo, as that is still the canonical release.

    As for the gitfiletree itself, the new recommended approach to work with git is to use Iceberg instead https://github.com/pharo-vcs/iceberg .