diff options
| author | Junio C Hamano <gitster@pobox.com> | 2020-03-11 10:58:16 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2020-03-11 10:58:16 -0700 |
| commit | 5fa9169ced8f874910cf4cf289a650d65f52df22 (patch) | |
| tree | cabde11cf046e13183cdf5d69746a3bb2bea5382 /remote.c | |
| parent | cdef998b4619cb9acfe2955fcbe9db0ea2f46d33 (diff) | |
| parent | af8ccd8ade1e2dd1bf332067b98dd4459e29c1d3 (diff) | |
| download | git-5fa9169ced8f874910cf4cf289a650d65f52df22.tar.gz | |
Merge branch 'dr/push-remote-ref-update'
Code clean-up.
* dr/push-remote-ref-update:
remote: drop "explicit" parameter from remote_ref_for_branch()
Diffstat (limited to 'remote.c')
| -rw-r--r-- | remote.c | 11 |
1 files changed, 2 insertions, 9 deletions
@@ -516,14 +516,11 @@ const char *pushremote_for_branch(struct branch *branch, int *explicit) return remote_for_branch(branch, explicit); } -const char *remote_ref_for_branch(struct branch *branch, int for_push, - int *explicit) +const char *remote_ref_for_branch(struct branch *branch, int for_push) { if (branch) { if (!for_push) { if (branch->merge_nr) { - if (explicit) - *explicit = 1; return branch->merge_name[0]; } } else { @@ -534,15 +531,11 @@ const char *remote_ref_for_branch(struct branch *branch, int for_push, if (remote && remote->push.nr && (dst = apply_refspecs(&remote->push, branch->refname))) { - if (explicit) - *explicit = 1; return dst; } } } - if (explicit) - *explicit = 0; - return ""; + return NULL; } static struct remote *remote_get_1(const char *name, |
