From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: preferring https: to http: in commit messages for gnu.org Date: Sun, 15 Oct 2017 17:25:09 +0300 Message-ID: <83shekh4je.fsf@gnu.org> References: <61bfc72e-b21f-3fb9-25b7-b718bb69d85b@cs.ucla.edu> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1508077568 12209 195.159.176.226 (15 Oct 2017 14:26:08 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 15 Oct 2017 14:26:08 +0000 (UTC) Cc: Emacs-devel@gnu.org To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Oct 15 16:26:02 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e3jrP-0000K8-6m for ged-emacs-devel@m.gmane.org; Sun, 15 Oct 2017 16:25:47 +0200 Original-Received: from localhost ([::1]:57428 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e3jrU-0001uA-TB for ged-emacs-devel@m.gmane.org; Sun, 15 Oct 2017 10:25:52 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44691) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e3jqv-0001tt-2G for Emacs-devel@gnu.org; Sun, 15 Oct 2017 10:25:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e3jqq-0001Ck-Oe for Emacs-devel@gnu.org; Sun, 15 Oct 2017 10:25:17 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:37951) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e3jqq-0001Cf-LJ; Sun, 15 Oct 2017 10:25:12 -0400 Original-Received: from [176.228.60.248] (port=4625 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1e3jqq-0000bC-07; Sun, 15 Oct 2017 10:25:12 -0400 In-reply-to: <61bfc72e-b21f-3fb9-25b7-b718bb69d85b@cs.ucla.edu> (message from Paul Eggert on Sun, 15 Oct 2017 00:14:04 -0700) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:219547 Archived-At: > From: Paul Eggert > Date: Sun, 15 Oct 2017 00:14:04 -0700 > > I installed the attached into the default Git commit hooks to help remind us > (and particularly to remind me, since I write a fair number of these things) > that https: should be preferred to http: in commit-message URLs that point to > gnu.org or fsf.org web sites. > > + { > + if (match($0, unsafe_gnu_url)) { > + url = substr($0, RSTART, RLENGTH) > + printf "Use https: URL instead of '\''%s'\'' in commit message\n", url > + status = 1 "status = 1" means the commit will be rejected, am I right? If so, please don't fail commits because of that, it's too radical. E.g., I frequently cite URLs in commit messages, copying them from the browser, and this hook change will now require me to look for alternative URLs, if they exist, re-commit, perhaps find out that someone already pushed to upstream, then pull, push again... It's an annoyance. I cannot be responsible for every useful URL out there. Thanks.