From patchwork Wed Dec 25 06:42:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brett Gilio X-Patchwork-Id: 19439 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id F418F17920; Wed, 25 Dec 2019 06:43:09 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 963B9178DF for ; Wed, 25 Dec 2019 06:43:09 +0000 (GMT) Received: from localhost ([::1]:44296 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ik0Nx-0004MO-09 for patchwork@mira.cbaines.net; Wed, 25 Dec 2019 01:43:09 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:45735) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ik0Nq-0004Ks-UU for guix-patches@gnu.org; Wed, 25 Dec 2019 01:43:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ik0Np-0006Uf-SE for guix-patches@gnu.org; Wed, 25 Dec 2019 01:43:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:47255) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ik0Np-0006US-Oz for guix-patches@gnu.org; Wed, 25 Dec 2019 01:43:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ik0Np-0004IW-MW for guix-patches@gnu.org; Wed, 25 Dec 2019 01:43:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#38738] [PATCH WIP v2] etc: Add "tarball" snippet References: <87h81pymzj.fsf@gnu.org> In-Reply-To: <87h81pymzj.fsf@gnu.org> Resent-From: Brett Gilio Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 25 Dec 2019 06:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38738 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 38738@debbugs.gnu.org Received: via spool by 38738-submit@debbugs.gnu.org id=B38738.157725613616467 (code B ref 38738); Wed, 25 Dec 2019 06:43:01 +0000 Received: (at 38738) by debbugs.gnu.org; 25 Dec 2019 06:42:16 +0000 Received: from localhost ([127.0.0.1]:53228 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ik0N5-0004HX-TL for submit@debbugs.gnu.org; Wed, 25 Dec 2019 01:42:16 -0500 Received: from eggs.gnu.org ([209.51.188.92]:36189) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ik0N3-0004HK-N4 for 38738@debbugs.gnu.org; Wed, 25 Dec 2019 01:42:14 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:56337) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ik0My-0006C8-GS for 38738@debbugs.gnu.org; Wed, 25 Dec 2019 01:42:08 -0500 Received: from [2605:6000:1a0d:6320::6a8] (port=39484 helo=oryx) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ik0My-0003FO-3w for 38738@debbugs.gnu.org; Wed, 25 Dec 2019 01:42:08 -0500 From: Brett Gilio Date: Wed, 25 Dec 2019 00:42:15 -0600 Message-ID: <87eewszz20.fsf@gnu.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches This is a revised (but still ugly) revision of the original snippet that I think details somewhat what I mean by detecting the relevant changes to these types of commits and adding something to indicate this. I'd really like to see this be on the same line, instead of having two [source] blocks. But, as noted before, not a pro in Yasnippet by any means. :) (not to mention, the elisp is not good, but it is a rough concept). From 488faa8cabd298bb2d00f91a6056b26227089060 Mon Sep 17 00:00:00 2001 From: Brett Gilio Date: Wed, 25 Dec 2019 00:38:37 -0600 Subject: [PATCH] etc: Add "tarball" snippet * etc/snippets/text-mode/guix-commit-message-unstable-tarball: New file. --- .../guix-commit-message-unstable-tarball | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 etc/snippets/text-mode/guix-commit-message-unstable-tarball diff --git a/etc/snippets/text-mode/guix-commit-message-unstable-tarball b/etc/snippets/text-mode/guix-commit-message-unstable-tarball new file mode 100644 index 0000000000..6a41d2156a --- /dev/null +++ b/etc/snippets/text-mode/guix-commit-message-unstable-tarball @@ -0,0 +1,20 @@ +# -*- mode: snippet -*- +# name: guix-commit-message-unstable-tarball +# key: tarball +# condition: git-commit-mode +# -- +gnu: $1: Don't use unstable tarball. + +* `(car (magit-staged-files))` ($1): Modify package to use stable git references. +`(with-temp-buffer + (magit-git-wash #'magit-diff-wash-diffs + "diff" "--staged") + (beginning-of-buffer) + (when (search-forward "(method git-fetch" nil 'noerror) + (print "[source]: Use GIT-FETCH.")))` +`(with-temp-buffer + (magit-git-wash #'magit-diff-wash-diffs + "diff" "--staged") + (beginning-of-buffer) + (when (search-forward "(file-name (git-file-name" nil 'noerror) + (print "[source]: Use GIT-FILE-NAME.")))` -- 2.24.1