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=-6.2 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, 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 B10DF1F953 for ; Tue, 9 Nov 2021 22:58:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243139AbhKIXBN (ORCPT ); Tue, 9 Nov 2021 18:01:13 -0500 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:51220 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S241461AbhKIXBI (ORCPT ); Tue, 9 Nov 2021 18:01:08 -0500 Received: from [192.168.9.206] (198-27-191-186.fiber.dynamic.sonic.net [198.27.191.186]) (authenticated bits=0) (User authenticated as andersk@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 1A9MwAge011096 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NOT); Tue, 9 Nov 2021 17:58:11 -0500 Message-ID: <12fc97fb-50dd-a441-5b8f-dd73e6d693b1@mit.edu> Date: Tue, 9 Nov 2021 14:58:10 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.1 Subject: Re: [PATCH v4 2/4] receive-pack: Clean dead code from update_worktree() Content-Language: en-US To: Johannes Schindelin Cc: Junio C Hamano , Jeff King , git@vger.kernel.org, Andreas Heiduk References: <20211109030028.2196416-1-andersk@mit.edu> <20211109030028.2196416-2-andersk@mit.edu> From: Anders Kaseorg In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On 11/9/21 08:16, Johannes Schindelin wrote: > We might want to make sure that `worktree` and `worktree->path` are > non-`NULL`, and otherwise call a `BUG()`. Okay. > Okay, I lied, I have two suggestions. Shouldn't this be turned into > `worktree->is_bare`? Sure (but in the next commit, since removing is_bare_repository() is a bug fix, not pure cleanup). Anders