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=-5.9 required=3.0 tests=AWL,BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD shortcircuit=no autolearn=ham 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 9A2B620798 for ; Sat, 14 Jan 2017 14:58:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751031AbdANO6w (ORCPT ); Sat, 14 Jan 2017 09:58:52 -0500 Received: from mout.web.de ([212.227.17.12]:59481 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750879AbdANO6v (ORCPT ); Sat, 14 Jan 2017 09:58:51 -0500 Received: from [192.168.178.36] ([79.213.118.247]) by smtp.web.de (mrweb103 [213.165.67.124]) with ESMTPSA (Nemesis) id 0MbyMU-1cBQto2Ck2-00JLJV; Sat, 14 Jan 2017 15:58:26 +0100 Subject: Re: [PATCH 2/3] xdiff: -W: include immediately preceding non-empty lines in context To: Junio C Hamano , Vegard Nossum References: <1484324112-17773-1-git-send-email-vegard.nossum@oracle.com> <1484324112-17773-2-git-send-email-vegard.nossum@oracle.com> Cc: git@vger.kernel.org From: =?UTF-8?Q?Ren=c3=a9_Scharfe?= Message-ID: <48bdfd94-2fd4-bd55-d78b-2877e195fb82@web.de> Date: Sat, 14 Jan 2017 15:58:25 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8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CB5jUlZM9xZKruFllIc3e wq9Yi56 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Am 14.01.2017 um 00:56 schrieb Junio C Hamano: > Vegard Nossum writes: > >> The patch will work as intended and as expected for 95% of the users out >> there (javadoc, Doxygen, kerneldoc, etc. all have the comment >> immediately preceding the function) and fixes a very real problem for me >> (and I expect many others) _today_; for the remaining 5% (who put a >> blank line between their comment and the start of the function) it will >> revert back to the current behaviour, so there should be no regression >> for them. > > I notice your 95% are all programming languages, but I am more > worried about the contents written in non programming languages > (René gave HTML an an example--there may be other types of contents > that we programmer types do not deal with every day, but Git users > depend on). > > I am also more focused on keeping the codebase maintainable in good > health by making sure that we made an effort to find a solution that > is general-enough before solving a single specific problem you have > today. We may end up deciding that a blank-line heuristics gives us > good enough tradeoff, but I do not want us to make a decision before > thinking. How about extending the context upward only up to and excluding a line that is either empty *or* a function line? That would limit the extra context to a single function in the worst case. Reducing context at the bottom with the aim to remove comments for the next section is more tricky as it could remove part of the function that we'd like to show if we get the boundary wrong. How bad would it be to keep the southern border unchanged? René