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

Bug fixes #8

Merged
merged 3 commits into from
Feb 27, 2012
Merged

Bug fixes #8

merged 3 commits into from
Feb 27, 2012

Conversation

oleander
Copy link
Contributor

I had some difficulties just getting Gash up and running.
After some debugging I found these buggs.

The commits have been "tested" against a bare gash repo using the following code.

require "gash"
gash = Gash.new("/Users/linus/Desktop/gash.git")
gash["Example"] = "Data"
gash.commit("My commit message")

The example above crashed without the following patches in both Ruby 1.8 and 1.9.

Give me a poke of you want be to add some real tests.
If so, a basic spec skeleton, like I explained in #7 would be awesome.

It's therefore not possble to just run #join on the given object.
Otherwise a 'SystemStackError: stack level too deep' will be raised.
trans added a commit that referenced this pull request Feb 27, 2012
Bug fixes for parent and run_git options.
@trans trans merged commit 13463c8 into judofyr:master Feb 27, 2012
@@ -81,7 +81,7 @@ def tree?; self.class == Gash::Tree end
# Checks if this object has been changed (since last commit).
def changed?; !@sha1 end
# Mark this, and all parents as changed.
def changed!; @sha1 = nil;parent.changed! if parent end
def changed!; @sha1 = nil;parent.changed! if parent and not parent = self end
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't work as intended. not parent = self will always be false.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops. Missed an equal sign.
It should be and not parent == self.

I'll write some specs and fixed it later today.

oleander added a commit to water/gash that referenced this pull request Feb 27, 2012
@oleander oleander mentioned this pull request Feb 27, 2012
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

Successfully merging this pull request may close these issues.

3 participants