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

Branch.xs: Added upstream_name() and remote_name() #84

Closed
wants to merge 3 commits into from
Closed

Branch.xs: Added upstream_name() and remote_name() #84

wants to merge 3 commits into from

Conversation

jacquesg
Copy link
Owner

It is often useful to know which remote a branch belongs to hence remote_name. upstream_name is a convenience. Getting the remote reference first and running name on it will give the same result.

@jacquesg
Copy link
Owner Author

I've also made upstream() return undef if there is no corresponding upstream reference.

@jacquesg jacquesg changed the title Branch.xs: Added upstream_name() and remote_name() WIP: Branch.xs: Added upstream_name() and remote_name() Apr 23, 2014
@jacquesg
Copy link
Owner Author

Looks like I introduced a small bug here, busy fixing.

@jacquesg jacquesg changed the title WIP: Branch.xs: Added upstream_name() and remote_name() Branch.xs: Added upstream_name() and remote_name() Apr 23, 2014
@jacquesg
Copy link
Owner Author

Ok, fixed a bug here in upstream. The returned Reference requires the Repository as magic, as you could call Git::Raw::Reference -> target(). This requires the repository as magic in git_obj_to_sv.

The created reference should also take the repository in as magic,
seeing that Git::Raw::Reference -> target() requires it via git_obj_to_sv().
@jacquesg jacquesg closed this in 451f96f Apr 25, 2014
@jacquesg jacquesg deleted the branch-names branch April 25, 2014 20:51
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

1 participant