Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp28184623rwd; Tue, 4 Jul 2023 14:45:39 -0700 (PDT) X-Google-Smtp-Source: APBJJlGJiCBYVLnmypmSV35NAl2b0yzMXnxAuqo5wEZoyM4hsusZp5wQZ8LvhCRLMR7sfF50JxKr X-Received: by 2002:a17:902:da92:b0:1b3:b3c5:1d1f with SMTP id j18-20020a170902da9200b001b3b3c51d1fmr13388978plx.8.1688507139234; Tue, 04 Jul 2023 14:45:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688507139; cv=none; d=google.com; s=arc-20160816; b=rmCa5BzFLNcSSoYme8Jw7NcnQLcP7/PQC2UGjXcTLwHduG4Laz07MpDyY1mHkWc8to sfx6mZmQbJNfhrDv5GmwWtJqSRHNleiITHF7gSMv/SebXgGsuAKYR5Ckh8rcxuFP0B+l z7eORAWsxLtaVVJzATQpNBExug/KJDEyZKrzpR8RsZiFoIx+B8ev/y6GfRO/QaeO0UhJ waC44v4SLYxyti4BORkqNU4o3iRSq+ZAFff5WlblGCpQ7srODoth1RGSIQOps5XWyDFe 1t4TcmnHMbamoijFJaY3iP9oXksBfMIDeWv8aCfT8EfAEc6FKl5t+9Hlj5EWInmwXwqu g7EQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=AKiZGNKuu+E4BYTdtvB4ccKUGqALOu4POmxBXUaZqqI=; fh=Thnhbd+Td4a7HSCcKmDJSg8L+SMqnJs5IFROSH00NHc=; b=Kcmik2wYEAyoe84fEzucC/U0AeyEKhR5vLuOoqVRpm1yo/gqKUq0GiWYXRzoH2qBdE hZcK4cjAwMG2evg7XS0e4RmqdT2o956PQxQcvDZwb1SI4kW/i0GVfwQj93JY5vxJFuRL IyNDrAbYw9dwE8z22OiJ4UDvgTqYUrHsNNbA4WzQJ31E99pFGRh1TKLp6aLoS+7oEeXY CvnKx27GrSeB71Y4lvvLDQjTjFTxLD3WfKRN256kSf8A5hqHJVm69PLirr4vCJ1dQT6U IUugFi9UKQUVyrw9dvwPdxXGcVAXZ7bQD2ZiHMbs658pRF0iceX6/tvBxkq3aT8JDosb 56Fg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o9-20020a170902d4c900b001b8abb9f7d4si1111673plg.176.2023.07.04.14.45.25; Tue, 04 Jul 2023 14:45:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231280AbjGDVeZ (ORCPT + 99 others); Tue, 4 Jul 2023 17:34:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34174 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229903AbjGDVeY (ORCPT ); Tue, 4 Jul 2023 17:34:24 -0400 Received: from 1wt.eu (ded1.1wt.eu [163.172.96.212]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1215FE4F; Tue, 4 Jul 2023 14:34:22 -0700 (PDT) Received: (from willy@localhost) by pcw.home.local (8.15.2/8.15.2/Submit) id 364LYFqi022233; Tue, 4 Jul 2023 23:34:15 +0200 Date: Tue, 4 Jul 2023 23:34:15 +0200 From: Willy Tarreau To: Linus Torvalds Cc: Masahiro Yamada , Nicolas Schier , Nick Desaulniers , Linux Kbuild mailing list , Linux Kernel Mailing List Subject: Re: Overly aggressive .gitignore file? Message-ID: <20230704213415.GA21872@1wt.eu> References: <20230704211509.GA21834@1wt.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 04, 2023 at 02:20:36PM -0700, Linus Torvalds wrote: > On Tue, 4 Jul 2023 at 14:15, Willy Tarreau wrote: > > > > I don't understand why your completion on "git am" should rely on > > *tracked* files. > > It doesn't. > > Read that email again. > > It fails on *untracked* files that are hidden from "git status" and > friends by our .gitignore pattern: > > *.mbx > > added by commit 534066a983df (".gitignore: ignore *.cover and *.mbx") > > So when I have those old stale mbx files around, I don't see them, > because "git status" will happily say > > nothing to commit, working tree clean > > with no mention of those old turds. But the git am completion rules should actually *not* rely on git status output. At least in my opinion. > Really. Try it. I did and for me on this machine I don't have the problem: willy@pcw:~/linux$ git status On branch 20230702-nolibc-series1+2_2 Your branch is up to date with 'origin/20230702-nolibc-series1+2_2'. nothing to commit, working tree clean willy@pcw:~/linux$ echo blah > 2023-new-patch.mbx willy@pcw:~/linux$ git status On branch 20230702-nolibc-series1+2_2 Your branch is up to date with 'origin/20230702-nolibc-series1+2_2'. => .mbx is indeed ignored nothing to commit, working tree clean willy@pcw:~/linux$ git am -s --whitespace 2023-new-patch.mbx ^C Here I pressed [Tab] after "2023" and it automatically completed. By git completion is certainly quite old, as I really don't change it often once I have a satisfying one. My git-completion.bash script has this in case that helps: _git_am () { __git_find_repo_path if [ -d "$__git_repo_path"/rebase-apply ]; then __gitcomp "$__git_am_inprogress_options" return fi case "$cur" in --whitespace=*) __gitcomp "$__git_whitespacelist" "" "${cur##--whitespace=}" return ;; --*) __gitcomp_builtin am "--no-utf8" \ "$__git_am_inprogress_options" return esac } > > From a workflow perspective that makes no sense, > > as by definition, git am will consume only *untracked* files. > > I don't think you actually read my email. Yes I did and I neither experience your problem nor figure why it should happen, because I don't see the relation between gitignore and anything that git am should be allowed to consume :-/ Willy