unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Pierre Neidhardt <mail@ambrevar.xyz>
To: Brett Gilio <brettg@gnu.org>
Cc: 38738@debbugs.gnu.org
Subject: [bug#38738] [PATCH WIP v2] etc: Add "tarball" snippet
Date: Thu, 27 Feb 2020 11:14:26 +0100	[thread overview]
Message-ID: <87wo8872wt.fsf@ambrevar.xyz> (raw)
In-Reply-To: <87eewszz20.fsf@gnu.org> (Brett Gilio's message of "Wed, 25 Dec 2019 00:42:15 -0600")

[-- Attachment #1: Type: text/plain, Size: 774 bytes --]

Looks good to me!

If you want to print only one "[source]:" I suggest the following,
untested:

* `(car (magit-staged-files))` ($1): Modify package to use stable git references.
`(with-temp-buffer
   (magit-git-wash #'magit-diff-wash-diffs
     "diff" "--staged")
   (let ((source-block "[source]: ")
         (wrote-source-block? nil))
     (beginning-of-buffer)
     (when (search-forward "(method git-fetch" nil 'noerror)
       (setq wrote-source-block? t)
       (print (format "%sUse GIT-FETCH." source-block)))
     (beginning-of-buffer)
     (when (search-forward "(file-name (git-file-name" nil 'noerror)
       (print (format "%sUse GIT-FILE-NAME." (if wrote-source-block? "" "[source]:"))))))`


-- 
Pierre Neidhardt
https://ambrevar.xyz/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

  reply	other threads:[~2020-02-27 10:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-25  5:48 [bug#38738] [PATCH WIP] etc: Add "tarball" snippet Brett Gilio
2019-12-25  6:42 ` [bug#38738] [PATCH WIP v2] " Brett Gilio
2020-02-27 10:14   ` Pierre Neidhardt [this message]
2022-04-12 10:40     ` [bug#38738] [PATCH WIP] " zimoun
2022-05-19 21:20       ` bug#38738: " zimoun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wo8872wt.fsf@ambrevar.xyz \
    --to=mail@ambrevar.xyz \
    --cc=38738@debbugs.gnu.org \
    --cc=brettg@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).