Coder Social home page Coder Social logo

Library doesn't work on FreeBSD about git.php HOT 10 OPEN

kbjr avatar kbjr commented on June 14, 2024
Library doesn't work on FreeBSD

from git.php.

Comments (10)

josh4trunks avatar josh4trunks commented on June 14, 2024

@kbjr Could Git.php instead use protected static $bin = 'git';?
This way systems with proper PATH set for PHP would find git even if it isn't the currently hardcoded /usr/bin/php.

We could then also remove the windows_mode() function since this would be the default. And by leaving the set_bin() function, programs who want to specify a git path that wouldn't normally be found by PHP could still do so.

If you agree with this proposal I can submit a Pull Request. What do you think?

from git.php.

kbjr avatar kbjr commented on June 14, 2024

I haven't worked on this project for a long time, I don't remember most of the details. That said, I do remember that there was a reason why I hard coded that path, I ran into some issue trying to use just git.

from git.php.

andrevanzuydam avatar andrevanzuydam commented on June 14, 2024

My five cents guys, how about a file_exists check to see where git is on a
system based on the system type and one assumes the defaults. So an array
of default paths for Linux , Windows, MacOS then a simple check to see
whether any of those are there producing the path where the binary is found

On Fri, May 13, 2016 at 2:50 AM, James Brumond [email protected]
wrote:

I haven't worked on this project for a long time, I don't remember most of
the details. That said, I do remember that there was a reason why I hard
coded that path, I ran into some issue trying to use just git.


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#47 (comment)

[image: --]

Andre van Zuydam
[image: https://]about.me/andrevanzuydam
https://about.me/andrevanzuydam?promo=email_sig&utm_source=email_sig&utm_medium=email_sig&utm_campaign=external_links

[image: http://www.daniweb.com/profiles/1108517/Andre-van-Zuydam]
http://www.daniweb.com/profiles/1108517/Andre-van-Zuydam

[image: https://www.openhub.net/accounts/75973?ref=Detailed]
https://www.openhub.net/accounts/75973?ref=Detailed

from git.php.

josh4trunks avatar josh4trunks commented on June 14, 2024

@kbjr thanks for the reply, that's what I figured based on the commit history.

It looks like the hardcoded /usr/bin/git path has been there since the beginning.

protected $git_path = '/usr/bin/git';

Maybe it was because your PHP didn't have a proper environmental PATH set?

from git.php.

josh4trunks avatar josh4trunks commented on June 14, 2024

@andrevanzuydam This would require Git.php have all the possible/common paths hardcoded. Or the program calling Git.php could have this logic instead.

I'd personally prefer just calling 'git' and relying on person deploying their app to have a proper PATH set. And an app could always call a different git path specifically with the set_bin() function.

from git.php.

josh4trunks avatar josh4trunks commented on June 14, 2024

My proposal is here #48

from git.php.

kevinlekiller avatar kevinlekiller commented on June 14, 2024

Can we please get this merged? It's been a long standing issue (there are closed issues about this going back to 2012).

Thanks.

from git.php.

josh4trunks avatar josh4trunks commented on June 14, 2024

@kbjr if you'd rather not bother with fixes to this project, maybe there is a fork you could recommend?

thanks

from git.php.

kevinlekiller avatar kevinlekiller commented on June 14, 2024

This fork seems the most active: https://github.com/coyl/git

from git.php.

josh4trunks avatar josh4trunks commented on June 14, 2024

yeah, looks like alot of recent commits there. feel free to duplicate this PR over there, or when I get a chance I can do so

from git.php.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.