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: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-4.0 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by dcvr.yhbt.net (Postfix) with ESMTP id 8C2FF1F466 for ; Sat, 18 Jan 2020 18:15:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726899AbgARSPa (ORCPT ); Sat, 18 Jan 2020 13:15:30 -0500 Received: from pb-smtp21.pobox.com ([173.228.157.53]:57275 "EHLO pb-smtp21.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726490AbgARSPa (ORCPT ); Sat, 18 Jan 2020 13:15:30 -0500 Received: from pb-smtp21.pobox.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id 88228AF065; Sat, 18 Jan 2020 13:15:28 -0500 (EST) (envelope-from junio@pobox.com) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type:content-transfer-encoding; s=sasl; bh=TIBFMcii1zMq pCm8Cm9UN4ZM7M0=; b=q1FAeoULDzgpIjfG2yT+yCfcnd7LyKB8pwaZ2bjCwxwu 2dYcrJpK5QfN2rS1ungYzv8Nkulsk+5rvbIRpUjSmV7IjONj6gYsMSJ1taCaUH5J LFnVThFjoL/n0ZijmXIMMVkXaWh25+1Zl+HC25U2fTKno+ugKYjI8gcxmSLvlGA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type:content-transfer-encoding; q=dns; s=sasl; b=K7SVcE +hnck8yNSSaFMNRX717snj9jpVaFExV+nmn1P/9FyE7136Mc5XdOh73GWgWlEnnO yjIxJp4nkeQhzH9fkqqqU1N7prXHE74gxqNSwHFBWGX4XYpGDNsGPHPb3Uivzhd9 Ql64AmV+tB0aCfdAoW2+mFtWyr6SgHmoaxLpw= Received: from pb-smtp21.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id 80F86AF064; Sat, 18 Jan 2020 13:15:28 -0500 (EST) (envelope-from junio@pobox.com) Received: from pobox.com (unknown [34.76.80.147]) (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 87D45AF063; Sat, 18 Jan 2020 13:15:24 -0500 (EST) (envelope-from junio@pobox.com) From: Junio C Hamano To: Christoph Groth Cc: git@vger.kernel.org Subject: Re: Stat cache in .git/index hinders syncing of repositories References: <87v9p9skjz.fsf@drac> Date: Sat, 18 Jan 2020 10:15:22 -0800 In-Reply-To: <87v9p9skjz.fsf@drac> (Christoph Groth's message of "Sat, 18 Jan 2020 00:57:36 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 X-Pobox-Relay-ID: 7F32E218-3A1E-11EA-8C49-8D86F504CC47-77302942!pb-smtp21.pobox.com Content-Transfer-Encoding: quoted-printable Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Christoph Groth writes: > However, there is one problem with syncing git repositories, that has > been noticed by multiple people [1]: The file .git/index contains not > only the =E2=80=9Cgit index=E2=80=9D, but also a cache of stat-data of = the files in the > working directory. Some file synchronizers are able to sync mtimes, bu= t > syncing ctimes would be bizarre (if it is even possible). The stat-data in the index file is meant to be a mere optimization, and after copying .git/index and the working tree files to a new box, running "git update-index --refresh" would make them in sync, no?