diff options
Diffstat (limited to 'builtin/bisect.c')
-rw-r--r-- | builtin/bisect.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/builtin/bisect.c b/builtin/bisect.c index 65478ef40f..032beaa635 100644 --- a/builtin/bisect.c +++ b/builtin/bisect.c @@ -7,7 +7,6 @@ #include "parse-options.h" #include "bisect.h" #include "refs.h" -#include "dir.h" #include "strvec.h" #include "run-command.h" #include "oid-array.h" @@ -26,7 +25,7 @@ static GIT_PATH_FUNC(git_path_bisect_first_parent, "BISECT_FIRST_PARENT") static GIT_PATH_FUNC(git_path_bisect_run, "BISECT_RUN") #define BUILTIN_GIT_BISECT_START_USAGE \ - N_("git bisect start [--term-{new,bad}=<term> --term-{old,good}=<term>]" \ + N_("git bisect start [--term-(new|bad)=<term> --term-(old|good)=<term>]" \ " [--no-checkout] [--first-parent] [<bad> [<good>...]] [--]" \ " [<pathspec>...]") #define BUILTIN_GIT_BISECT_STATE_USAGE \ @@ -46,7 +45,7 @@ static GIT_PATH_FUNC(git_path_bisect_run, "BISECT_RUN") #define BUILTIN_GIT_BISECT_LOG_USAGE \ "git bisect log" #define BUILTIN_GIT_BISECT_RUN_USAGE \ - N_("git bisect run <cmd>...") + N_("git bisect run <cmd> [<arg>...]") static const char * const git_bisect_usage[] = { BUILTIN_GIT_BISECT_START_USAGE, @@ -233,11 +232,10 @@ static int bisect_reset(const char *commit) struct strbuf branch = STRBUF_INIT; if (!commit) { - if (strbuf_read_file(&branch, git_path_bisect_start(), 0) < 1) { + if (!strbuf_read_file(&branch, git_path_bisect_start(), 0)) printf(_("We are not bisecting.\n")); - return 0; - } - strbuf_rtrim(&branch); + else + strbuf_rtrim(&branch); } else { struct object_id oid; @@ -246,7 +244,7 @@ static int bisect_reset(const char *commit) strbuf_addstr(&branch, commit); } - if (!ref_exists("BISECT_HEAD")) { + if (branch.len && !ref_exists("BISECT_HEAD")) { struct child_process cmd = CHILD_PROCESS_INIT; cmd.git_cmd = 1; |