[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#50072] [PATCH WIP 0/4] Add upstream updater for git-fetch origins.
From: |
Maxime Devos |
Subject: |
[bug#50072] [PATCH WIP 0/4] Add upstream updater for git-fetch origins. |
Date: |
Wed, 05 Jan 2022 11:07:06 +0100 |
User-agent: |
Evolution 3.38.3-1 |
zimoun schreef op di 04-01-2022 om 23:22 [+0100]:
> 2) ’auto’ is confusing…
>
> > + (select? (negate vcs-file?)))
> > + "Compute the hash of FILE with ALGORITHM. If RECURSIVE? is #true or
> > 'auto',
> > +recurse into subdirectories of FILE, computing the combined hash (nar
> > hash) of
>
> …here I understand that ’auto’ means #true…
Precisely, in the sense 'auto' means #true in that 'auto' recurses.
But sometimes #true / auto compute a different hash ...
> > +Keep in mind that the hash of a regular file depends on RECURSIVE?:
> > +if the recursive hash is desired, it must be set to #true. Otherwise, it
> > must
> > +be set to #false or 'auto'. In most situations, the non-recursive hash is
> > desired
> > +for regular files."
>
> …but there it is the contrary. :-)
No, when #:recursive? is 'auto' and the file is a directory, it
recurses. When it is 'auto' and the file is a regular file, then
it also recurses, albeit in a trivial way (because regular files don't
contain other files).
This comment explains that the 'recursive hash' (nar hash) and 'regular
hash' of a regular file are different, that usually you want the
regular hash for regular files, and implies that '#:recursive? auto'
usually does the right thing.
But if you really want the recursive hash for regular files, then you
can still compute that by setting #:recursive? #true.
> To me, #true/#false or #t/#f are
> meaningful, especially when…
>
> > + (if (or (eq? recursive? #true)
> > + (and (eq? recursive? 'auto)
>
> …the symbol ’auto’ is only used here. IIRC all the series. :-)
In ‘[PATCH v4 3/4] refresh: Support non-tarball sources.’, there's
> + (let ((hash (file-hash* output)))
There, #:recursive? is 'auto'.
Greetings,
Maxime
signature.asc
Description: This is a digitally signed message part
- [bug#50072] [PATCH v4 0/4] Add upstream updater for git-fetch origins, Maxime Devos, 2022/01/04
- [bug#50072] [PATCH v4 2/4] import: Factorize file hashing., Maxime Devos, 2022/01/04
- [bug#50072] [PATCH v4 1/4] guix hash: Extract file hashing procedures., Maxime Devos, 2022/01/04
- [bug#50072] [PATCH WIP 0/4] Add upstream updater for git-fetch origins., zimoun, 2022/01/04
- [bug#50072] [PATCH WIP 0/4] Add upstream updater for git-fetch origins., Maxime Devos, 2022/01/05
- [bug#50072] [PATCH WIP 0/4] Add upstream updater for git-fetch origins., zimoun, 2022/01/05
- [bug#50072] [PATCH WIP 0/4] Add upstream updater for git-fetch origins., Maxime Devos, 2022/01/05
- [bug#50072] [PATCH WIP 0/4] Add upstream updater for git-fetch origins., zimoun, 2022/01/05
- [bug#50072] [PATCH WIP 0/4] Add upstream updater for git-fetch origins., Maxime Devos, 2022/01/05
- [bug#50072] [PATCH WIP 0/4] Add upstream updater for git-fetch origins., Ludovic Courtès, 2022/01/06
- [bug#50072] [PATCH WIP 0/4] Add upstream updater for git-fetch origins., Maxime Devos, 2022/01/06