This repository was archived by the owner on Sep 11, 2020. It is now read-only.
Closed
Conversation
8bf7713 to
a758a4e
Compare
Signed-off-by: David Pordomingo <David.Pordomingo.F@gmail.com>
a758a4e to
d81bffe
Compare
Contributor
|
Will be nice to add a README to this example to understand how works |
Contributor
Author
|
Would it be enough adding that info to the command itself? Running it wothout no options: with |
Contributor
Author
|
by the way, wdyt @mcuadros about adding the core of this command ( |
Contributor
Author
TODO:
|
Collaborator
|
@mcuadros I think the backing iterators and so on would belong to go-git core, maybe a |
Contributor
Author
|
If you want to see how would it look like I can do it in my next OSD (that hopefully would be next Monday) |
Contributor
Author
|
superseded by:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Command example implementing
git merge-basebehavior, with--is-ancestorand--independentmodifiers.usage:
To offer those features, it was implemented a new walker
filterCommitIter(likebfsCommitIteratorone), and three functionsMergeBase,IsAncestorandIndependents.filterCommitIterMergeBase(first, second *object.Commit) ([]*object.Commit, error)IsAncestor(first, second *object.Commit) (bool, error)Independents(commits []*object.Commit) ([]*object.Commit, error)alternative:
imo the new feature could be part of
go-gititself, instead of being an_example; to do so, I think thatfilterCommitItercould replacebfsCommitIteratoror be moved intogo-git/plumbing/objectpackage, andMergeBase,IsAncestorandIndependentscould be moved intogit.Repositorystruct.If you think it could be feasible as proposed, or with any change, let me know and will work over it during the next OSD 🎉