1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-11-01 23:07:55 +01:00
git/Documentation/technical
Karsten Blees ab73a9d119 hashmap: add simplified hashmap_get_from_hash() API
Hashmap entries are typically looked up by just a key. The hashmap_get()
API expects an initialized entry structure instead, to support compound
keys. This flexibility is currently only needed by find_dir_entry() in
name-hash.c (and compat/win32/fscache.c in the msysgit fork). All other
(currently five) call sites of hashmap_get() have to set up a near emtpy
entry structure, resulting in duplicate code like this:

  struct hashmap_entry keyentry;
  hashmap_entry_init(&keyentry, hash(key));
  return hashmap_get(map, &keyentry, key);

Add a hashmap_get_from_hash() API that allows hashmap lookups by just
specifying the key and its hash code, i.e.:

  return hashmap_get_from_hash(map, hash(key), key);

Signed-off-by: Karsten Blees <blees@dcon.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-07-07 13:56:35 -07:00
..
.gitignore
api-allocation-growing.txt
api-argv-array.txt argv-array: drop "detach" code 2014-05-15 09:49:12 -07:00
api-builtin.txt docs: document RUN_SETUP_GENTLY and clarify RUN_SETUP 2014-04-30 11:28:21 -07:00
api-config.txt
api-credentials.txt doc: various spelling fixes 2013-04-12 12:00:52 -07:00
api-decorate.txt
api-diff.txt diff_opt: track whether flags have been set explicitly 2013-05-10 10:24:17 -07:00
api-directory-listing.txt dir.c: git-status --ignored: don't scan the work tree twice 2013-04-15 12:36:42 -07:00
api-gitattributes.txt Documentation: fix misuses of "nor" 2014-03-31 15:16:22 -07:00
api-grep.txt
api-hashmap.txt hashmap: add simplified hashmap_get_from_hash() API 2014-07-07 13:56:35 -07:00
api-history-graph.txt
api-in-core-index.txt
api-index-skel.txt
api-index.sh
api-lockfile.txt
api-merge.txt
api-object-access.txt
api-parse-options.txt parse-options: remove unused OPT_SET_PTR 2014-03-31 13:01:19 -07:00
api-quote.txt
api-ref-iteration.txt ref-iteration doc: add_submodule_odb() returns 0 for success 2013-12-03 10:40:40 -08:00
api-remote.txt api-remote.txt: correct section "struct refspec" 2013-10-24 13:28:28 -07:00
api-revision-walking.txt many small typofixes 2013-07-29 12:32:25 -07:00
api-run-command.txt run-command: store an optional argv_array 2014-05-15 09:49:09 -07:00
api-setup.txt guard against new pathspec magic in pathspec matching code 2013-07-15 10:56:07 -07:00
api-sha1-array.txt The name of the hash function is "SHA-1", not "SHA1" 2013-04-15 11:08:37 -07:00
api-sigchain.txt
api-strbuf.txt Merge branch 'jm/api-strbuf-doc' 2014-06-20 13:12:11 -07:00
api-string-list.txt string-list: spell all values out that are given to a string_list initializer 2014-06-06 13:49:19 -07:00
api-tree-walking.txt
api-xdiff-interface.txt
bitmap-format.txt pack-bitmap: implement optional name_hash cache 2013-12-30 12:19:23 -08:00
http-protocol.txt Merge branch 'ye/doc-http-proto' 2014-06-25 12:23:52 -07:00
index-format.txt typofix: documentation 2013-07-22 16:06:48 -07:00
pack-format.txt The name of the hash function is "SHA-1", not "SHA1" 2013-04-15 11:08:37 -07:00
pack-heuristics.txt pack-heuristics.txt: mark up the file header properly 2014-01-13 11:18:34 -08:00
pack-protocol.txt Documentation: fix misuses of "nor" 2014-03-31 15:16:22 -07:00
protocol-capabilities.txt protocol-capabilities.txt: document no-done 2014-02-10 10:21:33 -08:00
protocol-common.txt Documentation: fix misuses of "nor" 2014-03-31 15:16:22 -07:00
racy-git.txt typofix: documentation 2013-07-22 16:06:48 -07:00
send-pack-pipeline.txt
shallow.txt The name of the hash function is "SHA-1", not "SHA1" 2013-04-15 11:08:37 -07:00
trivial-merge.txt