From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Konstantin Kharlamov Newsgroups: gmane.emacs.bugs Subject: bug#35368: Acknowledgement ([PATCH] Do potentially destructive operations in prepare-commit-msg) Date: Tue, 23 Apr 2019 14:00:05 +0300 Message-ID: <1556017205.24472.1@yandex.ru> References: <20190421200313.26202-1-Hi-Angel@yandex.ru> <1556013426.24472.0@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1251; format=flowed Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="216658"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 35368@debbugs.gnu.org To: "Basil L. Contovounesios" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Apr 23 13:08:50 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hItIA-000uDQ-8M for geb-bug-gnu-emacs@m.gmane.org; Tue, 23 Apr 2019 13:08:50 +0200 Original-Received: from localhost ([127.0.0.1]:51823 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hItI9-000468-6s for geb-bug-gnu-emacs@m.gmane.org; Tue, 23 Apr 2019 07:08:49 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:57636) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hItAd-0007im-At for bug-gnu-emacs@gnu.org; Tue, 23 Apr 2019 07:01:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hItAc-0000eC-4y for bug-gnu-emacs@gnu.org; Tue, 23 Apr 2019 07:01:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38996) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hItAb-0000dq-P9 for bug-gnu-emacs@gnu.org; Tue, 23 Apr 2019 07:01:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hItAb-0001YN-Lu for bug-gnu-emacs@gnu.org; Tue, 23 Apr 2019 07:01:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Konstantin Kharlamov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 23 Apr 2019 11:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35368 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 35368-submit@debbugs.gnu.org id=B35368.15560172185917 (code B ref 35368); Tue, 23 Apr 2019 11:01:01 +0000 Original-Received: (at 35368) by debbugs.gnu.org; 23 Apr 2019 11:00:18 +0000 Original-Received: from localhost ([127.0.0.1]:52538 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hIt9u-0001XN-1z for submit@debbugs.gnu.org; Tue, 23 Apr 2019 07:00:18 -0400 Original-Received: from forward106o.mail.yandex.net ([37.140.190.187]:47852) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hIt9q-0001X2-Og for 35368@debbugs.gnu.org; Tue, 23 Apr 2019 07:00:16 -0400 Original-Received: from mxback8o.mail.yandex.net (mxback8o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::22]) by forward106o.mail.yandex.net (Yandex) with ESMTP id 4D64C5061EEE; Tue, 23 Apr 2019 14:00:07 +0300 (MSK) Original-Received: from smtp3p.mail.yandex.net (smtp3p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:8]) by mxback8o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 6x2NgCbNzw-07Uu6Ohh; Tue, 23 Apr 2019 14:00:07 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1556017207; bh=5LKc4FiIiYXf7ij5KsAibp5C8Q/qg67iDPgwVGE5d+g=; h=In-Reply-To:Cc:To:Subject:From:References:Date:Message-Id; b=amQpyblNcW2hN1aFoSjhsJFCLHS8+P4bmloSuYH7yrCWuldt1fxnz1Fr8Um7w2qRX oOwzlgYJBlelmBILvnGWEiOBFTHgcS5epmyQfWkZNHPRiICQzQDsXOxZoIKbVldWaF q3/kBX7V/f0gVI4pCWmrE/uX+zwOYpx6zbGVW69w= Authentication-Results: mxback8o.mail.yandex.net; dkim=pass header.i=@yandex.ru Original-Received: by smtp3p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id IaBl0YwzGk-06h4EgmM; Tue, 23 Apr 2019 14:00:06 +0300 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client certificate not present) In-Reply-To: <875zr5f1dn.fsf@tcd.ie> X-Mailer: geary/mainline~g7970b668 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:158117 Archived-At: On =C2=F2, Apr 23, 2019 at 11:43, Basil L. Contovounesios=20 wrote: > Konstantin Kharlamov writes: >=20 >> Oh, and while on it: I'm thinking also about automatically filling=20 >> the default >> commit template (i.e. files changed, functions changed =97 can be=20 >> inferred for C). >> I'm wondering, which language would it be acceptable to write hook=20 >> in? Python? >=20 > Why not Elisp? IIUC this already exists as add-change-log-entry. Ok, cool, thanks folks! Yeah, then I'll probably take a look at it. Btw, somewhat related: if anybody interested, I can share a bit of=20 config: as I figured, many projects (not Emacs though) require to start=20 commit message with subsystem they changed, which is often the last=20 directory name. So some hours ago I made up a global prepare-commit-msg=20 hook that automatically inserts name of the directory=20 https://github.com/Hi-Angel/dotfiles/blob/master/.git_hooks/prepare-commit-= msg=20 (initially I wrote it in sh, but code was too awkward, so I rewrote it=20 in Python). To make it work globally write in `core` section of=20 ~/.gitconfig the `hooksPath =3D "~/.git_hooks` =