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.9 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, 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 ACD031F4B4 for ; Tue, 6 Apr 2021 22:47:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344099AbhDFWre (ORCPT ); Tue, 6 Apr 2021 18:47:34 -0400 Received: from cloud.peff.net ([104.130.231.41]:42996 "EHLO cloud.peff.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244004AbhDFWre (ORCPT ); Tue, 6 Apr 2021 18:47:34 -0400 Received: (qmail 9612 invoked by uid 109); 6 Apr 2021 22:47:25 -0000 Received: from Unknown (HELO peff.net) (10.0.1.2) by cloud.peff.net (qpsmtpd/0.94) with ESMTP; Tue, 06 Apr 2021 22:47:25 +0000 Authentication-Results: cloud.peff.net; auth=none Received: (qmail 898 invoked by uid 111); 6 Apr 2021 22:47:25 -0000 Received: from coredump.intra.peff.net (HELO sigill.intra.peff.net) (10.0.0.2) by peff.net (qpsmtpd/0.94) with (TLS_AES_256_GCM_SHA384 encrypted) ESMTPS; Tue, 06 Apr 2021 18:47:25 -0400 Authentication-Results: peff.net; auth=none Date: Tue, 6 Apr 2021 18:47:24 -0400 From: Jeff King To: Junio C Hamano Cc: Nikita Bobko , Johannes Schindelin , git@vger.kernel.org Subject: Re: [Bug report] diff.noprefix config is ignored for interactive `add` Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On Tue, Apr 06, 2021 at 02:57:46PM -0700, Junio C Hamano wrote: > Jeff King writes: > > > I imagine something like this: > > ... > > would work, but I didn't really test it. There's another hitch, which is > > that this subsystem has all been re-written in C. So we'd really want to > > implement it in the new code (possibly in both places, though maybe it > > is time to consider cutting over from the perl script to the C one by > > deafult?). > > > > But hopefully this illustrates the general idea, and gives somebody > > interested in the feature enough to work up their own patch. > > These "cosmetic appearance" configuration that would affect the > output from diff shown to the user would not be limited to just the > .noprefix, though. Depending on the users, they would care just as > deeply about any of these: > > .context > .interHunkContext > .mnemonicPrefix > .noprefix > .relative > .orderFile > > as Nikita does for .noprefix to send a bug report. > > Luckily or unluckily, .suppressBlankEmpty and the per-filetype > .xfuncname patterns do impact the output from the plumbing, because > git_diff_basic_config() does read them, even though they are merely > "cosmetic" configurations. > > I am unsure how much we should cater to end-user controlled > configuration when we are generating diff output for our own > consumption, but if we were to tweak "add -p" and friends to > pay attention to .noprefix, we probably should do the same for > all the others. Yes. We already have gone through this with other options (e.g., diff.algorithm). I would be happy if somebody wanted to handle the complete set. But I am also OK with stumbling towards completeness, as people who care about a particular option plumb it through. -Peff