unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* add-to-store, add-text-to-store, and store path hash parts
@ 2019-05-12 20:54 Caleb Ristvedt
  0 siblings, 0 replies; only message in thread
From: Caleb Ristvedt @ 2019-05-12 20:54 UTC (permalink / raw)
  To: ludo, guix-devel

I'm currently focusing on two particular RPCs that we use, addToStore
and addTextToStore. In the Nix thesis I only see reference to
addToStore. What's the difference between the two? I see that
addTextToStore allows specifying references while addToStore doesn't,
and addTextToStore is specifically for regular files. What's the
motivation for the split? Additionally, the hash part of the resulting
path is computed differently for addTextToStore, addToStore, and
addToStore with recursive set. This means that there could be three
regular files with the exact same contents and the exact same name, but
different hash parts. It doesn't violate any store invariants or
anything, of course, but I'm wondering why it's done.

Especially puzzling to me is what the purpose of the recursive flag is
for addToStore. It causes the path hash to be calculated differently and
makes sure that non-regular files cause errors, but why?

Thanks in advance for any answers y'all can give.

- reepca

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-05-12 21:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-12 20:54 add-to-store, add-text-to-store, and store path hash parts Caleb Ristvedt

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).