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=-3.0 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 221FC1FA7B for ; Mon, 12 Jun 2017 10:02:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752065AbdFLKCq (ORCPT ); Mon, 12 Jun 2017 06:02:46 -0400 Received: from mout.web.de ([217.72.192.78]:61333 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751991AbdFLKCp (ORCPT ); Mon, 12 Jun 2017 06:02:45 -0400 Received: from [192.168.88.159] ([194.47.243.242]) by smtp.web.de (mrweb101 [213.165.67.124]) with ESMTPSA (Nemesis) id 0LdW7q-1dkIzn3Jxa-00inVW; Mon, 12 Jun 2017 12:02:37 +0200 Subject: Re: [PATCH v2] doc: fix location of index in worktree scenatio To: Andreas Heiduk , Git Mailing List Cc: Junio C Hamano References: <20170610090719.8429-1-asheiduk@gmail.com> <20170610173824.19460-1-asheiduk@gmail.com> From: =?UTF-8?Q?Torsten_B=c3=b6gershausen?= Message-ID: Date: Mon, 12 Jun 2017 12:03:11 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <20170610173824.19460-1-asheiduk@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K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m7vCQZdot JeGcA8o Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Thanks for working on this (and keeping me in cc) The commit head line does not fully match my expactions: "doc: fix location of index in worktree scenatio" "doc:" is OK, but is the "location of index" fixed ? Actually something that includes the important stuff: "doc" "fix" "normalize the line endings" "worktree scenatio" could be more helpful. How about this as a header for the commit: "doc: normalize the line endings in a worktree scenatio" On 10/06/17 19:38, Andreas Heiduk wrote: > When setting `.gitattributes` in a second worktree, a plain `rm .git/index` > does not actually delete the index. This feels somewhat short. setting .gitattributes is (in general) independent of the index. In normalizing line endings case the user needs to do both, fix attribiutes, and re-read the work tree, discarding the index. How about this: When line endings are normalized in a second worktree, a plain `rm .git/index` does not actually delete the index. Fix a long standing bug in the documentaton and use "git read-tree --empty" instead- > > Signed-off-by: Andreas Heiduk > Helped-by: Junio C Hamano > --- > Documentation/gitattributes.txt | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/Documentation/gitattributes.txt b/Documentation/gitattributes.txt > index 473648386..2a2d7e2a4 100644 > --- a/Documentation/gitattributes.txt > +++ b/Documentation/gitattributes.txt > @@ -229,7 +229,7 @@ From a clean working directory: > > ------------------------------------------------- > $ echo "* text=auto" >.gitattributes > -$ rm .git/index # Remove the index to re-scan the working directory > +$ git read-tree --empty # Clean index, force re-scan of working directory > $ git add . > $ git status # Show files that will be normalized > $ git commit -m "Introduce end-of-line normalization" >