Subject: Re: [PATCH 2/4] mingw: drop Windows 7-specific work-around

From: Oswald Buddenhagen <[email-masked]>
Date: Mon, 4 Aug 2025 10:54:54 +0200

On Sun, Aug 03, 2025 at 09:25:16PM +0000, Johannes Schindelin via GitGitGadget wrote:
>From: Johannes Schindelin <[email-masked]>
>
>In ac33519ddfa8 (mingw: restrict file handle inheritance only on Windows
>7 and later, 2019-11-22), I introduced code to safe-guard the
>defense-in-depth handling that restricts handles' inheritance so that it
>would work with Windows 7, too.
>
>Let's revert this patch: Git for Windows dropped supporting Windows 7 (and
>Windows 8) directly after Git for Windows v2.46.2.
>
it doesn't follow from this why it's apparently ok to remove this for 
even newer versions.

>+	 * On the off-chance that something with the file handle restriction
>+	 * went wrong, silently fall back to trying without it.
> 	 */
>+	if (!ret && stdhandles_count) {
>
the comment should really spell out what that off chance is, so one 
doesn't have to check the log.

it may also make sense to elaborate why just dropping the restrictions 
isn't a problem - my first thought is "huh, doesn't this open the door 
for security holes, at least theoretically?"