FredrikNoren / ungit

The easiest way to use git. On any platform. Anywhere.
MIT License
10.43k stars 636 forks source link

git "Error: Command failed: Unknown option: -c" #146

Closed jklewa closed 10 years ago

jklewa commented 11 years ago

Navigate to http://localhost:8448/#/repository?path=%2Fmypath%2Fblah%2ungit

I see "Whooops Something went wrong, reload the page to start over."

And this api call

http://localhost:8448/api/status?path=%2Fmypath%2Fblah%2Fungit

returns this error message:

{
  "errorCode": "unknown",
  "command": "git -c color.ui=false status -s -b -u",
  "error": "Error: Command failed: Unknown option: -c\nusage: git [--version] [--exec-path[=GIT_EXEC_PATH]] [--html-path]\n           [-p|--paginate|--no-pager] [--no-replace-objects]\n           [--bare] [--git-dir=GIT_DIR] [--work-tree=GIT_WORK_TREE]\n           [--help] COMMAND [ARGS]\n",
  "stderr": "Unknown option: -c\nusage: git [--version] [--exec-path[=GIT_EXEC_PATH]] [--html-path]\n           [-p|--paginate|--no-pager] [--no-replace-objects]\n           [--bare] [--git-dir=GIT_DIR] [--work-tree=GIT_WORK_TREE]\n           [--help] COMMAND [ARGS]\n",
  "stdout": ""
}
Ajedi32 commented 11 years ago

It looks like you need to update git. What version are you using right now? (git --version)

Although, if a specific version of git is required for ungit to work properly that should definitely be noted in the documentation somewhere.

jklewa commented 11 years ago
$ git --version
git version 1.7.1

It looks like I do need to update git, the current version is 1.8.3.4 I believe.

Edit: Version 1.7.1 is the "current" version in yum on centos 6.4. I guess I'll be updating to git 1.8.3.4 by installing it from its source.

mnlfischer commented 11 years ago

same problem here! I have the version 1.8.3 and get this message when I try to commit the first document.

FredrikNoren commented 11 years ago

@manuuu- Hm that's really strange, I'm running 1.8.3 here too. If you just type git and hit enter it should show some available options, is -c not one of them?

@jklewa Yeah that's the easy solution right now. I'll try and see if I can make it work with git 1.7 when I have time

FredrikNoren commented 10 years ago

As it looks now I don't think it will be realistic for me to try to add 1.7 support (just to much other stuff that needs to be done). If someone else wants to do it I'd be happy to review and merge, but I'm closing this ticket at least as it's not likely to be supported.