πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.git
Article #578

Re: [PATCH] t0081: modernize the code testing whether a file exists

#578
From: Kaartic Sivaraam
Date: Thu, 15 Oct 2026 11:43
51 lines
9970 bytes

On 10/15/26 03:17, Junio C Hamano wrote:
> Usman Akinyemi <usmanakinyemi202@gmail.com> writes:
> 
>>> From: Shashank <shashu8660@gmail.com>
>>>
>>> Replace the old-style shell `test -f` command with Git's modern
>>> `test_path_is_file`.
>>>
>>> This instance was found using:
>>> `git grep "test -[efd]" t/'
>> This is not necessary, remove it.
> 
> Since many candidates are working on similar microprojects (which is
> fine) and making the same mistakes (which is expected), perhaps mentors
> should tell them to read the review exchanges on other candidates'
> patches and learn from them, instead of or in addition to giving the
> same advice repeatedly.

I agree that it is a good advice to ask candidate to read other 
candidates' patches. We do recommend this in our guide related to 
working on Microprojects:

  
https://git.github.io/General-Microproject-Information/#research-existing-related-work

That said, I just wanted to highlight one thing. In the Microproject 
ideas page[1], we have the following for this specific idea:

   Notes

   - Start small: Pick a test file with just a few instances to convert
   - Run the test suite after your changes to ensure nothing breaks
   - Follow Git’s commit message style
   - Include which command you used to find the instances in your commit
     message

So, we can't really blame the candidates for including the command in 
the commit message. It is our mistake asking them to include it in the 
first place when we don't prefer it to be present there.

I raised a PR to fix that:

   https://github.com/git/git.github.io/pull/875

[1]: https://git.github.io/SoC-2026-Microprojects/

-- 
Sivaraam
Technical Details
Message-ID: <9c905a79-22a2-4db2-b434-00ad8a287300@gmail.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!git+bounces-72125-linux-kernel-git=dewy.ru
References: <pull.2254.git.1791962806807.gitgitgadget@gmail.com> <CAPSxiM9-F-1XKvWeEnBk=_FyKyev5pfnid4fiN-OjLYLnCTWVw@mail.gmail.com> <xmqqzewgosyw.fsf@gitster.g>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!git+bounces-72125-linux-kernel-git=dewy.ru
From: kaartic.sivaraam@gmail.com (Kaartic Sivaraam)
Newsgroups: linux.kernel.git
Subject: Re: [PATCH] t0081: modernize the code testing whether a file exists
Date: Thu, 15 Oct 2026 17:13:33 +0530
Organization: Usenet Network
Message-ID: <9c905a79-22a2-4db2-b434-00ad8a287300@gmail.com>
References: <pull.2254.git.1791962806807.gitgitgadget@gmail.com>
 <CAPSxiM9-F-1XKvWeEnBk=_FyKyev5pfnid4fiN-OjLYLnCTWVw@mail.gmail.com>
 <xmqqzewgosyw.fsf@gitster.g>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="2519668"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:vz48NlWRAER7lDyTW+vxJ5ubhaE= sha256:rZdRSM09OwrxgU81lONQN5r3S+9YAjhyCIsabrHiEww=
	sha1:YQPF5Ph78uY2A0nFQTrIKeipjpA= sha256:mZZp5Aokw4Rpfc6JONBJJraNt0h9lrMeAQzIHHjpUJY=
Content-Language: en-US
List-ID: <git.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id 8EEEB1102E9; Thu, 15 Oct 2026 14:44:02 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -0.847
X-Spam-Status: No, score=-0.847 tagged_above=-9999 required=6.31
	tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
	FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001,
	HEADER_FROM_DIFFERENT_DOMAINS=0.25, MAILING_LIST_MULTI=-1,
	SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001]
	autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=gmail.com
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id aOPIspVOtmEQ;
	Thu, 15 Oct 2026 14:43:55 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=git+bounces-72125-linux-kernel-git=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=gmail.com
X-Received: from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74])
	by mail.dewy.ru (Postfix) with ESMTPS id 63587110294; Thu, 15 Oct 2026 14:43:46 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1])
	by sto.lore.kernel.org (Postfix) with ESMTP id 6DC9D60A5FE; Thu, 15 Oct 2026 11:43:45 +0000 (UTC)
X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 5FA7747F79F;
	Thu, 15 Oct 2026 11:43:41 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="U72J8khV"
X-Received: from mail-dy1-f172.google.com (mail-dy1-f172.google.com [74.125.82.172])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 38A7A277C96
	for <git@vger.kernel.org>; Thu, 15 Oct 2026 11:43:39 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.172
X-ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1792064620; cv=none; b=QWyTTrWDNBPvYlWSwghCtSQSm18mg93DfPdBqp+pQO0LWnPzoW9Qc3o70NllEUkH+P97zdDWNUqyfxjZoRLE16phU1rwvMfLqARhwy5BBIx+DogI5u51OaDTsOoQIRgQmFZ/62KRH/htkWIMqFYAarikk7mpouKam5fBBt36BeQ=
X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1792064620; c=relaxed/simple;
	bh=TTdYuQYDOB8xPWzUmX6bhkGEv9c0TzKiWij+8iKEdQ8=;
	h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:
	 In-Reply-To:Content-Type; b=Vb6yEskvvZU2h6LA0BbPxQFgQiDIVm0SDscQ14ZTONTSnqcxGIbfS/MqM/mpa2F9Ey4MTeUDOQSbXmwx1+Jve/p/AaAgWPkvJNFpEKwp27TX2e+PXCx3S9S9rY78vdAjiz8NGg/jiiDPOKAgfZg+t5EpJ7dapNvR4o1ISnbGSPE=
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=U72J8khV; arc=none smtp.client-ip=74.125.82.172
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
X-Received: by mail-dy1-f172.google.com with SMTP id 5a478bee46e88-3535bf8b3e0so3063560eec.0
        for <git@vger.kernel.org>; Thu, 15 Oct 2026 04:43:39 -0700 (PDT)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20251104; t=1792064618; x=1792669418; darn=vger.kernel.org;
        h=content-transfer-encoding:content-type:in-reply-to:from
         :content-language:references:cc:to:subject:user-agent:mime-version
         :date:message-id:from:to:cc:subject:date:message-id:reply-to
         :content-type;
        bh=W0aFcyzav3yRrgdO3t4CV97fWmNujYW0y0Iny723duE=;
        b=U72J8khVZHgyeoU+XQyH8jeGgikaEpEBh7pjJm12P2X+6sWMnSotcnWrH54TM8F2tr
         qRR/X3NDwoWsZmDcJ6ShivzLRSMyWZf2lCdkq1eQUZha4iW7Se1TwYXKesJqIdeYuJ9j
         nN2HvsfEVktJdS7VZ9cl/6y8QDakcxDafup9RS8JRohWBJeB2JPYTeVXvbVb4BG6XYHb
         DH1Lyx0BGxP/VvYxtruFR7+EE7WaThoMzmycha3DgQLzXQEEpZUZfW/6cXIMnrJd0f5m
         cRLpZzaVoHJ+Gtke0tSa1nvXxwgKQJ8jfwhOiv7BQ6AbB88Pfqc8URWSJOD6SmRsSFCk
         O97Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20260707; t=1792064618; x=1792669418;
        h=content-transfer-encoding:content-type:in-reply-to:from
         :content-language:references:cc:to:subject:user-agent:mime-version
         :date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date
         :message-id:reply-to:content-type;
        bh=W0aFcyzav3yRrgdO3t4CV97fWmNujYW0y0Iny723duE=;
        b=B+M/nQWWwTOZ1ERdWiwnOCqA+8VGLiWo0P2tA31AzlSUQQ7SsAt9qfLbcNynY6Jh49
         H43iUBenJASpOX1/5Gm3PDT8ND7t3k5UN3Blpg+nPtzjX2x8pFl0Pg4IW46vVnseSdIq
         fMdtmlqWawTypajmp78g6/r6ZAne/yeASuDy79AQZYHduJGvOUwc34g87LXkwwQR0uFq
         Eon+smZDcKYwF5Cx/yTlYDMKbjb2dkr+utqY24LITxHR5N1oTrnlZMl7uAFZ9jkqgsG2
         xWx6cBU/tlftc506ONLX3cmNenTILsbvgkWu3lVSPJ+18qh70Llwmvm2sM7TyXp/wlWk
         vRsA==
X-Forwarded-Encrypted: i=1; AKwUvByBkyc5aJz766c6TtNb+pTPfa1LyWsMelMOatcuoR7RaJN6hvt0r2CqivN2FBwTA7DaXTA=@vger.kernel.org
X-Gm-Message-State: AFq9FYI5krYrtvGPe3Hq/kF5w3EMpA7PJ63P8blLH03Nhp4XPqSsS1GF
	vPw/Fm4b5tjkAakdKRGo6n+dvgB0jhf5cleXhOGDcaa5OrGZMe7kcDS7
X-Gm-Gg: AYBFou1iOP1ZV8i5rUl/qI2+IUZrSV016lzGfW8YTTwyqSCp2gA7+I9Wvozf7BZm+5S
	JZ8q2QenBn54PC7ow92udfi15yxus+VViw+TOZi/l2RrghPQFAiuKeLO11eL6Ewcmj32KT26FC8
	Ea5jOF3Kzc+mAAX02W2wWSZWBHfK/9ZRVgw5h+QafVlML3XdreaYG/6y+iPOrO7SQuG1Tw575zg
	fgoUdkYtkJH6Mcf5mhJcRqMLIqlJguBrWeJ58wCT5KJoeJBvl5PpXoKReWVhqAFEeDYo5jqovU6
	zNaD4ZqvZveY7z66SXsK5Bv9Cz8ZneomWa+4Z2eCHovOFWkb/WkKNc8rjRjZHAQPx7JK0rfz/DA
	9elFS5gjRbXuDLKofx0qU7JUPYz4XOsXYGDJWQ+qaPL4hDNDFpw3xVFAtjJBlHBSKmZJrVfyAYI
	N42kNNEpJz/8iugwZuRJig6o+9UbD3AII6xIdYMmmWzlV/MUF4tzCfTtVCFvCU6jNT0MkXjcAIe
	n5EATGL5XAGZA==
X-Received: by 2002:a05:7301:797:b0:353:7e28:9c58 with SMTP id 5a478bee46e88-3537e289d93mr23541955eec.41.1792064617847;
        Thu, 15 Oct 2026 04:43:37 -0700 (PDT)
X-Received: from [192.168.25.219] ([115.108.41.154])
        by smtp.gmail.com with ESMTPSA id 5a478bee46e88-3537cab27d5sm68356023eec.17.2026.10.15.04.43.35
        (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
        Thu, 15 Oct 2026 04:43:37 -0700 (PDT)
X-Precedence: bulk
X-Mailing-List: git@vger.kernel.org
X-List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
X-User-Agent: Mozilla Thunderbird
X-Cc: Shashank S via GitGitGadget <gitgitgadget@gmail.com>,
 git@vger.kernel.org, Christian Couder <christian.couder@gmail.com>,
 Siddharth Asthana <siddharthasthana31@gmail.com>,
 Shashank S <shashu8660@gmail.com>
X-In-Reply-To: <xmqqzewgosyw.fsf@gitster.g>