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=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no 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 200A3C433ED for ; Fri, 30 Apr 2021 16:13:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DC329613F8 for ; Fri, 30 Apr 2021 16:13:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229720AbhD3QOg convert rfc822-to-8bit (ORCPT ); Fri, 30 Apr 2021 12:14:36 -0400 Received: from mav.lukeshu.com ([104.207.138.63]:46310 "EHLO mav.lukeshu.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229579AbhD3QOg (ORCPT ); Fri, 30 Apr 2021 12:14:36 -0400 Received: from lukeshu-dw-thinkpad (unknown [IPv6:2601:281:8200:26:4e34:88ff:fe48:5521]) by mav.lukeshu.com (Postfix) with ESMTPSA id EF53980590; Fri, 30 Apr 2021 12:13:42 -0400 (EDT) Date: Fri, 30 Apr 2021 10:13:42 -0600 Message-ID: <87k0ojpx6x.wl-lukeshu@lukeshu.com> From: Luke Shumaker To: =?ISO-8859-1?Q?=C6var_Arnfj=F6r=F0?= Bjarmason Cc: Luke Shumaker , git@vger.kernel.org, Avery Pennarun , Charles Bailey , Danny Lin , "David A .\ Greene" , David Aguilar , James Denholm , Jeff King , Jonathan Nieder , Junio C Hamano , =?UTF-8?B?Tmd1eeG7hW4g?= =?ISO-8859-1?Q?Th=E1i_?= =?UTF-8?B?Tmfhu41j?= Duy , Roger L Strain , Techlive Zheng , Eric Sunshine , Luke Shumaker Subject: Re: [PATCH v3 05/30] subtree: t7900: comment subtree_test_create_repo In-Reply-To: <87tunoxfls.fsf@evledraar.gmail.com> References: <20210426174525.3937858-1-lukeshu@lukeshu.com> <20210427211748.2607474-1-lukeshu@lukeshu.com> <20210427211748.2607474-6-lukeshu@lukeshu.com> <87tunoxfls.fsf@evledraar.gmail.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.2 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On Fri, 30 Apr 2021 03:48:36 -0600, Ævar Arnfjörð Bjarmason wrote: > On Tue, Apr 27 2021, Luke Shumaker wrote: > > It's unclear what the purpose of t7900-subtree.sh's > > `subtree_test_create_repo` helper function is. It wraps test-lib.sh's, > > `test_create_repo` but follows that up by setting log.date=relative. Why > > does it set log.date=relative? > > > > My first guess was that at one point the tests required that, but no > > longer do, and that the function is now vestigial. I even wrote a patch > > to get rid of it and was moments away from `git send-email`ing it. > > > > However, by chance when looking for something else in the history, I > > discovered the true reason, from e7aac44ed2 (contrib/subtree: ignore > > log.date configuration, 2015-07-21). It's testing that setting > > log.date=relative doesn't break `git subtree`, as at one point in the past > > that did break `git subtree`. > > This commit message is too much about describing the journey IMO. We > could just get straight to the point, e.g. something like: > > Add a comment about why the git-subtree.sh tests set > log.relative. It's to test that we don't have a regression of the > bug fixed in e7aac44ed2 [...]. OK, I'll reword it if I re-roll. > FWIW I think just having an isolated test for this would be better, but > since you're just refactoring existing code I think this is fine. > > I.e. we'd use "git init" in the rest, and just have a test that stresses > this specifically. Or is the entry into git-subtree.sh so varied that we > need to "fuzz" all the tests like this to fully test it? I haven't > checked. I'd have to examine it a bit more to be sure, but I think that you're right. That as long as the test does a 'split' that creates new commits, then just one test should be fine. -- Happy hacking, ~ Luke Shumaker