Skip to content

Tackle remote API issues from bindings - #3127

Merged
carlosmn merged 6 commits into
masterfrom
cmn/remote-fixups
May 28, 2015
Merged

carlosmn merged 6 commits into
masterfrom
cmn/remote-fixups

Conversation

@carlosmn

Copy link
Copy Markdown
Member

The set_fetch_refspecs() bit was something which I wasn't quite sure if we wanted to support. But changing the idea of what the base refpecs are at runtime... doesn't sit well with me, so let's just remove it. If you want to perform complex fetches, you can perform a couple or craft your per-operation refspecs to your satisfaction.

This also fixes a test which was relying on implicit side effects in clone and which this run-time setting let succeed even though the final result was not what we wanted.

Add validation to add_fetch() and add_push() and removed the fetch param from create_anonymous() which cannot have configured refspecs by definition.

@carlosmn
carlosmn force-pushed the cmn/remote-fixups branch 2 times, most recently from f36580a to 8be1fb5 Compare May 17, 2015 13:22
@carlosmn carlosmn changed the title Remove run-time refspec setting completely Tackle remote API issues from bindings May 17, 2015
@carlosmn
carlosmn force-pushed the cmn/remote-fixups branch from 8be1fb5 to 564ffa6 Compare May 17, 2015 13:32
Comment thread CHANGELOG.md Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo. I imagine that were willing to rather write pony-ter?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like I hit C-t in the wrong spot

carlosmn added 3 commits May 17, 2015 15:45
The code used to rely on the clone code calling the remote's save, which
does not happen anymore, meaning that the configuration settings the
remote expected were not being written to disk.

The run-time configuration was still being affected, so the right branch
was being cloned. The tests continued to pass as we did not check for
the configuration entires. Fix this by creating the remote with the
single-branch refspec we want and checking for its existence in the
configuration.
These were left over from the culling as it's not clear which use-cases
might benefit from this. It is not clear that we want to support any
use-case which depends on changing the remote's idea of the base
refspecs rather than passing in different per-operation refspec list, so
remove these functions.
@carlosmn
carlosmn force-pushed the cmn/remote-fixups branch from 564ffa6 to 0fedc06 Compare May 17, 2015 13:45
nulltoken added a commit to libgit2/libgit2sharp that referenced this pull request May 17, 2015
nulltoken added a commit to libgit2/libgit2sharp that referenced this pull request May 17, 2015
@nulltoken

Copy link
Copy Markdown
Member

It would be amazing if you could also tackle #3134 as part of this one.

nulltoken added a commit to libgit2/libgit2sharp.nativebinaries that referenced this pull request May 22, 2015
nulltoken added a commit to libgit2/libgit2sharp.nativebinaries that referenced this pull request May 22, 2015
nulltoken added a commit to libgit2/libgit2sharp.nativebinaries that referenced this pull request May 22, 2015
@carlosmn
carlosmn force-pushed the cmn/remote-fixups branch from 6ee3d6d to b2212e4 Compare May 22, 2015 15:16
nulltoken added a commit to libgit2/libgit2sharp.nativebinaries that referenced this pull request May 22, 2015
nulltoken added a commit to libgit2/libgit2sharp.nativebinaries that referenced this pull request May 22, 2015
nulltoken added a commit to libgit2/libgit2sharp.nativebinaries that referenced this pull request May 22, 2015
@nulltoken

Copy link
Copy Markdown
Member

Awesome work! 🙇

Tested through libgit2/libgit2sharp#1049. All LibGit2Sharp test now pass.

👍 to have it merged (please?).

Comment thread include/git2/remote.h Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo here

carlosmn added 3 commits May 28, 2015 15:32
An anonymous remote is not configured and cannot therefore have
configured refspecs. Remove the parameter which adds this from the
constructor.
When we moved from acting on the instance to acting on the
configuration, we dropped the validation of the passed refspec, which
can lead to writing an invalid refspec to the configuration. Bring that
validation back.
These are updates, same as the rest, we should call this callback. As we
are using the callback, let's make sure to skip unnecessary updates.
@carlosmn
carlosmn force-pushed the cmn/remote-fixups branch from b2212e4 to 9566ce4 Compare May 28, 2015 13:32
carlosmn added a commit that referenced this pull request May 28, 2015
Tackle remote API issues from bindings
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.

3 participants