diff options
author | Junio C Hamano <gitster@pobox.com> | 2015-06-05 12:17:36 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-06-05 12:17:36 -0700 |
commit | c4a8354bc14e20d5ca6dc353e17e5b27fefefdab (patch) | |
tree | 329e196f78a1563e7e8674af8b4f9324db973ce7 /builtin/log.c | |
parent | f86f31ab33c3406adebbb9f9f61be550dcc5a472 (diff) | |
parent | 29bc88505f22068d7ee6694240e6b13fddb5d059 (diff) | |
download | git-c4a8354bc14e20d5ca6dc353e17e5b27fefefdab.tar.gz |
Merge branch 'jk/at-push-sha1'
Introduce <branch>@{push} short-hand to denote the remote-tracking
branch that tracks the branch at the remote the <branch> would be
pushed to.
* jk/at-push-sha1:
for-each-ref: accept "%(push)" format
for-each-ref: use skip_prefix instead of starts_with
sha1_name: implement @{push} shorthand
sha1_name: refactor interpret_upstream_mark
sha1_name: refactor upstream_mark
remote.c: add branch_get_push
remote.c: return upstream name from stat_tracking_info
remote.c: untangle error logic in branch_get_upstream
remote.c: report specific errors from branch_get_upstream
remote.c: introduce branch_get_upstream helper
remote.c: hoist read_config into remote_get_1
remote.c: provide per-branch pushremote name
remote.c: hoist branch.*.remote lookup out of remote_get_1
remote.c: drop "remote" pointer from "struct branch"
remote.c: refactor setup of branch->merge list
remote.c: drop default_remote_name variable
Diffstat (limited to 'builtin/log.c')
-rw-r--r-- | builtin/log.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/builtin/log.c b/builtin/log.c index 4c4e6be28c..e67671e37a 100644 --- a/builtin/log.c +++ b/builtin/log.c @@ -1632,16 +1632,13 @@ int cmd_cherry(int argc, const char **argv, const char *prefix) break; default: current_branch = branch_get(NULL); - if (!current_branch || !current_branch->merge - || !current_branch->merge[0] - || !current_branch->merge[0]->dst) { + upstream = branch_get_upstream(current_branch, NULL); + if (!upstream) { fprintf(stderr, _("Could not find a tracked" " remote branch, please" " specify <upstream> manually.\n")); usage_with_options(cherry_usage, options); } - - upstream = current_branch->merge[0]->dst; } init_revisions(&revs, prefix); |