You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Augment getTagByName to include getReferenceCommit #403
is it just me, or are all of the getTagByName/getTag/GetBranch/getReference/getBranchCommit methods a bit inconsistant. Seems like they should be normalized a bit, so they all have a getType/getTypeByName/getTypeCommit/getTypeCommitByName variant.
as it stands, getTagByName doesn't need to include getReferenceCommit, since the things returning commits are named get{type}Commit, not get{type}.
I'll set about normalizing them all a bit, if nobody has any complaints.
is it just me, or are all of the
getTagByName/getTag/GetBranch/getReference/getBranchCommit methods a bit
inconsistant. Seems like they should be normalized a bit, so they all have
a getType/getTypeByName/getTypeCommit/getTypeCommitByName variant.
—
Reply to this email directly or view it on GitHub #403 (comment).
So a bit of an oddity here, we have to remember that "tags" are annotated tags, which are different from lightweight tags, which are what you usually think of when saying tag. Lightweight tags, references in general, branches etc don't have "oids" per se, just the targets and names. Only annotated tags have oids, because they exist inside of the object db. Annotated tags can also point to like, pretty much whatever you want. Do we want to rename tags (in the sense of annotated tags) to annotatedTag to make things clear?
That way tag can just be for normal tags, like one would expect.
I don't know about this. That would be a pretty serious deviation from how we have historically done things with libgit2 (i.e. don't rename groups/classes). I like your previous method more.
Yeah, just the previous method doesn't exactly make sense, TBH, since only annotated tags have an oid of their own. I suppose we could do getBranch/getBranchCommit/getReference/getReferenceCommit/getTag/getTagCommit, and for any of those if the ref doesnt point at a commit, just return undefined? or try grabbing it and let the chain error out?
Activity
maxkorp commentedon Feb 19, 2015
is it just me, or are all of the getTagByName/getTag/GetBranch/getReference/getBranchCommit methods a bit inconsistant. Seems like they should be normalized a bit, so they all have a getType/getTypeByName/getTypeCommit/getTypeCommitByName variant.
as it stands, getTagByName doesn't need to include getReferenceCommit, since the things returning commits are named get{type}Commit, not get{type}.
I'll set about normalizing them all a bit, if nobody has any complaints.
johnhaley81 commentedon Feb 19, 2015
Yeah that's a great idea.
On Thu, Feb 19, 2015, 9:58 AM Max Korp [email protected] wrote:
maxkorp commentedon Feb 19, 2015
So a bit of an oddity here, we have to remember that "tags" are annotated tags, which are different from lightweight tags, which are what you usually think of when saying tag. Lightweight tags, references in general, branches etc don't have "oids" per se, just the targets and names. Only annotated tags have oids, because they exist inside of the object db. Annotated tags can also point to like, pretty much whatever you want. Do we want to rename tags (in the sense of annotated tags) to annotatedTag to make things clear?
That way
tagcan just be for normal tags, like one would expect.johnhaley81 commentedon Feb 19, 2015
I don't know about this. That would be a pretty serious deviation from how we have historically done things with libgit2 (i.e. don't rename groups/classes). I like your previous method more.
maxkorp commentedon Feb 19, 2015
Yeah, just the previous method doesn't exactly make sense, TBH, since only annotated tags have an oid of their own. I suppose we could do
getBranch/getBranchCommit/getReference/getReferenceCommit/getTag/getTagCommit, and for any of those if the ref doesnt point at a commit, just return undefined? or try grabbing it and let the chain error out?johnhaley81 commentedon Feb 23, 2015
All of those will point at a commit.