Skip to content

Add Cherry-pick and Revert functionality to ObjectDatabase #1323

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

Merged

Conversation

jkoritzinsky
Copy link

This PR adds support for cherry-picking and reverting commits using the *_commit functions from libgit2 to allow cherry picking and reverting on a bare repository.

/// </summary>
public virtual MergeTreeStatus Status { get; private set; }
}
}
Copy link
Member

Choose a reason for hiding this comment

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

nit: can we end files with a trailing newline

@jamill
Copy link
Member

jamill commented Jun 1, 2016

I think it would be better if both RevertTreeResult and CherryPickTreeResult contained a consistent status property... Either both use the MergeTreeStatus, or both use RevertTreeStatus and CherryPickTreeStatus respectively... (I think I would opt for the former? as I think the set of possibilities are the same?)

@jamill
Copy link
Member

jamill commented Jun 1, 2016

Thank you @jkoritzinsky for this very nice PR!

@ethomson
Copy link
Member

This looks really good to me. One question: do we need separate *TreeResult classes? It seems like either we should use a single class for this, or that these should inherit from a base class.

@jkoritzinsky
Copy link
Author

We can use a single class, but I am having trouble coming up with a good name. Do you have any suggestions?

@ethomson
Copy link
Member

I, personally, would be okay with using MergeTreeResult, either completely, or just as the base class. But I can understand that this is perhaps a bit of a leaky abstraction. (It's not necessarily obvious that a cherry-pick or a revert is really a funny merge.)

@jamill
Copy link
Member

jamill commented Jun 29, 2016

I, personally, would be okay with using MergeTreeResult

👍

@jkoritzinsky
Copy link
Author

I also like MergeTreeResult. I'll go change it to that.

@ethomson
Copy link
Member

ethomson commented Jul 5, 2016

Great! Can you squash this and I'll merge it? Thanks!

… object database.

Added support for revert in a bare repository.

Updated CanRevertInObjectDatabase to not use a checkout and to just use commit refs.

Changed methods to use `MergeTreeResult` and fixed incorrect name in argument validation.
@jkoritzinsky jkoritzinsky force-pushed the CherryPick-Revert-BareRepository branch from 9e324d7 to d59c673 Compare July 5, 2016 19:46
@jkoritzinsky
Copy link
Author

Squashed!

@ethomson ethomson merged commit 3b99abf into libgit2:master Jul 6, 2016
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