Add Push overloads #385

Merged
merged 4 commits into from Apr 9, 2013

Projects

None yet

2 participants

@yorah
Contributor
yorah commented Apr 5, 2013

Some modifications to the Push API:

  • Add overloads taking Branch instances
  • Add overloads taking Tag instances ?

In order to do so, I had to expose a new property on Branch: UpstreamBranchCanonicalName. This property contains the canonical name of the branch, relatively to the remote repository. When pushing, this is the reference that will be updated on the remote.

Contributor
yorah commented Apr 5, 2013

@jamill I incorporated a bit of your changes from #349 (the Remote.FetchSpecTransformToSource()), but I made it internal for the moment as I don't need to expose it.

Also, I did a bunch of renaming for the properties of the BranchUpdater. The main idea behind this renaming is that:

  • tracked branches refer to branches relative to the current repo (refs/remotes/origin/master for instance)
  • upstream branches refer to branches relative to the upstream repo (refs/heads/master for instance)
yorah added some commits Apr 4, 2013
@yorah yorah Rename GitFetchSpecHandle to GitRefSpecHandle c742c00
@yorah yorah Move Push related tests to a separate file 2ad2c39
@yorah yorah Add the UpstreamBranchCanonicalName property to Branch
This property contains the reference of the tracked branch, relatively to the upstream repository (so "refs/heads/master", and not "refs/remotes/origin/master").
97e4d08
@yorah yorah Add Push overloads taking Branch instances 538fb13
@nulltoken nulltoken merged commit 538fb13 into libgit2:vNext Apr 9, 2013

1 check passed

default The Travis build passed
Details
Member

💥! Merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment