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: AS53758 23.128.96.0/24 X-Spam-Status: No, score=-3.8 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_PASS, SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by dcvr.yhbt.net (Postfix) with ESMTP id A19891F9E0 for ; Fri, 1 May 2020 00:54:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727908AbgEAAyo (ORCPT ); Thu, 30 Apr 2020 20:54:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46072 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726384AbgEAAyn (ORCPT ); Thu, 30 Apr 2020 20:54:43 -0400 Received: from vuizook.err.no (vuizook.err.no [IPv6:2a02:20c8:2640::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 88F50C035494 for ; Thu, 30 Apr 2020 17:54:43 -0700 (PDT) Received: from p576124-ipngn200707tokaisakaetozai.aichi.ocn.ne.jp ([122.31.139.124] helo=glandium.org) by vuizook.err.no with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jUJws-00021C-Ux for git@vger.kernel.org; Fri, 01 May 2020 00:54:40 +0000 Received: from glandium by goemon.lan with local (Exim 4.92) (envelope-from ) id 1jUJwm-000QIQ-9F for git@vger.kernel.org; Fri, 01 May 2020 09:54:32 +0900 Date: Fri, 1 May 2020 09:54:32 +0900 From: Mike Hommey To: git@vger.kernel.org Subject: git checkout --recurse-submodules doesn't like checking out an older commit after a submodule was removed Message-ID: <20200501005432.h62dnpkx7feb7rto@glandium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-GPG-Fingerprint: 182E 161D 1130 B9FC CD7D B167 E42A A04F A6AA 8C72 User-Agent: NeoMutt/20180716 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Hi, Doing the following fails: $ git clone --recurse-submodules https://github.com/trailofbits/winchecksec/ $ cd winchecksec $ git checkout --recurse-submodules 93ffe67dbfc757bf6f440d80b8acf88e652ed60a fatal: not a git repository: ../.git/modules/pe-parse fatal: could not reset submodule index The main reason is that the pe-parse directory/submodule was removed in the commit that follows 93ffe67dbfc757bf6f440d80b8acf88e652ed60a (which is current master). This also leaves the tree in a bad state, and it's hard to fix anything from that state. Mike