From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-3.8 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by dcvr.yhbt.net (Postfix) with ESMTP id 9C1CA1F424 for ; Thu, 26 Apr 2018 17:48:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756820AbeDZRsk (ORCPT ); Thu, 26 Apr 2018 13:48:40 -0400 Received: from smtp.gentoo.org ([140.211.166.183]:47894 "EHLO smtp.gentoo.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754557AbeDZRsi (ORCPT ); Thu, 26 Apr 2018 13:48:38 -0400 Received: from grubbs.orbis-terrarum.net (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id A4D00335C7D for ; Thu, 26 Apr 2018 17:48:37 +0000 (UTC) Received: (qmail 24359 invoked by uid 10000); 26 Apr 2018 17:48:35 -0000 Date: Thu, 26 Apr 2018 17:48:35 +0000 From: "Robin H. Johnson" To: Duy Nguyen Cc: Marc Branchaud , Junio C Hamano , "Robin H. Johnson" , Git Mailing List , =?utf-8?B?TWljaGHFgiBHw7Nybnk=?= , Jeff King , Lars Schneider , =?iso-8859-1?Q?=C6var_Arnfj=F6r=F0?= Bjarmason Subject: Re: [RFC PATCH] checkout: Force matching mtime between files Message-ID: References: <20180413170129.15310-1-mgorny@gentoo.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.8.2 (2017-04-18) Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On Thu, Apr 26, 2018 at 06:43:56PM +0200, Duy Nguyen wrote: > On Wed, Apr 25, 2018 at 5:18 PM, Marc Branchaud wrote: > > Are we all that sure that the performance hit is that drastic? After all, > > we've just done write_entry(). Calling utime() at that point should just > > hit the filesystem cache. > I have a feeling this has "this is linux" assumption. Anybody knows > how freebsd, mac os x and windows behave? I don't know sorry. futimens might be better here if it can be used before the fd is closed. > > * In a "file checkout" ("git checkout -- path/to/file"), $1 and $2 are > > identical so the above loop does nothing. Offhand I'm not even sure how a > > hook might get the right files in this case. > Would a hook that gives you the list of updated files (in the exact > same order that git updates) help? Yes, that, along with the target revision I think would allow most or all of the desired behaviors mentioned in this thread *. It also needs to fire in cases like 'git reset --hard $REV'. * For this case, I just need the mtimes to be consistent within a single checkout, I don't need them to have specific values. -- Robin Hugh Johnson Gentoo Linux: Dev, Infra Lead, Foundation Treasurer E-Mail : robbat2@gentoo.org GnuPG FP : 11ACBA4F 4778E3F6 E4EDF38E B27B944E 34884E85 GnuPG FP : 7D0B3CEB E9B85B1F 825BCECF EE05E6F6 A48F6136