Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should throw errors #2

Closed
ConradIrwin opened this issue Jun 14, 2009 · 5 comments
Closed

Should throw errors #2

ConradIrwin opened this issue Jun 14, 2009 · 5 comments

Comments

@ConradIrwin
Copy link

Trying to do things like

Grit::Repo.new("/path/to/nonbare/repo").git.commit({}, '-a', '-m', 'hello', '-author', 'fred')

fails silently. I had to fire up git to try and work out what the problem could be (in this case a mal-formed author parameter)

@davetron5000
Copy link
Contributor

Grit.debug = true can help figure out what it's doing, but I, too, wouldn't mind errors to be generated. I suspect that git doesn't set useful exit codes, tho

@nirvdrum
Copy link

nirvdrum commented Jan 9, 2010

git does. I think the real problem is the use of popen3, which doesn't capture exit status codes. popen4 does, however, so that may be the way to go.

@floehopper
Copy link

I want to have Grit fail fast by raising an exception if any shell commands have a non-zero exit status. A classic example of this is when you don't have git in your environment's path.

It looks like some work has been done on this - see SHA: 889adf5 - but I can't see how I pass the :raise option into the Grit commands. Am I missing something?

Thanks.

@ohookins
Copy link

I found that while Grit logs problems, something critical like the git tool not being present/found means that Git.init will silently fail but when that passes back to Git::Repo.initialize there is no repository in existance and a misleading exception is thrown.

Let me know if this deserves a separate issue.

kouno pushed a commit to kouno/grit that referenced this issue Oct 3, 2012
further improving performance
@bkeepers
Copy link
Collaborator

bkeepers commented Feb 3, 2014

Grit is no longer maintained. See #183 and check out libgit2/rugged.

@bkeepers bkeepers closed this as completed Feb 3, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants