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: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-4.0 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by dcvr.yhbt.net (Postfix) with ESMTP id 6FFA71F466 for ; Fri, 17 Jan 2020 21:28:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729640AbgAQV2e (ORCPT ); Fri, 17 Jan 2020 16:28:34 -0500 Received: from pb-smtp21.pobox.com ([173.228.157.53]:65036 "EHLO pb-smtp21.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728249AbgAQV2e (ORCPT ); Fri, 17 Jan 2020 16:28:34 -0500 Received: from pb-smtp21.pobox.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id 59A82A8511; Fri, 17 Jan 2020 16:28:32 -0500 (EST) (envelope-from junio@pobox.com) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=xtvVTB2sqQq7NvA9GMHteJ6mdBs=; b=jU+GM4 syuQKxIruYmHhGzVTQHwQLfMdET0TQVZmjtQa9vJmIA/wDiQ0PgeyCOP8ftiHFDM KCd7AHYVHuaEsVh0Q9x3/ZjplWytwZd0omv5ZH9TDnstTNcY2Xggs4yXCjxhWMxR de9ZPI2rbcTvR5kUpVMlk7WyOSTQ3BGmVBPS8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=Vqqy//pKgY0pYIywDRno/K0TMyGbiQkL E8stw0OdlarX3qILqiNGwRGcGVYu4p8UcW+tHobuiOULnb2NArdDlIAUv8rdlJLq nhrRYq6sCBkyhaoJDa++Uok0ek2SgkHB1dZVGosA2YuqsE4MHmIvL9vxzMyHR3B/ FNVxIINQeBI= Received: from pb-smtp21.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id 5213BA8510; Fri, 17 Jan 2020 16:28:32 -0500 (EST) (envelope-from junio@pobox.com) Received: from pobox.com (unknown [34.76.80.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp21.pobox.com (Postfix) with ESMTPSA id 140C9A850D; Fri, 17 Jan 2020 16:28:27 -0500 (EST) (envelope-from junio@pobox.com) From: Junio C Hamano To: Eric Sunshine Cc: Shourya Shukla , Git List , Johannes Schindelin Subject: Re: [PATCH 1/3] t6025: modernize style References: <20200117204426.9347-1-shouryashukla.oo@gmail.com> <20200117204426.9347-2-shouryashukla.oo@gmail.com> Date: Fri, 17 Jan 2020 13:28:25 -0800 In-Reply-To: (Eric Sunshine's message of "Fri, 17 Jan 2020 16:15:12 -0500") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Pobox-Relay-ID: 4D1B7816-3970-11EA-8671-8D86F504CC47-77302942!pb-smtp21.pobox.com Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Eric Sunshine writes: >> + l=$(printf file | git hash-object -t blob -w --stdin) && >> + echo "120000 $l symlink" | >> + git update-index --index-info && > > As mentioned[1] in the review of v1, this should be written: > > echo "120000 $l symlink" | git update-index --index-info && > > [1]: https://lore.kernel.org/git/xmqqftgff1r0.fsf@gitster-ct.c.googlers.com/ > >> + git commit -m master && >> + git checkout b-symlink && >> + l=$(printf file-different | git hash-object -t blob -w --stdin) && >> + echo "120000 $l symlink" | >> + git update-index --index-info && Same here. Funnily, 2/3 improves on this, but I agree that we should get it right from the get-go. >> + git commit -m b-symlink && >> + git checkout b-file && >> + echo plain-file >symlink && >> + git add symlink && >> + git commit -m b-file >> +'