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: AS3215 2.6.0.0/16 X-Spam-Status: No, score=-2.9 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_CSS,URIBL_CSS_A shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by dcvr.yhbt.net (Postfix) with ESMTP id B96CB1F54E for ; Fri, 12 Aug 2022 20:27:19 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (1024-bit key; unprotected) header.d=pobox.com header.i=@pobox.com header.b="C5SWkbd4"; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230293AbiHLU0d (ORCPT ); Fri, 12 Aug 2022 16:26:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50208 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229704AbiHLU0c (ORCPT ); Fri, 12 Aug 2022 16:26:32 -0400 Received: from pb-smtp21.pobox.com (pb-smtp21.pobox.com [173.228.157.53]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC99793535 for ; Fri, 12 Aug 2022 13:26:29 -0700 (PDT) Received: from pb-smtp21.pobox.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id E13701B1AB2; Fri, 12 Aug 2022 16:26:28 -0400 (EDT) (envelope-from junio@pobox.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=XpOMkY2TvKa2/19LJ6O4+WrU+iIj9UmedZvGBL ymMA4=; b=C5SWkbd4y5bBCprRL/V05CIb746TcHT/C4hmePH/YlRvRl2ioLiAIz cURfurJLPGi8Yg4fnDYdEr17nEEKQWQS/5OQk2nTIG6l3QlrnNeoHwCtOrkY6W/l G6GHiWahNvalJ25aar3qsEtdNus9kF6eNf4rXMj/oBEytBvSx54zs= Received: from pb-smtp21.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id D921F1B1AB1; Fri, 12 Aug 2022 16:26:28 -0400 (EDT) (envelope-from junio@pobox.com) Received: from pobox.com (unknown [34.145.39.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp21.pobox.com (Postfix) with ESMTPSA id 893BB1B1AB0; Fri, 12 Aug 2022 16:26:25 -0400 (EDT) (envelope-from junio@pobox.com) From: Junio C Hamano To: "Victoria Dye via GitGitGadget" Cc: git@vger.kernel.org, derrickstolee@github.com, johannes.schindelin@gmx.de, =?utf-8?B?w4Z2YXIgQXJuZmrDtnLDsA==?= Bjarmason , Victoria Dye Subject: Re: [PATCH v4 05/11] scalar-diagnose: move functionality to common location References: Date: Fri, 12 Aug 2022 13:26:24 -0700 In-Reply-To: (Victoria Dye via GitGitGadget's message of "Fri, 12 Aug 2022 20:10:13 +0000") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: 09C95772-1A7D-11ED-8593-CBA7845BAAA9-77302942!pb-smtp21.pobox.com Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org "Victoria Dye via GitGitGadget" writes: > + res = write_archive(archiver_args.nr, (const char **)argv_copy, NULL, > + the_repository, NULL, 0); > + if (res) { > + error(_("failed to write archive")); > + goto diagnose_cleanup; > + } > + > + fprintf(stderr, "\n" > + "Diagnostics complete.\n" > + "All of the gathered info is captured in '%s'\n", > + zip_path->buf); > + > +diagnose_cleanup: > + if (archiver_fd >= 0) { > + dup2(stdout_fd, STDOUT_FILENO); > + close(stdout_fd); > + close(archiver_fd); > + } Hmph, after reading https://lore.kernel.org/git/32f2cadc-556e-1cd5-a238-c8f1cdaaf470@github.com/ I would have expected to see the above part more like: res = write_archive(...); diagnose_cleanup: if (res) error(...); else fprintf(stderr, "Diag complete"); if (archiver_fd >= 0) { ...