-
Notifications
You must be signed in to change notification settings - Fork 282
Refresh git configuration before looking for the tracking branch. #413
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
Conversation
|
This shouldn't be needed. If it does fix it, it would point out a bug in libgit2's snapshotting. |
|
@carlosmn it is needed. In my tests, the config is stale after first publishing a local branch (via |
|
@alanjrogers This looks good to me. Do you want me to wait to merge it until you've had a chance to look at libgit2? |
|
@jspahrsummers yup, thanks. |
|
Ok, I've attempted to make this fix in |
|
🤘 |
|
Now depends on libgit2/libgit2#2622 |
|
Marking this as [WIP] until we've resolved the issues we're encountering using this branch in GHfM. |
|
libgit2 master seems to resolve the issue, once the libgit2 dependency is merged I'll bump the submodule to libgit2 master and we should be good to go. |
|
This should be good to go. The tests are failing because the CI machine is now running Xcode 6.1 😢 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this __block is necessary, since it'll only be captured in @onExit after receiving a value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Compiler says no. Looks like it captures a const reference in the block. Although I could cast that error away, but at that point I'd prefer to use the __block qualifier.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, right. 👍
Refresh git configuration before looking for the tracking branch.

After publishing a new branch I noticed that
-trackingBranchWithError: success:was still returning anil, after a bit of investigation it turns out libgit2 was using a stale version of the repo's config when it was looking up thebranch.*.remoteandbranch.*.mergeingit_branch_upstream_name.So I've added a
[configuration refresh:]call before we callgit_branch_upstream.