]> git.ipfire.org Git - thirdparty/ccache.git/commit
Improve naming of things
authorJoel Rosdahl <joel@rosdahl.net>
Sat, 8 Jun 2019 18:49:39 +0000 (20:49 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Sat, 8 Jun 2019 19:17:48 +0000 (21:17 +0200)
commit0887dcaa24db74ef1e101827e3679d2ed0c3ae6e
tree4b35f137257a24e4908da9aca8b1a77d2f350908
parent10bce6078e74c19dfea9f19d15daff5ca7ab2a2c
Improve naming of things

Some words are being used to mean several things in the code base:

* “object” can mean both “the object file (.o) produced by the compiler”
  and “the result stored in the cache, including e.g. the .o file and .d
  file”.
* “hash” can mean both “the state that the hash_* functions operate on”,
  “the output of a hash function” and “the key used to index results
  and manifests in the cache”.

This commits tries to make the naming more consistent:

* “object” means “the object file (.o) produced by the compiler”
* “result” means “the result stored in the cache, including e.g. the .o
  file and .d file”.
* “struct hash” means “the state that the hash_* functions operate on”.
* “digest” means “the output of a hash function”. However, “hash” is
  still used in documentation and command line output since I think that
  “hash” is easier to understand for most people, especially since
  that’s the term used by Git.
* “name” means “the key used to index results and manifests in the
  cache”.
src/ccache.c
src/manifest.c
src/manifest.h