From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: git commit message checker won't let me commit a new file. Date: Wed, 19 Jul 2023 09:22:06 +0000 Message-ID: References: <829deea6-a17c-47ba-104d-37a88d081a3e@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15632"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Jim Porter Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Jul 19 11:23:11 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qM3Op-0003wO-Jv for ged-emacs-devel@m.gmane-mx.org; Wed, 19 Jul 2023 11:23:11 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qM3Nu-0004Ut-8b; Wed, 19 Jul 2023 05:22:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qM3Ns-0004Uk-OM for emacs-devel@gnu.org; Wed, 19 Jul 2023 05:22:12 -0400 Original-Received: from mx3.muc.de ([193.149.48.5]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qM3Nq-0001BH-3i for emacs-devel@gnu.org; Wed, 19 Jul 2023 05:22:12 -0400 Original-Received: (qmail 38915 invoked by uid 3782); 19 Jul 2023 11:22:07 +0200 Original-Received: from acm.muc.de (p4fe159a7.dip0.t-ipconnect.de [79.225.89.167]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Wed, 19 Jul 2023 11:22:06 +0200 Original-Received: (qmail 5171 invoked by uid 1000); 19 Jul 2023 09:22:06 -0000 Content-Disposition: inline In-Reply-To: <829deea6-a17c-47ba-104d-37a88d081a3e@gmail.com> X-Submission-Agent: TMDA/1.3.x (Ph3nix) X-Primary-Address: acm@muc.de Received-SPF: pass client-ip=193.149.48.5; envelope-from=acm@muc.de; helo=mx3.muc.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:307967 Archived-At: Hello, Jim. Thanks for the rapid reply. On Tue, Jul 18, 2023 at 15:05:34 -0700, Jim Porter wrote: > On 7/18/2023 1:23 PM, Alan Mackenzie wrote: > > Hello, Emacs. > > I'm trying to commit a fix for bug #64642. This involves adding a new > > test file. > > The commit message checker says "File > > test/src/comp-resources/comp-test-funcs-dyn2.el: cannot be read: [No > > such file or directory] > > Commit aborted; please see the file CONTRIBUTE" > That's surprising. This works perfectly for me. Can you describe in more > detail how you're committing your change? Here's what I did: > $ git checkout -b testing > $ echo hi > test/src/comp-resources/comp-test-funcs-dyn2.el > $ git add test/src/comp-resources/comp-test-funcs-dyn2.el > $ git commit Having created the file: $ git add test/src/comp-resources/comp-test-funcs-dyn2.el $ git commit. > In my editor, I add this for the commit message: > * test/src/comp-resources/comp-test-funcs-dyn2.el: New file. My commit message, in full, is (read from .git/COMMIT_EDITMSG: ######################################################################### Fix native compilation in dynamically bound files. This fixes bug#64642. * lisp/emacs-lisp/comp.el (comp-spill-lap-function/symbol): Add code for dynamically bound functions. * test/src/comp-tests.el (comp-tests-result-lambda): New test. * test/src/comp-resources/comp-test-funcs-dyn2.el: New test file. # Please enter the commit message for your changes. Lines starting # with '#' will be ignored, and an empty message aborts the commit. # # On branch master # Your branch is up to date with 'origin/master'. # # Changes to be committed: # modified: lisp/emacs-lisp/comp.el # new file: test/src/comp-resources/comp-test-funcs-dyn2.el # modified: test/src/comp-tests.el # # Changes not staged for commit: # modified: .gitignore # # Untracked files: # .gitignore.acm # .gitignore.backup # .timestamps.txt # 2021-01-03.err # 2021-01-06.err # 2021-12-16.make # 2021-12-30.err # 2021-12-31.err # 2022-01-01.err # 2022-01-02.check.err # 2022-01-02.err # 2022-01-04.err # 2022-01-05.err # 2022-01-06.err # 2022-01-07.err # 2022-01-07.outerr # 2022-01-08.err # 2022-01-09.err # 2022-01-09b.err # 2022-01-10.err # 2022-01-11 # 2022-01-11.err # 2022-02-22.err # 2022-02-22.outerr # checkout.20220228.out # checkout.20220301.out # checkout.20220302.out # doc/lispref/syntax.20160318.techsi # doc/lispref/syntax.20160318b.techsi # lib/.deps/ # lisp/2022-01-09.err # lisp/emacs-lisp/comp.el.rej # src/2021-12-20.err # src/globals.20211124.aitch # src/lisp.20211127.aitch # test/lisp/calendar/icalendar-tests.elcr5m9Wq # ######################################################################### > The commit hooks run successfully for me and don't produce any errors. I got the error described in my first post. I tried it again this morning with $ git commit -F .git/COMMIT_EDITMSG , and got just the same. > Based on the output you see, I'm guessing the issue is in the > `commit-msg` hook, but I don't see anything in there that would do this. I now think it has nothing to do with the hooks. The text "No such file or directory" doesn't appear in any of the hooks. The new file has permissions -rw-r--r-- 1 acm acm 1068 Jul 18 19:11 test/src/comp-resources/comp-test-funcs-dyn2.el , which is surely OK for manipulation by git. If I do git status, I get: ######################################################################### On branch master Your branch is up to date with 'origin/master'. Changes to be committed: (use "git restore --staged ..." to unstage) modified: lisp/emacs-lisp/comp.el new file: test/src/comp-resources/comp-test-funcs-dyn2.el modified: test/src/comp-tests.el Changes not staged for commit: (use "git add ..." to update what will be committed) (use "git restore ..." to discard changes in working directory) modified: .gitignore Untracked files: (use "git add ..." to include in what will be committed) .gitignore.acm .gitignore.backup .timestamps.txt ######################################################################### If I do git status --porcelain, I get: ######################################################################### M .gitignore M lisp/emacs-lisp/comp.el A test/src/comp-resources/comp-test-funcs-dyn2.el M test/src/comp-tests.el ?? .gitignore.acm ?? .gitignore.backup ?? .timestamps.txt ######################################################################### I think I've got something tied in knots, somewhere, but I can't see how. If you've got any more ideas, I'd be grateful. Thanks! -- Alan Mackenzie (Nuremberg, Germany).