From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-3.6 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by dcvr.yhbt.net (Postfix) with ESMTP id 07BE31F4B4 for ; Tue, 22 Dec 2020 00:02:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726344AbgLVABV (ORCPT ); Mon, 21 Dec 2020 19:01:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47546 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726121AbgLVABV (ORCPT ); Mon, 21 Dec 2020 19:01:21 -0500 Received: from mail-oi1-x236.google.com (mail-oi1-x236.google.com [IPv6:2607:f8b0:4864:20::236]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6AE54C061793 for ; Mon, 21 Dec 2020 16:00:41 -0800 (PST) Received: by mail-oi1-x236.google.com with SMTP id l200so13015461oig.9 for ; Mon, 21 Dec 2020 16:00:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=vftSUcxQWkp9fIaJSNsEJeB0iEqkuXOTbL1a4hffdm4=; b=PfTWFfF2TVPuwfVYhvgNEaa5QmjhVFLem3Z93f9/IB7Vx3PRQ6BVgZcI3ab43HhIM9 EEXs//ncUnmfgjan+y05UZLvjWrngPqx9e6OXEwqI/BjHo8/LD62dh7NCC7JALzB6bWH LcD4WuntCCKnxUuyoIXnerBBxlzbRRiOY65HjThANApkUGCZn0E2k8y1JKMXn5R1ukje V64D8mgQdsymXg20RXvxC4B2LSRaJ01JynPo4bhJYo/eZAY63r3hlhN/m1rn4G+dYFOW Z0Oa45vHlBICbAZiQ7uSL8pMbLuJbvq+CkWo4HskuLorUUKHiczD8VjzaopcWOLNRA1J TuIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=vftSUcxQWkp9fIaJSNsEJeB0iEqkuXOTbL1a4hffdm4=; b=dAKAEAn0+B78wIvxXkNaj1oaXPxdQaIc9ds1iJaKHEzbcdftAGHsCNI8IFwKk2Ur1e /7rGYNgBKIbSZZPBYTR93L4zIIi3sjU7sZFsPcGZ4jBfNzFK0O0RNMXQfWEZzkS02j8+ bRIHFP+rUaA40s1SzPb+dtmqkusSoAeON284apbXEq2TuqTV2Y7qD+1kfHfsupWUDBxR m0a/6HqK6OLo2/uRhNJvOT6SWFOU3Q5oEssj6DIHK6OR3x362ZfVjoZYF4j1B7q1r16Q +DRYsFYJPFUjR+ur2EZtkhrTxe7v0tNfX8FfJtNkz94ZKM5VSRiHnHPGkAjelgTb00rG e5ug== X-Gm-Message-State: AOAM533IC98DpKbn/emjaGUovfacTXF5T83LuOf1r71aotyDciNfgyfl 4fn29vWCH+lHu1NEXmznoiutyWAqgNNEFI/1/VK+5rdmRH1hnsAs X-Google-Smtp-Source: ABdhPJypHhwNe4mqQhSJEiLffOGjkmNRY0TBNmtIfURJWY8i1Jtelk8ShnRg1w6Y5U7zJ0fBeA/8D65Lpuac4V221Ew= X-Received: by 2002:aca:bac3:: with SMTP id k186mr12355954oif.93.1608595240765; Mon, 21 Dec 2020 16:00:40 -0800 (PST) MIME-Version: 1.0 References: <733c674bd1901c931a8917045eb72f661872f462.1608516320.git.gitgitgadget@gmail.com> In-Reply-To: From: Nipunn Koorapati Date: Tue, 22 Dec 2020 00:00:29 +0000 Message-ID: Subject: Re: [PATCH v3 1/3] test-lib-functions: handle --add in test_config To: Eric Sunshine Cc: Junio C Hamano , Nipunn Koorapati via GitGitGadget , Git List , Nipunn Koorapati Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org > I forgot to mention that it likely would be a good idea to at least > mention in the commit message why test_config() is not being used for > that particular case. Perhaps saying something along the lines of "one > test handles config cleanup manually since test_config() is not > prepared to take arbitrary options such as --add" -- or something > along those lines -- would be sufficient. Alternatively, an in-code > comment within the test explaining the open-coding might be more > helpful to people reading the code in the future. I found that since test_unconfig uses --unset-all, I can write a test as such test_config -C two remote.one.push +: && test_must_fail git -C two push one && git -C two config --add remote.one.push ^refs/heads/master && git -C two push one The unconfig of the test_config will --unset-all remote.one.push. I can use this technique and add a comment to that extent. --Nipunn