From: ludo@gnu.org (Ludovic Courtès)
To: Vincent Legoll <vincent.legoll@gmail.com>
Cc: guix-devel <guix-devel@gnu.org>
Subject: Re: [PATCH] scripts: hash: Add --exclude-.git option.
Date: Tue, 06 Sep 2016 14:24:37 +0200 [thread overview]
Message-ID: <8737ldtdve.fsf@gnu.org> (raw)
In-Reply-To: <CAEwRq=qRAp7JGce7PVU1gCH6rJ6s9o7h9P7Bb0wA9JhSrB=XoA@mail.gmail.com> (Vincent Legoll's message of "Tue, 6 Sep 2016 08:48:07 +0200")
Vincent Legoll <vincent.legoll@gmail.com> skribis:
> On Mon, Sep 5, 2016 at 11:33 PM, Ludovic Courtès <ludo@gnu.org> wrote:
>> Hello!
>>
>> Jan Nieuwenhuizen <janneke@gnu.org> skribis:
>>
>>> Added an -g/--exclude-.git option for guix hash. It is very specific:
>>> it skips toplevel .git directory. WDYT?
>>
>> Good idea!
>>
>>> From 86a580840f21f858b757cb7f421b0ba1c169e09d Mon Sep 17 00:00:00 2001
>>> From: Jan Nieuwenhuizen <janneke@gnu.org>
>>> Date: Mon, 5 Sep 2016 10:27:19 +0200
>>> Subject: [PATCH] scripts: hash: Add --exclude-.git option.
>>>
>>> * guix/scripts/hash.scm (show-help): Add help text for --exclude-.git option.
>>> (%options): Add --exclude-.git option.
>>> (guix-hash): Handle exclude-.git option.
>>> * doc/guix.texi ("invoking guix hash"): Update doc.
>> ^
>> Capital I. :-)
>>
>>> * tests/guix-hash.sh: Add test.
>>> @table @code
>>>
>>> +@item --exclude-.git
>>> +@itemx -g
>>
>> What about --exclude-vcs/-x? Tar uses that name, although with slightly
>> different semantics (info "(tar) exclude").
>>
>>> + (select? (if (assq-ref opts 'exclude-.git)
>>> + (lambda (f s) (not (string= f "./.git")))
>>
>> Rather make the lambda a top-level procedure, like:
>>
>> (define (vcs-file? file stat)
>> (case (stat:type stat)
>> ((directory)
>> (member (basename file) '(".git" ".svn" "CVS" …)))
>
> Could this not come from each vcs package ?
>
> i.e. each vcs package defines a vcs-dir which get put together in a global
> %vcs-dirs variable that is used here ?
>
> I ask because that's how I did it in meld (which I'll try to package for guix)
> in a distant past...
>
> WDYT, overdesigned ?
Respectfully, I think so. :-)
Ludo’.
prev parent reply other threads:[~2016-09-06 12:25 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-05 8:43 [PATCH] scripts: hash: Add --exclude-.git option Jan Nieuwenhuizen
2016-09-05 9:20 ` Hartmut Goebel
2016-09-05 10:56 ` Vincent Legoll
2016-09-05 11:36 ` Jan Nieuwenhuizen
2016-09-05 20:20 ` Efraim Flashner
2016-09-05 21:04 ` Jan Nieuwenhuizen
2016-09-05 21:14 ` Leo Famulari
2016-09-05 20:50 ` Leo Famulari
2016-09-05 20:49 ` Danny Milosavljevic
2016-09-05 20:52 ` Leo Famulari
2016-09-05 21:33 ` Ludovic Courtès
2016-09-06 6:36 ` Jan Nieuwenhuizen
2016-09-06 12:26 ` Ludovic Courtès
2016-09-07 10:02 ` Ludovic Courtès
2016-09-06 6:48 ` Vincent Legoll
2016-09-06 12:24 ` Ludovic Courtès [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8737ldtdve.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=guix-devel@gnu.org \
--cc=vincent.legoll@gmail.com \
/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 external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.