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.8 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,PDS_OTHER_BAD_TLD, RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=no 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 52E9B1F910 for ; Thu, 3 Nov 2022 13:05:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229501AbiKCNEt convert rfc822-to-8bit (ORCPT ); Thu, 3 Nov 2022 09:04:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42834 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231493AbiKCNEb (ORCPT ); Thu, 3 Nov 2022 09:04:31 -0400 Received: from mail-ej1-f41.google.com (mail-ej1-f41.google.com [209.85.218.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3A842140F2 for ; Thu, 3 Nov 2022 06:03:10 -0700 (PDT) Received: by mail-ej1-f41.google.com with SMTP id 13so5049526ejn.3 for ; Thu, 03 Nov 2022 06:03:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ngJUEzwgff6r7vrdvMSc9pGIVYOZ+jdvx1LpHNvI0cA=; b=kTJgpeuGTUaeRRWy5m/axJ6IWYR/47Eq1S6iX2Fk4otrpbvxUwlrYS5uZzMVRiyd+d vs+l0JmuKMSV2RBb7riIPxQvhh7o/Gvxy2q7g1erCE6lYNnUIVW6cp/Kva3TWh/sxJTo HqCM3Vo0ymtkOLBD8b1Ox3Rbn1smRUJ5bsHg2F7tdBce9MOvjGUFiZN5WdyqAuLNJ6pc s3jANReOmenNWW3YxcjKOFOehfEPFTvhu+voYrM24FIcgAwgjH95DfX/ps2qI6utkXAc /Pfkp96YnPa3LEQLMEvneM4VIqFGRhPqaSbLKVyJk0aqen4+4I4H4wly9SKRrfTZs+Eg YqXw== X-Gm-Message-State: ACrzQf2S/TtlZ+STcNJEn/8jG7ARU8CC9ymwYPdlMilifDJwQXyUsK2c yOkGKUWbaWCT9jas9FoFDE7zXBlwu4kuifyh4Vo= X-Google-Smtp-Source: AMsMyM7bE1x2RuncQIzf1/LFS9TTeQUW0U8j4wu1tYz4DUrnpybVGRwEgt2rLU0uSSKWhmfFN/ftc+xycV0n+Wdz6F0= X-Received: by 2002:a17:906:6791:b0:78d:4051:fcf0 with SMTP id q17-20020a170906679100b0078d4051fcf0mr28715373ejp.591.1667480586494; Thu, 03 Nov 2022 06:03:06 -0700 (PDT) MIME-Version: 1.0 References: <2210311614160.25661@stax.localdomain> <221101.86fsf24qnu.gmgdl@evledraar.gmail.com> In-Reply-To: <221101.86fsf24qnu.gmgdl@evledraar.gmail.com> From: Erik Cervin Edin Date: Thu, 3 Nov 2022 14:02:28 +0100 Message-ID: Subject: Re: Consist timestamps within a checkout/clone To: =?UTF-8?B?w4Z2YXIgQXJuZmrDtnLDsCBCamFybWFzb24=?= Cc: Mark Hills , git@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On Tue, Nov 1, 2022 at 4:53 PM Ævar Arnfjörð Bjarmason wrote: > > I believe you might be trying to re-invent "make -B" :) True, in the simple case, but if you git diff HEAD --name-only --diff-filter=AM | xargs touch that should consolidate the modified times on disk of the files of that commit It needs a bit more work, something like pre_checkout=$(git rev-parse HEAD) git checkout XYX && git diff pre_checkout...XYZ --name-only --diff-filter=AM | xargs touch but something like that can work around the inconsistent ordered modified times after a checkout