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

Add amend commit convenience function #645

Merged
merged 10 commits into from
Jul 21, 2015
Merged

Add amend commit convenience function #645

merged 10 commits into from
Jul 21, 2015

Conversation

smith-kyle
Copy link
Contributor

The convenience function extends the original commit amend to accepts a tree object or a treeOid.
Also included is a test for the new commit amend function.

When testing the new function we noticed that the add commit test did not reset the head to the previous commit upon completion of the test. We modified that test to do so. This caused the "can diff with a null tree" test to fail since it was expecting 85 patches and resetting the commit test brought the number of patches to 84. We modified the test to expect the correct number of patches.

@johnhaley81
Copy link
Collaborator

@tbranyen do you know why it can't hit http://git.tbranyen.com/smart/site-content ? Getting a 502.

@tbranyen
Copy link
Member

@johnhaley81 Not sure why it was failing before, but I just started my Node server and it seems to be cloning fine for me.

  -Added convenience method to commit.amend
  -Made some amend arguments optional
The expected commit hash had to change after changing the
commit message.
This was done to have consistent hashes between
running all tests sequentially and running
a single test
Also decremented the number of expected patches within a diff
test to accommodate for the reset
johnhaley81 added a commit that referenced this pull request Jul 21, 2015
Add amend commit convenience function
@johnhaley81 johnhaley81 merged commit 5932ac5 into nodegit:master Jul 21, 2015
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.

None yet

3 participants