From patchwork Tue Aug 17 08:14:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Miriam R." X-Patchwork-Id: 12440835 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F06B7C4338F for ; Tue, 17 Aug 2021 08:16:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C4514604AC for ; Tue, 17 Aug 2021 08:16:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239033AbhHQIQc (ORCPT ); Tue, 17 Aug 2021 04:16:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54658 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238709AbhHQIQ1 (ORCPT ); Tue, 17 Aug 2021 04:16:27 -0400 Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 80331C0613C1 for ; Tue, 17 Aug 2021 01:15:54 -0700 (PDT) Received: by mail-wr1-x42c.google.com with SMTP id q6so15796941wrv.6 for ; Tue, 17 Aug 2021 01:15:54 -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=OwUdyqj0SBTZGYDzNsX83JlUezJs5b9nQag/bX/AVAo=; b=MD6EYGCnRhAtkZTuHq3sRzobocIg9sSEtyh3+Fco2RyoOehlo9W0ct/W1P+9wmEx38 CpAhl/25rjr05Gy7lOVCxKMd7t7yMSs9GDy5Hg7h5/km9BMMl+0JMjACHQIOlnyEX9O0 6A2s5oPil9F8oCkUzZ9sZepfuRVOgoVuYQRNOPv+a148VCOnq1cktEQrfZzIqsJNf1HQ rPg/EjQEqNYqIRhhk76Ap+jUpNrVTHAuMF3i8gE6Ckg9jhhEKCY48iXbwmnhsX6UdSTT ipVO1/B5ANfS0VkMK4Nx5ufwt+jrM3aPxEOKhuNUGisVBtyZ6Fb7qVQP+rZao5i5w0q3 gsaA== 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=OwUdyqj0SBTZGYDzNsX83JlUezJs5b9nQag/bX/AVAo=; b=RgGHih4Qvbp+bTdaRRfJ1VQO24ThmSM9Bc7XSBtyhHJbxmzw1cLi7USdsO6K35+VZT WzHZuW2xKNaI3GAcbcLofPcAOptEB4dFxBL2gLCP+9TJvEwpqHrH2LZH0X06ty4WQFRy HgRBBH710JFEGJC/fe+IlO1/MlL2fVo7zSaONUKfGMJQjlh8stg1w4weYTssGHjeJDIe 7jbAa2slBIwomYMAAMuEfKgksbdYbSm/O9TUAG8bElSwko+6aJRxDxg0MS5QHPMxeOCr 7pqmtajAeT1qrE/tOtfGZWwVfLsCAsEE8DikbeiG3E8m8bLRVYj+qGHV/kGbEE7n21yA Te+A== X-Gm-Message-State: AOAM532ypfJtnqazIRBHOUL/ZcF2iEUl9L1T9O5rUyiYaRCQYH3KnyKm q28S80bjTvbbr7beB0UQsY2h/WkdDD8= X-Google-Smtp-Source: ABdhPJzLlS819t2EeRYu1NRIVGJAHfUdLUUgPoMTVRdRwvdWOSWoVQpw9qrGBHc6oJ+rkAa9rNrMDg== X-Received: by 2002:adf:a29c:: with SMTP id s28mr2394835wra.318.1629188153143; Tue, 17 Aug 2021 01:15:53 -0700 (PDT) Received: from localhost.localdomain ([178.237.233.111]) by smtp.gmail.com with ESMTPSA id l21sm1256238wmh.31.2021.08.17.01.15.52 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Aug 2021 01:15:52 -0700 (PDT) From: Miriam Rubio To: git@vger.kernel.org Cc: Miriam Rubio Subject: [PATCH v4 1/6] t6030-bisect-porcelain: add tests to control bisect run exit cases Date: Tue, 17 Aug 2021 10:14:53 +0200 Message-Id: <20210817081458.53136-2-mirucam@gmail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210817081458.53136-1-mirucam@gmail.com> References: <20210817081458.53136-1-mirucam@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org There is a gap on bisect run test coverage related with error exits. Add two tests to control these error cases. Signed-off-by: Miriam Rubio --- t/t6030-bisect-porcelain.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/t/t6030-bisect-porcelain.sh b/t/t6030-bisect-porcelain.sh index a1baf4e451..f41453cc97 100755 --- a/t/t6030-bisect-porcelain.sh +++ b/t/t6030-bisect-porcelain.sh @@ -962,4 +962,18 @@ test_expect_success 'bisect handles annotated tags' ' grep "$bad is the first bad commit" output ' +test_expect_success 'bisect run fails with exit code equals or greater than 128' ' + write_script test_script.sh <<-\EOF && + exit 128 >/dev/null + EOF + test_must_fail git bisect run ./test_script.sh > my_bisect_log.txt +' + +test_expect_success 'bisect run fails with exit code smaller than 0' ' + write_script test_script.sh <<-\EOF && + exit -1 >/dev/null + EOF + test_must_fail git bisect run ./test_script.sh > my_bisect_log.txt +' + test_done From patchwork Tue Aug 17 08:14:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Miriam R." X-Patchwork-Id: 12440837 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F0E7BC4320A for ; Tue, 17 Aug 2021 08:16:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DA81560F22 for ; Tue, 17 Aug 2021 08:16:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239047AbhHQIQf (ORCPT ); Tue, 17 Aug 2021 04:16:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54662 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235020AbhHQIQ2 (ORCPT ); Tue, 17 Aug 2021 04:16:28 -0400 Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3CF06C061764 for ; Tue, 17 Aug 2021 01:15:55 -0700 (PDT) Received: by mail-wm1-x336.google.com with SMTP id h24-20020a1ccc180000b029022e0571d1a0so1549991wmb.5 for ; Tue, 17 Aug 2021 01:15:55 -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=+tYA7Qwc1dr+O2HZdbGQKjwxjIahfbtOq5Fi73CzrHY=; b=LeqQKgEyZFc4WMrRS3LZxF+dWbAeyHF4W5gyPJuO15RZYK164GHBO5Dq99wa8ULMUC +9Vh72XeXMgIWPQJjhvOF3NujaGi2rs7G9q3Z6VpBmSCdj6o0Q+HGBUUwpfsl0FxTh4Z U1DT5MlpFSBhrkmJVwQl9kGI9nkTrVAgUYJxPh4oh1HFYqFQhPMdGNi2l1Kv2bgiFz+Z bMYcR7ZjgntBJv6MAdNPm4vT4L+cM2R+PnA+ZTi4UOgFVNDFAG04d9Bnmn64A8C3VkN3 spta4/jLmZA5fQpOEUGLoYastyLT+slvVNYR5TLyub0pjasyKlnRPHnNRfn6l7byFc0U OnhA== 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=+tYA7Qwc1dr+O2HZdbGQKjwxjIahfbtOq5Fi73CzrHY=; b=J1R6pFO7LLr2Ztf7X9jFUF1iizyS/4J4ciXQFF27SoPI4bDsd9hjuUZT+M8zvv6utW drknYtkZsEl2SJY7UCfz8+Bdg4m2NbOtSLbvmNOLPztbpM5y49LsjlfTtaGqagOQqmHM WkwNSgUCz2hREA51gsEVvZ0iylXr/lTYebCLlwZoVI5WdR//CYx166j+lb/x6V6qTLyI 61vNytdKooWwr6tp9Nttpu0QJAP6cShmB2exOSuLA80b/VeaDX2qjSk+BesemloHE0nt Jtgvzca4RGp5gM2+sWy21NcpdPKaXmArBSR5Oqg9ISBELaLWEN3fKCtUss20AkeJ8jEA 6M0A== X-Gm-Message-State: AOAM533yvdgfHhixwGGHOefKJeZD4sn36+ZJLZi5652IoOxvdZu9tq2g jSB7huwc5ulavsvNGtLUQOq8GF0dcA0= X-Google-Smtp-Source: ABdhPJzhEBPHI+gi9qDiRV6kjv3FsZwMuIThSo2G8Ot4hxVODOAhB8wf47h4kXr3OQER8ozz1BK6aQ== X-Received: by 2002:a05:600c:210a:: with SMTP id u10mr2099199wml.162.1629188153827; Tue, 17 Aug 2021 01:15:53 -0700 (PDT) Received: from localhost.localdomain ([178.237.233.111]) by smtp.gmail.com with ESMTPSA id l21sm1256238wmh.31.2021.08.17.01.15.53 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Aug 2021 01:15:53 -0700 (PDT) From: Miriam Rubio To: git@vger.kernel.org Cc: Miriam Rubio Subject: [PATCH v4 2/6] t6030-bisect-porcelain: add test for bisect visualize Date: Tue, 17 Aug 2021 10:14:54 +0200 Message-Id: <20210817081458.53136-3-mirucam@gmail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210817081458.53136-1-mirucam@gmail.com> References: <20210817081458.53136-1-mirucam@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Add a test to control breakages in bisect visualize command. Signed-off-by: Miriam Rubio --- t/t6030-bisect-porcelain.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/t/t6030-bisect-porcelain.sh b/t/t6030-bisect-porcelain.sh index f41453cc97..99b7517400 100755 --- a/t/t6030-bisect-porcelain.sh +++ b/t/t6030-bisect-porcelain.sh @@ -976,4 +976,11 @@ test_expect_success 'bisect run fails with exit code smaller than 0' ' test_must_fail git bisect run ./test_script.sh > my_bisect_log.txt ' +test_expect_success 'bisect visualize with a filename with dash and space' ' + echo "My test line" >> -hello\ 2 && + git add -- -hello\ 2 && + git commit --quiet -m "Add test line" -- -hello\ 2 && + git bisect visualize -p -- -hello\ 2 > my_bisect_log.txt +' + test_done From patchwork Tue Aug 17 08:14:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Miriam R." X-Patchwork-Id: 12440839 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3A98BC4338F for ; Tue, 17 Aug 2021 08:16:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1DBD460E78 for ; Tue, 17 Aug 2021 08:16:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239036AbhHQIQg (ORCPT ); Tue, 17 Aug 2021 04:16:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238843AbhHQIQ2 (ORCPT ); Tue, 17 Aug 2021 04:16:28 -0400 Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED4CDC0613C1 for ; Tue, 17 Aug 2021 01:15:55 -0700 (PDT) Received: by mail-wr1-x42c.google.com with SMTP id q10so27330982wro.2 for ; Tue, 17 Aug 2021 01:15:55 -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=ff1IbLdcvpD6MhimWYyxaTfLrj9k2S7N5XzYOYFduTA=; b=YJD19zooR7U5NnnRLIsuJDJzmF91H7ARTKWnJd26Pz0oGKBtD7C6N12yxZhNmt4Sus 3SAlbYU1HMbZHu9goPbAzrdijMowDeCqAr/CO9tCwDOd1tQzS66T29nTysA2mDVTsuEi FNs/VsFDyq640x5MmeVKjwlPJaZm354ghcxdznktw8NQR4UbP/thn01AFMrwUlIy0caj 15aFIvbnSaTN04nqWpIie8yeTHOMwsqy/5cXZRXurBoqogAl5JaTZPTFiK+wv8fr6wPd MxmaRMYONYBwQK31MleWyt4eyVUqrS5/Dnlf/M8DWUCdksXL0PKcCosUXPnGXYk0JpTx qluw== 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=ff1IbLdcvpD6MhimWYyxaTfLrj9k2S7N5XzYOYFduTA=; b=BXKMVtC98n80PQYNEkKG1+9zv3MFqR4Y9IEzwipWtpqs2YVRhD7Qhn6LmwnETxCVw4 DhJM7kVM5qAmCx3TGRvv7+U1yYEN+qnRUoCMCjFJeqVTlGmo6N7V9OJ77scbLEIVMW2c cvVv5b/A+fy2k3IXnEGKVKtPKmKvYhqJwiyA7YZcE5jhwGfLCsLqNkpwa636CCW9B8qF G9GcL9VwBmXA40Qph3zdPfImzSCqVuQ+ZugMw8Cpx5AQWej8w6FOW9K1gga0fZ63mpro xVGm3q2mGCPDqs/03vC9keQ+ZYwE+4HOJ/i6ppDDwZGfU/PqkCinBKs0RUXiSjV6MfBQ iHew== X-Gm-Message-State: AOAM531SrtmS8oR2BbeHepq1IOPfzwwhxCcco/AcFbYfNz6kEOFDDD+r Bx71rW8B414IRBnub1/7g+6MffA+dDc= X-Google-Smtp-Source: ABdhPJx2CxfPrgmz4+WbvaZRHvQlZZMsM6b+JU/AkZz6Qp6zX4LpBKAVEvhKMtWUnALh9pbpYSuiow== X-Received: by 2002:adf:f40d:: with SMTP id g13mr2431121wro.69.1629188154619; Tue, 17 Aug 2021 01:15:54 -0700 (PDT) Received: from localhost.localdomain ([178.237.233.111]) by smtp.gmail.com with ESMTPSA id l21sm1256238wmh.31.2021.08.17.01.15.53 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Aug 2021 01:15:54 -0700 (PDT) From: Miriam Rubio To: git@vger.kernel.org Cc: Pranit Bauva , Tanushree Tumane , Miriam Rubio Subject: [PATCH v4 3/6] run-command: make `exists_in_PATH()` non-static Date: Tue, 17 Aug 2021 10:14:55 +0200 Message-Id: <20210817081458.53136-4-mirucam@gmail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210817081458.53136-1-mirucam@gmail.com> References: <20210817081458.53136-1-mirucam@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Pranit Bauva Removes the `static` keyword from `exists_in_PATH()` function and declares the function in `run-command.h` file. The function will be used in bisect_visualize() in a later commit. Mentored by: Christian Couder Mentored by: Johannes Schindelin Signed-off-by: Tanushree Tumane Signed-off-by: Miriam Rubio --- run-command.c | 2 +- run-command.h | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/run-command.c b/run-command.c index f72e72cce7..390f46819f 100644 --- a/run-command.c +++ b/run-command.c @@ -210,7 +210,7 @@ static char *locate_in_PATH(const char *file) return NULL; } -static int exists_in_PATH(const char *file) +int exists_in_PATH(const char *file) { char *r = locate_in_PATH(file); int found = r != NULL; diff --git a/run-command.h b/run-command.h index af1296769f..54d74b706f 100644 --- a/run-command.h +++ b/run-command.h @@ -182,6 +182,18 @@ void child_process_clear(struct child_process *); int is_executable(const char *name); +/** + * Search if a $PATH for a command exists. This emulates the path search that + * execvp would perform, without actually executing the command so it + * can be used before fork() to prepare to run a command using + * execve() or after execvp() to diagnose why it failed. + * + * The caller should ensure that file contains no directory separators. + * + * Returns 1 if it is found in $PATH or 0 if the command could not be found. + */ +int exists_in_PATH(const char *file); + /** * Start a sub-process. Takes a pointer to a `struct child_process` * that specifies the details and returns pipe FDs (if requested). From patchwork Tue Aug 17 08:14:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Miriam R." X-Patchwork-Id: 12440841 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AE109C4320E for ; Tue, 17 Aug 2021 08:16:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 91264604AC for ; Tue, 17 Aug 2021 08:16:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239109AbhHQIQk (ORCPT ); Tue, 17 Aug 2021 04:16:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54672 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238861AbhHQIQa (ORCPT ); Tue, 17 Aug 2021 04:16:30 -0400 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3FA00C061764 for ; Tue, 17 Aug 2021 01:15:57 -0700 (PDT) Received: by mail-wm1-x32e.google.com with SMTP id w24so5372251wmi.5 for ; Tue, 17 Aug 2021 01:15:57 -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=HijQv8UgqKExCfa4+9dgNnyAaktL01Oc266cyckCw0Y=; b=NabTXpCZqUUBKqDATZ6ZN+h0R5xTxvzwEA7nd7w8WCVBFRSm9v0LKZjBPvwAZOBG5i Av4M+GYTPTCZi+FPIZRoxnEorq+wspOWJJSsseOOGub/oHwqC294AZjStKKFHxtiPSGH jfZTbtKPARtfI492qVPFR3XiCD7+wySEefFPr5ZQmd/wH7zolOA++ADMjSlCOk0lGbPC Q/NP3sdB+9LOLyclOXHs1uPuWSajlyLFREefp+ifNaBswWD0qjc0iEUsFbnW3khCkM3P hfg0rSEgwuArS/iTkG25PujSGVYbhbJ1b4ir1bRtCHtlk0WPGjlkfp3Hz/vOHHhQdXDl 2GUw== 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=HijQv8UgqKExCfa4+9dgNnyAaktL01Oc266cyckCw0Y=; b=ZEVTScJK00n2gjmV9koDU2hwdLAlSFKgqiVejeM18ywk/LEH9C2t9ypEONiWdhobZS sF0PkS+23gc+mVcDwDhPDVZTceCBHK/7rnHWkiay81/C72UDZM7y/a781ht0fAnHZeUp mBzZGtqZWhMR3zS/9yw2qV2tFcezTr2DV+2tY/nmYPd5SHzEJ229S6js98F5XCksx+YX cOc51OSfIfTrtoWa+F+HFuCBI9ApA5OxJsdenf+A2bcq7bmakmX91qzvi3h+IyxHfQ8n FsGU6oBZ7/ROcTPnWCBiYx8kXCeXHU0Iuv9WMPKjfqTxEJA5SompiPa0GgG3kz7CHCog 8/xw== X-Gm-Message-State: AOAM531jrVPfoh7EFafNOUNGjAxTM2Eac9/bXyL1fu4j+YcZEInGWM+g 7c7HfsrHFzXZW4l76dkG9/9QxFVyBhU= X-Google-Smtp-Source: ABdhPJz7PMJj6vnQwtZXQukWoBmwao4VXOnGp/IrRCCkP7zN96vPvvvHLRGeREbyFqj+sb8HR0E5xA== X-Received: by 2002:a7b:ca56:: with SMTP id m22mr2010492wml.16.1629188155886; Tue, 17 Aug 2021 01:15:55 -0700 (PDT) Received: from localhost.localdomain ([178.237.233.111]) by smtp.gmail.com with ESMTPSA id l21sm1256238wmh.31.2021.08.17.01.15.54 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Aug 2021 01:15:55 -0700 (PDT) From: Miriam Rubio To: git@vger.kernel.org Cc: Pranit Bauva , Christian Couder , Johannes Schindelin , Tanushree Tumane , Miriam Rubio Subject: [PATCH v4 4/6] bisect--helper: reimplement `bisect_visualize()`shell function in C Date: Tue, 17 Aug 2021 10:14:56 +0200 Message-Id: <20210817081458.53136-5-mirucam@gmail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210817081458.53136-1-mirucam@gmail.com> References: <20210817081458.53136-1-mirucam@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Pranit Bauva Reimplement the `bisect_visualize()` shell function in C and also add `--bisect-visualize` subcommand to `git bisect--helper` to call it from git-bisect.sh. Mentored-by: Christian Couder Mentored-by: Johannes Schindelin Signed-off-by: Tanushree Tumane Signed-off-by: Miriam Rubio --- builtin/bisect--helper.c | 48 +++++++++++++++++++++++++++++++++++++++- git-bisect.sh | 25 +-------------------- 2 files changed, 48 insertions(+), 25 deletions(-) diff --git a/builtin/bisect--helper.c b/builtin/bisect--helper.c index f184eaeac6..4258429c1c 100644 --- a/builtin/bisect--helper.c +++ b/builtin/bisect--helper.c @@ -30,6 +30,7 @@ static const char * const git_bisect_helper_usage[] = { N_("git bisect--helper --bisect-state (good|old) [...]"), N_("git bisect--helper --bisect-replay "), N_("git bisect--helper --bisect-skip [(|)...]"), + N_("git bisect--helper --bisect-visualize"), NULL }; @@ -1036,6 +1037,44 @@ static enum bisect_error bisect_skip(struct bisect_terms *terms, const char **ar return res; } +static int bisect_visualize(struct bisect_terms *terms, const char **argv, int argc) +{ + struct strvec args = STRVEC_INIT; + int flags = RUN_COMMAND_NO_STDIN, res = 0; + struct strbuf sb = STRBUF_INIT; + + if (bisect_next_check(terms, NULL) != 0) + return BISECT_FAILED; + + if (!argc) { + if ((getenv("DISPLAY") || getenv("SESSIONNAME") || getenv("MSYSTEM") || + getenv("SECURITYSESSIONID")) && exists_in_PATH("gitk")) + strvec_push(&args, "gitk"); + else { + strvec_pushl(&args, "log", NULL); + flags |= RUN_GIT_CMD; + } + } else { + if (argv[0][0] == '-') { + strvec_pushl(&args, "log", NULL); + flags |= RUN_GIT_CMD; + } else if (strcmp(argv[0], "tig") && !starts_with(argv[0], "git")) + flags |= RUN_GIT_CMD; + + strvec_pushv(&args, argv); + } + + strvec_pushl(&args, "--bisect", "--", NULL); + + strbuf_read_file(&sb, git_path_bisect_names(), 0); + sq_dequote_to_strvec(sb.buf, &args); + strbuf_release(&sb); + + res = run_command_v_opt(args.v, flags); + strvec_clear(&args); + return res; +} + int cmd_bisect__helper(int argc, const char **argv, const char *prefix) { enum { @@ -1048,7 +1087,8 @@ int cmd_bisect__helper(int argc, const char **argv, const char *prefix) BISECT_STATE, BISECT_LOG, BISECT_REPLAY, - BISECT_SKIP + BISECT_SKIP, + BISECT_VISUALIZE, } cmdmode = 0; int res = 0, nolog = 0; struct option options[] = { @@ -1070,6 +1110,8 @@ int cmd_bisect__helper(int argc, const char **argv, const char *prefix) N_("replay the bisection process from the given file"), BISECT_REPLAY), OPT_CMDMODE(0, "bisect-skip", &cmdmode, N_("skip some commits for checkout"), BISECT_SKIP), + OPT_CMDMODE(0, "bisect-visualize", &cmdmode, + N_("visualize the bisection"), BISECT_VISUALIZE), OPT_BOOL(0, "no-log", &nolog, N_("no log for BISECT_WRITE")), OPT_END() @@ -1131,6 +1173,10 @@ int cmd_bisect__helper(int argc, const char **argv, const char *prefix) get_terms(&terms); res = bisect_skip(&terms, argv, argc); break; + case BISECT_VISUALIZE: + get_terms(&terms); + res = bisect_visualize(&terms, argv, argc); + break; default: BUG("unknown subcommand %d", cmdmode); } diff --git a/git-bisect.sh b/git-bisect.sh index 6a7afaea8d..95f7f3fb8c 100755 --- a/git-bisect.sh +++ b/git-bisect.sh @@ -39,29 +39,6 @@ _x40="$_x40$_x40$_x40$_x40$_x40$_x40$_x40$_x40" TERM_BAD=bad TERM_GOOD=good -bisect_visualize() { - git bisect--helper --bisect-next-check $TERM_GOOD $TERM_BAD fail || exit - - if test $# = 0 - then - if test -n "${DISPLAY+set}${SESSIONNAME+set}${MSYSTEM+set}${SECURITYSESSIONID+set}" && - type gitk >/dev/null 2>&1 - then - set gitk - else - set git log - fi - else - case "$1" in - git*|tig) ;; - -*) set git log "$@" ;; - *) set git "$@" ;; - esac - fi - - eval '"$@"' --bisect -- $(cat "$GIT_DIR/BISECT_NAMES") -} - bisect_run () { git bisect--helper --bisect-next-check $TERM_GOOD $TERM_BAD fail || exit @@ -152,7 +129,7 @@ case "$#" in # Not sure we want "next" at the UI level anymore. git bisect--helper --bisect-next "$@" || exit ;; visualize|view) - bisect_visualize "$@" ;; + git bisect--helper --bisect-visualize "$@" || exit;; reset) git bisect--helper --bisect-reset "$@" ;; replay) From patchwork Tue Aug 17 08:14:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Miriam R." X-Patchwork-Id: 12440843 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 70794C4320A for ; Tue, 17 Aug 2021 08:16:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 56EF860E78 for ; Tue, 17 Aug 2021 08:16:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239067AbhHQIQl (ORCPT ); Tue, 17 Aug 2021 04:16:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54678 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238985AbhHQIQb (ORCPT ); Tue, 17 Aug 2021 04:16:31 -0400 Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E134C0613C1 for ; Tue, 17 Aug 2021 01:15:58 -0700 (PDT) Received: by mail-wm1-x32c.google.com with SMTP id h24-20020a1ccc180000b029022e0571d1a0so1550064wmb.5 for ; Tue, 17 Aug 2021 01:15:58 -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=RVyqWPJ8eOL3p0gBxtbX/zKM1tSkT+6bDVd5q5TFpmU=; b=JC1IXQZHV+uHlnCsegiW8k8/obo0umOzk5XxWSa5v40lFKzCIGKhCtVADaRVScWjmx IIgaktrpehrMIs3KrRPFaEwZbcGEP2dHt13o3aA/mGZVq6U/SJ6x8Elna4V1Yhoj12mH Mfib90jX5YJ/G/qBLuW8JmU73nzvsq9xs2f+v8Vzi69Dx4jrCqyy9TDrNA2Trm+96hvV x1I4FIuMHGdJf/fLAWabdH+p2pt4TI1vUUqUT911fBwXSKQZnKtjAE3Vk+j0FgbuhbSM u0OOvKGBmbII3U6ZWRrc2KVk3sqfrR+rxWVHLqx4q8vmLxvpI3YDT5ek/k23RKjEMJsm d/2Q== 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=RVyqWPJ8eOL3p0gBxtbX/zKM1tSkT+6bDVd5q5TFpmU=; b=X8vNoEhDkb8gxVtPQi2vcT17XoaT4lkZr3PDqmQw+RBZaWZokwzyrrzwbj7oVvA52X 5SohnLbZy29LWTKayw5VvNIe6L0kOQdN9spNQ+HPzQjM3asPfYQI7OcsgHE6c7Xv4dj6 y5AZttn/iad5TIZEDBZfNVZWk9lNabWT1trmAdGoyEAErWT51Gr1CXRmTrye5bDMF813 vhn8LyuLBFB2PTZ+43cEXCGU8+IqQZNe94SRK/Hg4ScwEKSLjueCzLgB8/FlcCTqpqu4 zTD5mqwBSe5fqSxX+CLmJCN07cZTszlWlCovXdqIbWGdJnzQeHVJihIwQqJVm2jhoyKE ZJ0g== X-Gm-Message-State: AOAM532PQa1lS+oWterKUz+gih3NGBsAHByTQ3VuqsDBkeBVUVMAXH+E 3H0SVn0kV/T1Pl1/w2F6uBDjrfx8wcc= X-Google-Smtp-Source: ABdhPJxSHroMt2xxm9j6HPlFCxNtZi0ZE796yjooJcv2kqLh57FWYPa9L7soH9QwYfxjCqX5sPzZWw== X-Received: by 2002:a05:600c:1546:: with SMTP id f6mr2060633wmg.125.1629188156700; Tue, 17 Aug 2021 01:15:56 -0700 (PDT) Received: from localhost.localdomain ([178.237.233.111]) by smtp.gmail.com with ESMTPSA id l21sm1256238wmh.31.2021.08.17.01.15.55 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Aug 2021 01:15:56 -0700 (PDT) From: Miriam Rubio To: git@vger.kernel.org Cc: Tanushree Tumane , Christian Couder , Miriam Rubio Subject: [PATCH v4 5/6] bisect--helper: reimplement `bisect_run` shell function in C Date: Tue, 17 Aug 2021 10:14:57 +0200 Message-Id: <20210817081458.53136-6-mirucam@gmail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210817081458.53136-1-mirucam@gmail.com> References: <20210817081458.53136-1-mirucam@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Tanushree Tumane Reimplement the `bisect_run()` shell function in C and also add `--bisect-run` subcommand to `git bisect--helper` to call it from git-bisect.sh. Mentored-by: Christian Couder Signed-off-by: Tanushree Tumane Signed-off-by: Miriam Rubio --- builtin/bisect--helper.c | 75 ++++++++++++++++++++++++++++++++++++++++ git-bisect.sh | 62 +-------------------------------- 2 files changed, 76 insertions(+), 61 deletions(-) diff --git a/builtin/bisect--helper.c b/builtin/bisect--helper.c index 4258429c1c..852e0a30fb 100644 --- a/builtin/bisect--helper.c +++ b/builtin/bisect--helper.c @@ -31,6 +31,7 @@ static const char * const git_bisect_helper_usage[] = { N_("git bisect--helper --bisect-replay "), N_("git bisect--helper --bisect-skip [(|)...]"), N_("git bisect--helper --bisect-visualize"), + N_("git bisect--helper --bisect-run ..."), NULL }; @@ -1075,6 +1076,71 @@ static int bisect_visualize(struct bisect_terms *terms, const char **argv, int a return res; } +static int bisect_run(struct bisect_terms *terms, const char **argv, int argc) +{ + int res = BISECT_OK; + struct strbuf command = STRBUF_INIT; + struct strvec args = STRVEC_INIT; + struct strvec run_args = STRVEC_INIT; + int exit = 0; + + if (bisect_next_check(terms, NULL)) + return BISECT_FAILED; + + if (argc) + sq_quote_argv(&command, argv); + else + return BISECT_FAILED; + + strvec_push(&run_args, command.buf); + + while (1) { + strvec_clear(&args); + exit = 1; + + printf(_("running %s"), command.buf); + res = run_command_v_opt(run_args.v, RUN_USING_SHELL); + + if (res < 0 || 128 <= res) { + error(_("bisect run failed: exit code %d from" + " '%s' is < 0 or >= 128"), res, command.buf); + strbuf_release(&command); + return res; + } + + if (res == 125) + strvec_push(&args, "skip"); + else if (res > 0) + strvec_push(&args, terms->term_bad); + else + strvec_push(&args, terms->term_good); + + res = bisect_state(terms, args.v, args.nr); + + if (res == BISECT_ONLY_SKIPPED_LEFT) + error(_("bisect run cannot continue any more")); + else if (res == BISECT_INTERNAL_SUCCESS_MERGE_BASE) { + printf(_("bisect run success")); + res = BISECT_OK; + } else if (res == BISECT_INTERNAL_SUCCESS_1ST_BAD_FOUND) { + printf(_("bisect found first bad commit")); + res = BISECT_OK; + } else if (res) { + error(_("bisect run failed:'git bisect--helper --bisect-state" + " %s' exited with error code %d"), args.v[0], res); + } else { + exit = 0; + } + + if (exit) { + strbuf_release(&command); + strvec_clear(&args); + strvec_clear(&run_args); + return res; + } + } +} + int cmd_bisect__helper(int argc, const char **argv, const char *prefix) { enum { @@ -1089,6 +1155,7 @@ int cmd_bisect__helper(int argc, const char **argv, const char *prefix) BISECT_REPLAY, BISECT_SKIP, BISECT_VISUALIZE, + BISECT_RUN, } cmdmode = 0; int res = 0, nolog = 0; struct option options[] = { @@ -1112,6 +1179,8 @@ int cmd_bisect__helper(int argc, const char **argv, const char *prefix) N_("skip some commits for checkout"), BISECT_SKIP), OPT_CMDMODE(0, "bisect-visualize", &cmdmode, N_("visualize the bisection"), BISECT_VISUALIZE), + OPT_CMDMODE(0, "bisect-run", &cmdmode, + N_("use ... to automatically bisect."), BISECT_RUN), OPT_BOOL(0, "no-log", &nolog, N_("no log for BISECT_WRITE")), OPT_END() @@ -1177,6 +1246,12 @@ int cmd_bisect__helper(int argc, const char **argv, const char *prefix) get_terms(&terms); res = bisect_visualize(&terms, argv, argc); break; + case BISECT_RUN: + if (!argc) + return error(_("bisect run failed: no command provided.")); + get_terms(&terms); + res = bisect_run(&terms, argv, argc); + break; default: BUG("unknown subcommand %d", cmdmode); } diff --git a/git-bisect.sh b/git-bisect.sh index 95f7f3fb8c..e83d011e17 100755 --- a/git-bisect.sh +++ b/git-bisect.sh @@ -39,66 +39,6 @@ _x40="$_x40$_x40$_x40$_x40$_x40$_x40$_x40$_x40" TERM_BAD=bad TERM_GOOD=good -bisect_run () { - git bisect--helper --bisect-next-check $TERM_GOOD $TERM_BAD fail || exit - - test -n "$*" || die "$(gettext "bisect run failed: no command provided.")" - - while true - do - command="$@" - eval_gettextln "running \$command" - "$@" - res=$? - - # Check for really bad run error. - if [ $res -lt 0 -o $res -ge 128 ] - then - eval_gettextln "bisect run failed: -exit code \$res from '\$command' is < 0 or >= 128" >&2 - exit $res - fi - - # Find current state depending on run success or failure. - # A special exit code of 125 means cannot test. - if [ $res -eq 125 ] - then - state='skip' - elif [ $res -gt 0 ] - then - state="$TERM_BAD" - else - state="$TERM_GOOD" - fi - - git bisect--helper --bisect-state $state >"$GIT_DIR/BISECT_RUN" - res=$? - - cat "$GIT_DIR/BISECT_RUN" - - if sane_grep "first $TERM_BAD commit could be any of" "$GIT_DIR/BISECT_RUN" \ - >/dev/null - then - gettextln "bisect run cannot continue any more" >&2 - exit $res - fi - - if [ $res -ne 0 ] - then - eval_gettextln "bisect run failed: -'bisect-state \$state' exited with error code \$res" >&2 - exit $res - fi - - if sane_grep "is the first $TERM_BAD commit" "$GIT_DIR/BISECT_RUN" >/dev/null - then - gettextln "bisect run success" - exit 0; - fi - - done -} - get_terms () { if test -s "$GIT_DIR/BISECT_TERMS" then @@ -137,7 +77,7 @@ case "$#" in log) git bisect--helper --bisect-log || exit ;; run) - bisect_run "$@" ;; + git bisect--helper --bisect-run "$@" || exit;; terms) git bisect--helper --bisect-terms "$@" || exit;; *) From patchwork Tue Aug 17 08:14:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Miriam R." X-Patchwork-Id: 12440845 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 55EF2C4320A for ; Tue, 17 Aug 2021 08:16:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3344861076 for ; Tue, 17 Aug 2021 08:16:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239134AbhHQIQp (ORCPT ); Tue, 17 Aug 2021 04:16:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54684 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239009AbhHQIQb (ORCPT ); Tue, 17 Aug 2021 04:16:31 -0400 Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C6915C061796 for ; Tue, 17 Aug 2021 01:15:58 -0700 (PDT) Received: by mail-wr1-x435.google.com with SMTP id u16so10172899wrn.5 for ; Tue, 17 Aug 2021 01:15:58 -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=Ps8XQ6/tfGW20fP6zT9xStDCFQFc67Jxvuu8zJ63dDs=; b=ds/kEgkBAOQpyx3d/84Mns4z5WX3RSHc9nni3FOW+BzehA6LRaSG52BsMUARTWbcES DJRGxqtu2v3Iqe2Zm8xP6vxBGyI6tdzH1UGoxMkD8uY2vvWqVpeuy2JVTrtKbcUrTZbN S6CxwwXUvLnxhh8cu/jWgUZDh/APoezfU+DrAOpETABeqyz2Fx8IMmLrf8d3hLtIhGpV Y3GRffpRZElUYnsd+UyDFhTsxP0G2/GekuIOFLsheSGcMklz/RtH88r6jQB5NFdcyVyg lFIYcwCLNyrKQ23PIlvEhivujMZLKSqp/wFxC/PbmAi4HPwlSvjsZgM60I7/GPVOk6l0 NS1A== 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=Ps8XQ6/tfGW20fP6zT9xStDCFQFc67Jxvuu8zJ63dDs=; b=EYDOLvumA6MGjHm+Oj60uqXtbDHv7zMNb5JFolmZY6LiwaR5TBcy8Upar0HNFWaa+L PMjVIEb8Mouh8KJ+FeMfsT9IA8ZtM8Siv6X8Eyhnjbwj0kuQP25cSez9rIFZJNluUuEr sHR7rxhvETHkFWXXWnLTHIPnKvdFJbueAUF1cDGvgccPfI2+nsrDsOCHvD2fSa6gAsha jldtHyAJnpluX6cGMnNZ8ue108cPsDYG2Inf6TFHuAzWlOR35W7b1wAZalUNM/VhWexs dFL9oUqYI3Yz3/t4+pM+at/0Pb+KtX9xZh+d+YWwbZqMUnOUKIZpzN0LYRvQRlpp2tjB NyJA== X-Gm-Message-State: AOAM533fhpm5zrCMREn4dNLURSPT+4I7LGkr4M/zyDFOfiQ3+ytcDnf2 aCJNJOu/685B586E888xZzgg+i2NAhc= X-Google-Smtp-Source: ABdhPJyQjihlQTedpRGx0a1K9SoP8mfhamv9BhKfTDNr+fIGYQSnqV2Wm8G3HmCiYtriB7PAILCZ5Q== X-Received: by 2002:adf:f047:: with SMTP id t7mr2448311wro.337.1629188157425; Tue, 17 Aug 2021 01:15:57 -0700 (PDT) Received: from localhost.localdomain ([178.237.233.111]) by smtp.gmail.com with ESMTPSA id l21sm1256238wmh.31.2021.08.17.01.15.56 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Aug 2021 01:15:57 -0700 (PDT) From: Miriam Rubio To: git@vger.kernel.org Cc: Miriam Rubio Subject: [PATCH v4 6/6] bisect--helper: retire `--bisect-next-check` subcommand Date: Tue, 17 Aug 2021 10:14:58 +0200 Message-Id: <20210817081458.53136-7-mirucam@gmail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210817081458.53136-1-mirucam@gmail.com> References: <20210817081458.53136-1-mirucam@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org After reimplementation of `git bisect run` in C, `--bisect-next-check` subcommand is not needed anymore. Let's remove it from options list and code. Mentored by: Christian Couder Signed-off-by: Miriam Rubio --- builtin/bisect--helper.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/builtin/bisect--helper.c b/builtin/bisect--helper.c index 852e0a30fb..d749747639 100644 --- a/builtin/bisect--helper.c +++ b/builtin/bisect--helper.c @@ -21,7 +21,6 @@ static GIT_PATH_FUNC(git_path_bisect_first_parent, "BISECT_FIRST_PARENT") static const char * const git_bisect_helper_usage[] = { N_("git bisect--helper --bisect-reset []"), - N_("git bisect--helper --bisect-next-check []"), N_("git bisect--helper --bisect-terms [--term-good | --term-old | --term-bad | --term-new]"), N_("git bisect--helper --bisect-start [--term-{new,bad}= --term-{old,good}=]" " [--no-checkout] [--first-parent] [ [...]] [--] [...]"), @@ -1200,12 +1199,6 @@ int cmd_bisect__helper(int argc, const char **argv, const char *prefix) return error(_("--bisect-reset requires either no argument or a commit")); res = bisect_reset(argc ? argv[0] : NULL); break; - case BISECT_NEXT_CHECK: - if (argc != 2 && argc != 3) - return error(_("--bisect-next-check requires 2 or 3 arguments")); - set_terms(&terms, argv[1], argv[0]); - res = bisect_next_check(&terms, argc == 3 ? argv[2] : NULL); - break; case BISECT_TERMS: if (argc > 1) return error(_("--bisect-terms requires 0 or 1 argument"));