WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: How do I get git working? [ resolved ]  (Read 3501 times)

Offline upstream

  • Newbie
  • *
  • Posts: 6
How do I get git working? [ resolved ]
« on: September 11, 2012, 05:24:35 AM »
I've installed git with ab for a command line installatation, but it doesn't do anything.  I've tried git config and git init and git help and maybe a few others, but it just returns back to the command line without any error message at all.
I've snooped around on the system and found a bunch of git-like commands in /usr/local/libexec/git-core, and these seem to work.
So, my question is, what can I do to get git working like it should?

Thanks very much.
Upstream
« Last Edit: September 11, 2012, 10:22:03 AM by upstream »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11256
Re: How do I get git working?
« Reply #1 on: September 11, 2012, 06:21:22 AM »
Hi upstream
The info file mentions:
Quote
Some modes of operation require perl, curl and expat extensions.

Offline upstream

  • Newbie
  • *
  • Posts: 6
Re: How do I get git working?
« Reply #2 on: September 11, 2012, 07:42:59 AM »
Thanks Rich, for your response.

I've installed perl, curl, and expat extensions, and it still isn't working.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11256
Re: How do I get git working?
« Reply #3 on: September 11, 2012, 08:32:33 AM »
Hi upstream
Seems a bit odd you don't at least get an error message. Try this:
Code: [Select]
git
dmesg | tail
See if any git related errors are logged. I that doesn't show anything useful, reboot and use the  syslog  boot code.
Then try:
Code: [Select]
git
tail /var/log/messages
and see if that produces anything useful.

Offline upstream

  • Newbie
  • *
  • Posts: 6
Re: How do I get git working?
« Reply #4 on: September 11, 2012, 10:21:14 AM »
Thanks Rich.
There is nothing new on dmesg, and there is nothing in /var/log except wtmp and autologin.

I solved the problem, by adding git to onboot.lst
I guess it just wasn't meant to work ondemand.

I first managed to get it working, by adding /usr/local/libexec/git-core/ to my $PATH with:

PATH=/usr/local/libexec/git-core/:$PATH

Strange thing though, even if I set PATH back to it's original, git still continued to work, until I reboot.

So, I added it to my onboot.lst and restarted.  That solved my problem.

Thanks for your help,
Upstream


Offline althalus

  • Sr. Member
  • ****
  • Posts: 351
Re: How do I get git working? [ resolved ]
« Reply #5 on: September 11, 2012, 06:22:09 PM »
Ondemand and CLI applications have never really worked well together. Since the ondemand feature depends on a .desktop file to run the application, and most cli apps don't have .desktop files, the script loads the extension, but DOESNT run the CLI application. Your shell caches your PATH, so it "knows" where to find git, and it's the ondemand script. Run "hash -r" after running git, and it then finds the "right" git.

If that makes any sense.


A thought: Maybe the ondemand script should automatically assume an extension without a .desktop file to parse is a cli app, and run "hash -r" as the command?

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: How do I get git working? [ resolved ]
« Reply #6 on: September 11, 2012, 06:26:05 PM »
The ondemand script would be running hash -r in its own environment.
That would do you no good.

Offline althalus

  • Sr. Member
  • ****
  • Posts: 351
Re: How do I get git working? [ resolved ]
« Reply #7 on: September 11, 2012, 06:45:46 PM »
The ondemand script would be running hash -r in its own environment.
That would do you no good.
You're right, of course. If it was that simple, someone else would have already suggested it. Next time, more coffee before posting!

Offline upstream

  • Newbie
  • *
  • Posts: 6
Re: How do I get git working? [ resolved ]
« Reply #8 on: September 12, 2012, 06:13:10 AM »
Thanks Gerald and althalus, that explains a lot, and now I know that, I can make git ondemand again.

Upstream