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=-5.1 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS 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 BFDEB1F454 for ; Wed, 5 Apr 2023 19:48:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233912AbjDETsM (ORCPT ); Wed, 5 Apr 2023 15:48:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45682 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232822AbjDETsE (ORCPT ); Wed, 5 Apr 2023 15:48:04 -0400 X-Greylist: delayed 33582 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Wed, 05 Apr 2023 12:47:58 PDT Received: from mail.zombino.com (c2.zombino.com [IPv6:2a01:4f9:c010:1e4d::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BACE165A9 for ; Wed, 5 Apr 2023 12:47:58 -0700 (PDT) Received: from [192.168.1.208] (port-92-195-131-225.dynamic.as20676.net [92.195.131.225]) by mail.zombino.com (Postfix) with ESMTPS id 5FA863E9D7; Wed, 5 Apr 2023 19:47:56 +0000 (UTC) Message-ID: Date: Wed, 5 Apr 2023 21:47:55 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: git clone of empty repositories doesn't preserve hash To: Junio C Hamano Cc: git@vger.kernel.org References: Content-Language: en-US From: Adam Majer In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On 4/5/23 21:04, Junio C Hamano wrote: > Does such a clone copy the name of the primary branch from the > remote repository to the newly created repository? Yes it does. # git init -b maestro --object-format=sha256 a # git clone a b # cat b/.git/HEAD ref: refs/heads/maestro - Adam