Comments (10)
@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.
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.
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.
@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.
Line 73 in f7c5235
Maybe it was because your PHP didn't have a proper environmental PATH set?
from git.php.
@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.
My proposal is here #48
from git.php.
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.
@kbjr if you'd rather not bother with fixes to this project, maybe there is a fork you could recommend?
thanks
from git.php.
This fork seems the most active: https://github.com/coyl/git
from git.php.
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)
- error HOT 2
- Array to string conversion HOT 1
- Concurrent handle ?
- How do I set up a sshkey Like this
- Bypass of PHP issue
- Fatal error: Uncaught exception 'Exception' with message 'error: unable to unlink
- On commit not finding use.name nor user.email HOT 2
- 0
- Add this library to Packagist please. HOT 2
- empty Exception thrown HOT 3
- Push where upstream branch does not exist
- Host key verification failure HOT 1
- Line 333 throws error on "config --get alias.example"
- PHP hanging indefinitely due to stream_get_contents HOT 2
- fetch error
- Git Pull/Push error HOT 1
- Thrown ConsoleException when git command returns nothing HOT 1
- Composer 2.0 package-name // Uppercase name will error
- Update library in Packagist
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from git.php.