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=-2.6 required=3.0 tests=AWL,BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_HI,T_RP_MATCHES_RCVD shortcircuit=no autolearn=no 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 B96181F404 for ; Mon, 19 Feb 2018 21:58:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932163AbeBSV6S (ORCPT ); Mon, 19 Feb 2018 16:58:18 -0500 Received: from mout.gmx.net ([212.227.15.18]:33383 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932089AbeBSV6R (ORCPT ); Mon, 19 Feb 2018 16:58:17 -0500 Received: from minint-tb4pce7.southpacific.corp.microsoft.com ([37.201.195.115]) by mail.gmx.com (mrgmx002 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MC4VE-1ewj8X00XY-008u50; Mon, 19 Feb 2018 22:58:13 +0100 Date: Mon, 19 Feb 2018 22:58:12 +0100 (STD) From: Johannes Schindelin X-X-Sender: virtualbox@MININT-6BKU6QN.europe.corp.microsoft.com To: Peter Backes cc: git@vger.kernel.org Subject: Re: Git should preserve modification times at least on request In-Reply-To: <20180219212235.GA9891@helen.PLASMA.Xg8.DE> Message-ID: References: <20180219212235.GA9891@helen.PLASMA.Xg8.DE> User-Agent: Alpine 2.21.1 (DEB 209 2017-03-23) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Provags-ID: V03:K0:NynTsZ5uzZSYJFSW+szZi8avu6xC1psXS2s55Av+/Zj/oLD2p1r bewB3w96FKFwwzeOv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3BA= Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Hi Peter, On Mon, 19 Feb 2018, Peter Backes wrote: > please ensure to CC me if you reply as I am not subscribed to the list. > > https://git.wiki.kernel.org/index.php/Git_FAQ#Why_isn.27t_Git_preserving_modification_time_on_files.3F > argues that git isn't preserving modification times because it needs to > ensure that build tools work properly. > > I agree that modification times should not be restored by default, > because of the principle of least astonishment. But should it be > impossible? The principle of least astonishment does not mandate this; > it is not a paternalistic principle. > > Thus, I do not get at all > - why git doesn't *store* modification times, perhaps by default, but > at least on request > - why git doesn't restore modification times *on request* > > It is pretty annoying that git cannot, even if I know what I am doing, > and explicitly want it to, preserve the modification time. > > One use case: I have lots of file lying around in my build directory > and for some of them, the modification time in important information to > me. Those files are not at all used with the build tool. In contrast to > git pull, git pull --rebase needs those to be stashed. But after the > pull and unstash, the mtime is gone. Boo. > > Please provide options to store and restore modification times. It > shouldn't be hard to do, given that other metadata such as the mode is > already stored. It would make live so much easier. And the fact that > this has made into the FAQ clearly suggests that there are many others > who think so. Since you already assessed that it shouldn't be hard to do, you probably want to put your money where your mouth is and come up with a patch, and then offer it up for discussion on this here mailing list. Ciao, Johannes