diff options
Diffstat (limited to 'builtin/log.c')
-rw-r--r-- | builtin/log.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/builtin/log.c b/builtin/log.c index dd8f3fcfc4..e67671e37a 100644 --- a/builtin/log.c +++ b/builtin/log.c @@ -38,7 +38,7 @@ static const char *fmt_patch_subject_prefix = "PATCH"; static const char *fmt_pretty; static const char * const builtin_log_usage[] = { - N_("git log [<options>] [<revision range>] [[--] <path>...]"), + N_("git log [<options>] [<revision-range>] [[--] <path>...]"), N_("git show [<options>] <object>..."), NULL }; @@ -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); |