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-ASN: AS53758 23.128.96.0/24 X-Spam-Status: No, score=-3.8 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, 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 94FC11F934 for ; Mon, 3 May 2021 19:26:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229522AbhECT13 (ORCPT ); Mon, 3 May 2021 15:27:29 -0400 Received: from mail-ed1-f48.google.com ([209.85.208.48]:40957 "EHLO mail-ed1-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229472AbhECT12 (ORCPT ); Mon, 3 May 2021 15:27:28 -0400 Received: by mail-ed1-f48.google.com with SMTP id c22so7659515edn.7 for ; Mon, 03 May 2021 12:26:35 -0700 (PDT) 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=d6ZMAmeuu/EXf9bYKVPtcQ8Ul0AVriM8TspnARwzubc=; b=ezHuvgesWRVu3GH9oY719/9QafoTuNie/cgUTIvCsU9UOIQ1S8+/EGIT1C6FS24k2X St2KKmeU6Gn0OgehgWrIeV26+kyKX8GWmRIr3MQmj3lE3t5Ss2YEUblFmOOJGpb3AfXx 7tWaDRaL/Pk+9s/oo31Fw/QawjL+l7kpOB+DW42IpaQiTsaPo0zEdVcPXX7v/qUpHW0g b4u6PEfC1pozJcNYlEtRLIThWDvHXqlPX6pbSF0CzttqxO2l7BtUwnpt7YHgebP9qsaC ghwosH+ACuJVs8FQKOX3smyyjZ+Gz3WsNIMuhkVlw48NBXpl9MjDUBQ965iK2+nZ5PpJ v+tA== X-Gm-Message-State: AOAM532JcSV4HicoejmtG/l+LDqWcpBlTfZRUlMUGTG7D2dQCPInLf0y Y1mGm3G9iq+o8d1YU5CuKdiEmBaLSCAWXpCcT4w= X-Google-Smtp-Source: ABdhPJwAyWW9hD1xlFCh4B7OCGzkhVyAhwwX8n5CNlCP1jB+pG4mOMWBcBhr+YVLLltr9dBjeOEyDwIq7prpLA2yQpA= X-Received: by 2002:aa7:c7cc:: with SMTP id o12mr22183857eds.291.1620069994338; Mon, 03 May 2021 12:26:34 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Eric Sunshine Date: Mon, 3 May 2021 15:26:23 -0400 Message-ID: Subject: Re: [PATCH v4 3/8] for-each-repo: run subcommands on configured repos To: Andrzej Hunt Cc: Derrick Stolee via GitGitGadget , Git List , Derrick Stolee , Derrick Stolee Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On Mon, May 3, 2021 at 1:01 PM Eric Sunshine wrote: > for (i = 0; !result && i < values->nr; i++) { > const char *d = chdir(values->items[i].string); > if (chdir(d)) > die_errno(_("cannot chdir to '%s'"), d); > child.git_cmd = 1; > child.argv = argv; > result = run_command(&child); > } Without the copy/paste error, the declaration of `d` would, of course, be: const char *d = values->items[i].string;