From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-3.9 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by dcvr.yhbt.net (Postfix) with ESMTP id DB4761F452 for ; Mon, 17 Apr 2023 07:43:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230180AbjDQHm0 (ORCPT ); Mon, 17 Apr 2023 03:42:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60080 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230374AbjDQHmV (ORCPT ); Mon, 17 Apr 2023 03:42:21 -0400 Received: from cloud.peff.net (cloud.peff.net [104.130.231.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 671C44488 for ; Mon, 17 Apr 2023 00:41:47 -0700 (PDT) Received: (qmail 21772 invoked by uid 109); 17 Apr 2023 07:41:37 -0000 Received: from Unknown (HELO peff.net) (10.0.1.2) by cloud.peff.net (qpsmtpd/0.94) with ESMTP; Mon, 17 Apr 2023 07:41:37 +0000 Authentication-Results: cloud.peff.net; auth=none Received: (qmail 22215 invoked by uid 111); 17 Apr 2023 07:41:36 -0000 Received: from coredump.intra.peff.net (HELO sigill.intra.peff.net) (10.0.0.2) by peff.net (qpsmtpd/0.94) with (TLS_AES_256_GCM_SHA384 encrypted) ESMTPS; Mon, 17 Apr 2023 03:41:36 -0400 Authentication-Results: peff.net; auth=none Date: Mon, 17 Apr 2023 03:41:36 -0400 From: Jeff King To: Kristoffer Haugsbakk Cc: git@vger.kernel.org Subject: Re: Weird behavior of 'git log --before' or 'git log --date-order': Commits from 2011 are treated to be before 1980 Message-ID: <20230417074136.GB39931@coredump.intra.peff.net> References: <7728e059-d58d-cce7-c011-fbc16eb22fb9@cs.uni-saarland.de> <20230415085207.GA656008@coredump.intra.peff.net> <141f0f6b-ef5e-4470-b86f-7ebd6c2be3ab@app.fastmail.com> <20230417054032.GA26997@coredump.intra.peff.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On Mon, Apr 17, 2023 at 08:20:30AM +0200, Kristoffer Haugsbakk wrote: > > The problem with repairing them is that it rewrites history, changing > > the object id of every commit which comes after. So you'd want to do it > > once centrally for the project, and declare a flag day that everybody is > > moving over to the new, fixed history. > > I wasn’t interested in fixing the repo for future development. Just to > see if that weird git-log(1) behavior went away. It’s like the inverse > of a minimal example to reproduce a bug; repair the corrupt object so > that future askers can be convinced that it’s not a bug. ;) Ah, OK. Carry on, then. ;) I'm 99% sure it would indeed go away, since the patch I showed earlier (to make the parsing more lenient) worked. But if you want to try, I suspect you could do it with git-filter-repo's --commit-callback option. Or if you don't mind being a little loose with the parsing, probably just piping fast-export through sed, and then back to fast-import. -Peff