diff options
| author | Vicent Martà <vicent@github.com> | 2013-04-22 07:44:32 -0700 |
|---|---|---|
| committer | Vicent Martà <vicent@github.com> | 2013-04-22 07:44:32 -0700 |
| commit | a472f887fe8510bd972f8ce8bec6c9f53601aefb (patch) | |
| tree | e9bc91e80f29479077b595aa138454e4a165063c /src/push.c | |
| parent | f063a75882769cb6fc652de425ac16ba4b88b616 (diff) | |
| parent | 1be680c4d0909ee5160292d7b56c4522c4bc309c (diff) | |
| download | libgit2-a472f887fe8510bd972f8ce8bec6c9f53601aefb.tar.gz | |
Merge pull request #1493 from carlosmn/remotes
Revamp the refspec handling
Diffstat (limited to 'src/push.c')
| -rw-r--r-- | src/push.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/push.c b/src/push.c index cec4c64af..b6be1a4e1 100644 --- a/src/push.c +++ b/src/push.c @@ -177,9 +177,9 @@ int git_push_add_refspec(git_push *push, const char *refspec) int git_push_update_tips(git_push *push) { - git_refspec *fetch_spec = &push->remote->fetch; git_buf remote_ref_name = GIT_BUF_INIT; size_t i, j; + git_refspec *fetch_spec; push_spec *push_spec; git_reference *remote_ref; push_status *status; @@ -191,7 +191,8 @@ int git_push_update_tips(git_push *push) continue; /* Find the corresponding remote ref */ - if (!git_refspec_src_matches(fetch_spec, status->ref)) + fetch_spec = git_remote__matching_refspec(push->remote, status->ref); + if (!fetch_spec) continue; if ((error = git_refspec_transform_r(&remote_ref_name, fetch_spec, status->ref)) < 0) |
