From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-11.2 required=3.0 tests=AWL,BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by dcvr.yhbt.net (Postfix) with ESMTP id 0628D1F626 for ; Mon, 13 Feb 2023 18:28:19 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20210112 header.b=iKI1el85; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230095AbjBMS2C (ORCPT ); Mon, 13 Feb 2023 13:28:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47680 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231349AbjBMS1r (ORCPT ); Mon, 13 Feb 2023 13:27:47 -0500 Received: from mail-yw1-x112c.google.com (mail-yw1-x112c.google.com [IPv6:2607:f8b0:4864:20::112c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B701D2201C for ; Mon, 13 Feb 2023 10:27:07 -0800 (PST) Received: by mail-yw1-x112c.google.com with SMTP id 00721157ae682-52bfa3dfd95so174719117b3.9 for ; Mon, 13 Feb 2023 10:27:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=AAaUGQ7s1P/TTeIW0LY5CRrNDKiD5IyjynePJ3IipUw=; b=iKI1el852wlcyQomXU2NO1O7ORWrckjEB7cdkSUXETjCKWwQBJip3QHAxKDIJh7qNo gBZo7+9969vMn+kuYwb9hwSZs6r494iF4qZaZ4NcGtGin3IPUy/uVdYB9JP9jaglc4nJ bUxv/vOMFDzPkhnr7p/fzIlbH33mbq1uTZ9CIlWRx+v67UzTYItux1FAVka46yZ1wNnV InE+RoYzznkBthEA3uUnHp8stNJakFbwyK9FDMrke+2HSJoJEODv9oBfjz28uR7nxb42 jQXZK8Mw2Tzk5rNhDP9gMwEOibRraSdfGfYYDeMbywrY9VylURHyJtOmPVAtcNddah26 DqTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=AAaUGQ7s1P/TTeIW0LY5CRrNDKiD5IyjynePJ3IipUw=; b=MOqrghb+9jenItZvjJUh/cMxTKwbjJx43AjqAfFSaaiFBqIpqx1eZ84Qy0z52G3aCh /5IE5MF2UHFk3Ex4cim0neTT5/C5FVECY9wjB63REXkU3pCQv8rToAmcxqAFy/gtLHcx L1DKiJLCXgbL8LNj5HNHYweUBu06Pnel/m7ykPwmN4IJpcmcMoiRlRlD+Kp5amgINJ3L G2E/DqN5Z16bvqauY0RGxY04G5fnrvgN+fVo7AzQCJlF5LQUciPv6T6AGGOF9VzgvWH6 2/9kgOUGOhf3zT+Rp0M5+/SxCkEruxy/DtdG2VjB14AR5aPsRHyDw4XYIWfsQ+tkpb29 nqsg== X-Gm-Message-State: AO0yUKVPg6Y+CK+asG1m331IaEr+5xOmS0HbZgpDLpdafqDkiMP62xqj 3MmckjK8TZogtvYhSGtbExWwZY5XwkAp0jh13USaNQ== X-Google-Smtp-Source: AK7set8hV9sRMvkjhFl4ARgPHfFY8InlVo+NyJpgsKBy6lU22pMwp5yBQhBAzr9+PHe1uDJvX2dHXP7wGcjfc1g85OE= X-Received: by 2002:a81:8804:0:b0:527:bdc3:c0fb with SMTP id y4-20020a818804000000b00527bdc3c0fbmr3319637ywf.344.1676312821847; Mon, 13 Feb 2023 10:27:01 -0800 (PST) MIME-Version: 1.0 References: <20230207181706.363453-1-calvinwan@google.com> <20230209000212.1892457-2-calvinwan@google.com> In-Reply-To: From: Calvin Wan Date: Mon, 13 Feb 2023 10:26:50 -0800 Message-ID: Subject: Re: [PATCH v8 1/6] run-command: add duplicate_output_fn to run_processes_parallel_opts To: Junio C Hamano Cc: Glen Choo , git@vger.kernel.org, avarab@gmail.com, newren@gmail.com, jonathantanmy@google.com, phillip.wood123@gmail.com Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org > > Sidenote: One convention from JS that I like is to name such event > > listeners as "on_", e.g. "on_output_buffered". > > Thanks for bringing this up. I agree that "Upon X happening, do > this" is a very good convention to follow. I think the callback is > made whenever the child emits to the standard error stream, so > "on_error_output" (if we are worried that "error" has a too strong > "something bad happend" connotation, then perhaps "on_stderr_output" > may dampen it) perhaps? "on_stderr_output" sounds much better than "duplicate_output". I did spend much time trying to come up with a better name, but couldn't find anything that conveyed what the expected use case of this function was. Thanks, I'll rename it on my next reroll.