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.7 required=3.0 tests=AWL,BAYES_00, 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 AD2501F4B4 for ; Sun, 10 Jan 2021 06:37:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726518AbhAJGfE (ORCPT ); Sun, 10 Jan 2021 01:35:04 -0500 Received: from mail-ed1-f53.google.com ([209.85.208.53]:44604 "EHLO mail-ed1-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725785AbhAJGfE (ORCPT ); Sun, 10 Jan 2021 01:35:04 -0500 Received: by mail-ed1-f53.google.com with SMTP id p22so15397431edu.11 for ; Sat, 09 Jan 2021 22:34:48 -0800 (PST) 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=eaN8h1OUnpkPPo4gPWzsf5Gg2+64vKjRJkyWw2XREOw=; b=jgaA9joXsyWnj+prZcR3nzspgetrQqCRxNW55EEGSgADVfT9cjjKtsqPo77k1T4mnr URuT9OA+tavog3kRlrq2NR668XTDxk6SSH6MGt0r57uryduYNhvk9H0gHWBiO/z1cI1S 3AjRhP72qgqRwfDcKDZcykajH3PGPH59G9Lkvwu/e4mqtSJnW0NJ8jJb5oMb9omk10r4 0khOpCt4kwNPwmAviL2RSYwD7wB0PGX7yYWe073IFZEcYlPrRO+W9qpQN+IZxYgRpYZ7 mQq1CjoWYSL3wyTl5tWu7iM5Hk1nxvVapKW/oNZk5PI/ItIYYNv7mAu4E9F95/UMWvUX 7r+Q== X-Gm-Message-State: AOAM531t89BKj44YX0cUGqnLicBfJ64AfzHAiPUVZVYeSAWJUbmxRBwc /wdeWWwBgaqznqNGvOKlA7sGCnSLtfdg4jSqiF4= X-Google-Smtp-Source: ABdhPJz6r1RRgKXgsnMYzRw487i+8ne4MQjsSCQF5rc4N/qkKuw72gTLZQKp46wlkio+gnYfCYKyjalVNiyMCvfM2FY= X-Received: by 2002:a50:f0dc:: with SMTP id a28mr10474083edm.291.1610260462136; Sat, 09 Jan 2021 22:34:22 -0800 (PST) MIME-Version: 1.0 References: <3576c7aa54e08c11ac86675ca9bc11b80366d390.1609852109.git.gitgitgadget@gmail.com> In-Reply-To: <3576c7aa54e08c11ac86675ca9bc11b80366d390.1609852109.git.gitgitgadget@gmail.com> From: Eric Sunshine Date: Sun, 10 Jan 2021 01:34:11 -0500 Message-ID: Subject: Re: [PATCH v7 3/4] maintenance: use launchctl on macOS To: Derrick Stolee via GitGitGadget Cc: Git List , Derrick Stolee , Derrick Stolee , Derrick Stolee Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On Tue, Jan 5, 2021 at 8:08 AM Derrick Stolee via GitGitGadget wrote: > [...] > The need for a user id requires us to run 'id -u' which works on > POSIX systems but not Windows. Further, the need for fully-qualitifed > path names including $HOME behaves differently in the Git internals and > the external test suite. The $HOME variable starts with "C:\..." instead > of the "/c/..." that is provided by Git in these subcommands. The test > therefore has a prerequisite that we are not on Windows. The cross- > platform logic still allows us to test the macOS logic on a Linux > machine. You forgot to remove the above paragraph... > We strive to make these tests work on all platforms, but Windows caused > some headaches. In particular, the value of getuid() called by the C > code is not guaranteed to be the same as `$(id -u)` invoked by a test. > This is because `git.exe` is a native Windows program, whereas the > utility programs run by the test script mostly utilize the MSYS2 runtime, > which emulates a POSIX-like environment. Since the purpose of the test > is to check that the input to the hook is well-formed, the actual user > ID is immaterial, thus we can work around the problem by making the the > test UID-agnostic. Another subtle issue is the $HOME environment > variable being a Windows-style path instead of a Unix-style path. We can > be more flexible here instead of expecting exact path matches. ...when you added this paragraph from my separate patch which you folded into this patch for v7. The two paragraphs are at odds with one another.