dalehenrich / filetree

Monticello repository for directory-based Monticello packages enabling the use of git, svn, etc. for managing Smalltalk source code.
https://github.com/CampSmalltalk/Cypress
MIT License
133 stars 26 forks source link

Git command not found #143

Closed ThierryGoubier closed 9 years ago

ThierryGoubier commented 9 years ago

On some platforms, the git command may not be in the path of the OSProcess commands (for example, git command inside /usr/local/bin and /usr/local/bin not in the default PATH).

Need a way to set additional paths to the git command used by FileTree-Git.

krono commented 9 years ago

This could also fix it on Windows. Have a look at metacello-git which currently works on windows/linux

ThierryGoubier commented 9 years ago

Thanks @krono. I had a look at the metacello-git project some time ago.

ThierryGoubier commented 9 years ago

Solved with a refactoring of the git commands on branch issue_142: commit 6c9598ac08c8f1d7ad891a917e1373da2b241d20

But the settings code is Pharo-specific :(

krono commented 9 years ago

On 10.02.2015, at 23:30, Thierry Goubier notifications@github.com wrote:

Solved with a refactoring of the git commands on branch issue_142: commit 6c9598a

But the settings code is Pharo-specific :(

For Squeak, a Pragma-preference would fit! :)

ThierryGoubier commented 9 years ago

Something like that ?

<preference: 'Git Command Path'
        category: 'monticello'
        description: 'The complete path for the git command, if not in the default PATH and different in name'
        type: #String>

This is interesting. One of the advantages of Pragmas is decoupling for extensions, but, it makes one unable to have a utility class hiding differences between Squeak and Pharo... or at least very hard to.

krono commented 9 years ago

Yes, something like that.

I understand :) We probably can find a way around that. For example, have the preferences in the specific utility implementations.

Like have the accessor for such things on MetacelloPlatform but the actual preferences in MetacelloSqueakPlatform and MetacelloPharoPlatform

ThierryGoubier commented 9 years ago

@krono , does it matter in which method I put the Squeak preference pragma? I would like to add it to the Pharo settings method.

krono commented 9 years ago

You can put it directly in MCFileTreeGitRepository class >>#gitCommand:

gitCommand
    <preference: 'Git Command Path'
        category: 'monticello'
        description: 'The complete path for the git command, if not in the default PATH and different in name'
        type: #String>
    ^ GitCommand ifNil: [ 'git' ]
ThierryGoubier commented 9 years ago

Done in c77e84e04faf2007ec4e1cd196cd634dfd2b6935

Now I can tackle issue #142