From patchwork Thu Apr 23 07:07:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Miriam R." X-Patchwork-Id: 11505077 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id ED253112C for ; Thu, 23 Apr 2020 07:09:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D599621569 for ; Thu, 23 Apr 2020 07:09:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="WNbhPgeW" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726924AbgDWHJw (ORCPT ); Thu, 23 Apr 2020 03:09:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59890 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726920AbgDWHJu (ORCPT ); Thu, 23 Apr 2020 03:09:50 -0400 Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 32928C03C1AB for ; Thu, 23 Apr 2020 00:09:50 -0700 (PDT) Received: by mail-wr1-x442.google.com with SMTP id d15so3896419wrx.3 for ; Thu, 23 Apr 2020 00:09:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=LnIuzROd4iMGvi2EDoEHmjqIjVc8ggiVmaobTiPSuxw=; b=WNbhPgeWaBzNG/T8p9th5IXJ8OWhGgvxYmP09O4c5SAW1ljMjFFmDacgiWPruMQV+O tuDzL26eTh5qKIXM+gSH9kpeUsj4VQJa6fmhL+NJ29pkUBgzz1St+3eSwXdp9O5MNCGx LARp3WDLfqxIqhbDFPi3JPvEtX1cJhJHfqiTkXvc50nK62VmLLVNYf/jyEyan+H7DLlE 7zKDBc2D2LsE+ca3s+XEqVhtJtIqYY3QP03Z2Zs94jyV20fTv/asVrbLh/lMgJaCvrpJ FxSZUlf5jYTePIO0fDFusnh+hty21UEZFFDaJVuTwmtHvz5Yw14I2wZrkWbgWUOBdl8z 2agA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=LnIuzROd4iMGvi2EDoEHmjqIjVc8ggiVmaobTiPSuxw=; b=aqkg8J2TscsXl3bEXisjgXwO3XcLr7rXG9DDNeUe9JxlTykrO7JtPWIysbU2pnqyob bcqLTMEWl++SFO+7MqCr9z4L7NiZqzuvU0y4UgtikkYMLSVYO4qYz6rmDas1jWMQZHvl NK0jcyN9/6a4bjYJQ17v13pwT5WqkQlv98QgakJKapvRO9wOb3BgrAL/1X2sZLp0u9HM tj4KKSxUoBIa+DIlvvpmemhSYgjTN3qGWWwAtpfeG7hZNAiCFISrkRwrHYW9XnO3xwcI FSSGnqaqAfkvt0MDxfK2oog4IZ/oU5xIj8I+SnokNQn69ggcc7QGZoF01quRN/mrOhcs +a3A== X-Gm-Message-State: AGi0Pua/otP2Xj/qHRXjYi6vPAOfAT8/zbm7zcp00NZaR9ZqGfQxXWtm 9ZSe8SMzPbTVPngzek3vQltfudtZywQacA== X-Google-Smtp-Source: APiQypJQlJxQAwuPjMo9gte1H7aG2qJN21NloCNchb5h22/nBf97tztC6qsHLL8EwEZ3XCJta8p4qw== X-Received: by 2002:adf:82b1:: with SMTP id 46mr3024749wrc.44.1587625788757; Thu, 23 Apr 2020 00:09:48 -0700 (PDT) Received: from localhost.localdomain ([139.47.115.4]) by smtp.gmail.com with ESMTPSA id u17sm2518585wra.63.2020.04.23.00.09.47 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Apr 2020 00:09:48 -0700 (PDT) From: Miriam Rubio To: git@vger.kernel.org Cc: Pranit Bauva , Lars Schneider , Christian Couder , Johannes Schindelin , Tanushree Tumane , Miriam Rubio Subject: [PATCH v3 11/12] bisect--helper: retire `--write-terms` subcommand Date: Thu, 23 Apr 2020 09:07:03 +0200 Message-Id: <20200423070704.39872-12-mirucam@gmail.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200423070704.39872-1-mirucam@gmail.com> References: <20200423070704.39872-1-mirucam@gmail.com> MIME-Version: 1.0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Pranit Bauva The `--write-terms` subcommand is no longer used from the git-bisect.sh shell script. Instead the function `write_terms()` is called from the C implementation of `set_terms()` and `bisect_start()`. Mentored-by: Lars Schneider Mentored-by: Christian Couder Mentored-by: Johannes Schindelin Signed-off-by: Pranit Bauva Signed-off-by: Tanushree Tumane Signed-off-by: Miriam Rubio --- builtin/bisect--helper.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/builtin/bisect--helper.c b/builtin/bisect--helper.c index 7db58ada6f..e7467dc1c7 100644 --- a/builtin/bisect--helper.c +++ b/builtin/bisect--helper.c @@ -20,7 +20,6 @@ static GIT_PATH_FUNC(git_path_head_name, "head-name") static GIT_PATH_FUNC(git_path_bisect_names, "BISECT_NAMES") static const char * const git_bisect_helper_usage[] = { - N_("git bisect--helper --write-terms "), N_("git bisect--helper --bisect-reset []"), N_("git bisect--helper --bisect-write [--no-log] "), N_("git bisect--helper --bisect-check-and-set-terms "), @@ -897,8 +896,7 @@ static enum bisect_error bisect_state(struct bisect_terms *terms, const char **a int cmd_bisect__helper(int argc, const char **argv, const char *prefix) { enum { - WRITE_TERMS = 1, - BISECT_RESET, + BISECT_RESET = 1, BISECT_WRITE, CHECK_AND_SET_TERMS, BISECT_NEXT_CHECK, @@ -911,8 +909,6 @@ int cmd_bisect__helper(int argc, const char **argv, const char *prefix) } cmdmode = 0; int no_checkout = 0, res = 0, nolog = 0; struct option options[] = { - OPT_CMDMODE(0, "write-terms", &cmdmode, - N_("write the terms to .git/BISECT_TERMS"), WRITE_TERMS), OPT_CMDMODE(0, "bisect-reset", &cmdmode, N_("reset the bisection state"), BISECT_RESET), OPT_CMDMODE(0, "bisect-write", &cmdmode, @@ -949,10 +945,6 @@ int cmd_bisect__helper(int argc, const char **argv, const char *prefix) usage_with_options(git_bisect_helper_usage, options); switch (cmdmode) { - case WRITE_TERMS: - if (argc != 2) - return error(_("--write-terms requires two arguments")); - return write_terms(argv[0], argv[1]); case BISECT_RESET: if (argc > 1) return error(_("--bisect-reset requires either no argument or a commit"));