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=-4.2 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, RCVD_IN_DNSWL_LOW,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 BF6851F5AE for ; Wed, 9 Jun 2021 17:40:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231633AbhFIRm0 (ORCPT ); Wed, 9 Jun 2021 13:42:26 -0400 Received: from mail-qt1-f175.google.com ([209.85.160.175]:44605 "EHLO mail-qt1-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229947AbhFIRmW (ORCPT ); Wed, 9 Jun 2021 13:42:22 -0400 Received: by mail-qt1-f175.google.com with SMTP id t17so18644672qta.11 for ; Wed, 09 Jun 2021 10:40:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=B9mPL1wEatH6emkvAIxecJv+DqLFDtSAcvmtwENfrys=; b=cNnwHmOd7zvAkwxTG+nn+1G68rHMg6Z/VfV9Zv7tyx8ApMtuuQzUEpAAuavqriZEEb 7skkiM+c2uqnhVnSVNMwl+UmGuCg3y+j82MuK0MNY9niRcbbs/qo5Lky0xalnqg/PnkF 0liJYNlAaaeAFMt3N9qYW0s4KAHpMfRLrBb1fZ8RRgYiJhMMImfJZDMDZkJ1Jtog77Qf ezNUBADZE3PtTQYaricbHvCGzeiBzXMKepOU2m/OqkRN3tDOP9XX5LwNOdjXNK+RG3gu lSlvoVQXajvlWDO0YgGEdmFRgngLd1rRtSivlvXxEmV5Zhp8arO4QwOj173XyKKJnbmr VLQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=B9mPL1wEatH6emkvAIxecJv+DqLFDtSAcvmtwENfrys=; b=gsA2zNq924Y6xbkxpPoosziT3lshkD4QFhaRBMS9TOvGnppj+Dt8U1zaLSBFcZVIvk hvvKVdX+MO0fXVIBQXYdzApAlb0Xg47IuFBlBKU+Tl0d0xpar7ngvzPNFEtjG6Aa0C1N E2zBAoFPW53sRSg4SMoqJFzviGLiKYM3x5H35dWzNfwciOO1ScCzt2QmbeMTHA2jHgAH GsEp/Z0od/bQZweWLmOplnVu0SE1/zPEGb3/RfbbpXjBayoU6ls2Ng5PPeogKMivQpEX Xeh+Ajkfq3hZfhDu7owa5T5AtqfAGeymXl2eajxX28ozVKdlts8pVrxKzgGPo2tmtpmU Ooeg== X-Gm-Message-State: AOAM530RjGebvy3BmuccMIlP4deVbdbix5JHzI3KaFPFTV47MBADTkdz Ya2QdNiMMFCHs2nVpQOW8wo= X-Google-Smtp-Source: ABdhPJyzQpMPPgFXJBL/SEjwuZDCUzB8Z/yXIBr384vL1pki16mpgZzzYvaB4UsezUJucMk2W/CXkw== X-Received: by 2002:ac8:604:: with SMTP id d4mr1059843qth.304.1623260366405; Wed, 09 Jun 2021 10:39:26 -0700 (PDT) Received: from ?IPv6:2600:1700:e72:80a0:757b:21f8:d6f2:dd1b? ([2600:1700:e72:80a0:757b:21f8:d6f2:dd1b]) by smtp.gmail.com with ESMTPSA id d10sm426489qtd.82.2021.06.09.10.39.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 09 Jun 2021 10:39:26 -0700 (PDT) Subject: Re: [PATCH v5 02/14] sparse-index: include EXTENDED flag when expanding To: Elijah Newren , Derrick Stolee via GitGitGadget Cc: Git Mailing List , Junio C Hamano , Matheus Tavares Bernardino , Derrick Stolee , Derrick Stolee References: <8aa41e749471df3bd9d593b8f55db6506eafea12.1623069252.git.gitgitgadget@gmail.com> From: Derrick Stolee Message-ID: <23508662-37f2-97a4-3cf0-916a3705a272@gmail.com> Date: Wed, 9 Jun 2021 13:39:25 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On 6/8/2021 2:56 PM, Elijah Newren wrote: > On Mon, Jun 7, 2021 at 5:34 AM Derrick Stolee via GitGitGadget > wrote: >> >> From: Derrick Stolee >> >> When creating a full index from a sparse one, we create cache entries >> for every blob within a given sparse directory entry. These are >> correctly marked with the CE_SKIP_WORKTREE flag, but they must also be >> marked with the CE_EXTENDED flag to ensure that the skip-worktree bit is >> correctly written to disk in the case that the index is not converted >> back down to a sparse-index. > > In our previous discussion on this patch from v3 > (https://lore.kernel.org/git/cb9161ca-dc6e-b77b-1a41-385ed8920bb2@gmail.com/), > you said you'd explain the reason for this change in a bit more > detail, but the commit message has not changed. Thank you for the reminder. > Could this be corrected? How does this sound? When creating a full index from a sparse one, we create cache entries for every blob within a given sparse directory entry. These are correctly marked with the CE_SKIP_WORKTREE flag, but the CE_EXTENDED flag is not included. The CE_EXTENDED flag would exist if we loaded a full index from disk with these entries marked with CE_SKIP_WORKTREE, so we can add the flag here to be consistent. This allows us to directly compare the flags present in cache entries when testing the sparse-index feature, but has no significance to its correctness in the user-facing functionality. I have this in my local branch for now, but can update it before the next version. Thanks, -Stolee