Add bindings for git_graph_* methods #173
Loading…
Reference in New Issue
No description provided.
Delete Branch "add/graph-methods"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This adds support for
git_graph_ahead_behind
andgit_graph_descendant_of
respectively wrapped asRepository.GraphAheadBehind
andRepository.GraphDescendantOf
.I think we could do without the "Graph" prefix.
Repository.AheadBehind()
etc does not loose any information.@carlosmn I considered that, but I ended up thinking that it was probably best to stick to
libgit2
's naming convention to avoid any confusion.For example: https://github.com/libgit2/libgit2/issues/1440, there was a discussion about implementing
git_ahead_behind
that returns a list of commits instead of a number, etc ...If the prefix is unnecessary/redundant, shouldn't the decision to strip it be made at the
libgit2
level andgit2go
should reflect whatever happens there ?Either way, I can strip the prefix if you think that's best.
Edit: I'm mistaken, they were suggesting to keep the
git_graph_ahead_behind
name@carlosmn Voila, I removed the
Graph
prefix.ahead-behind (or left-right in git parlance) isn't a first-class object. It's a question you ask of a pair of commits, so it doesn't get its own namespace. It doesn't fit in the
git_repository
namespace because it's not about the repository, so it was shoved to "graph".But in OO syntax, the receiver is the thing you take as source or destination of data, so in the other bindings, it's gone directly there.