summaryrefslogtreecommitdiff
path: root/common-main.c
diff options
context:
space:
mode:
authorBrandon Williams <bmwill@google.com>2017-01-28 02:02:01 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-02-01 21:46:53 (GMT)
commit1a600b7555205f80b276659db4fd521658642505 (patch)
tree7cce47514bdbb976ab4844c2a8efd9296c3ac37c /common-main.c
parent428103c7f1a0cb8bb1432214efa60abc5bd5f198 (diff)
downloadgit-1a600b7555205f80b276659db4fd521658642505.zip
git-1a600b7555205f80b276659db4fd521658642505.tar.gz
git-1a600b7555205f80b276659db4fd521658642505.tar.bz2
attr: use hashmap for attribute dictionary
The current implementation of the attribute dictionary uses a custom hashtable. This modernizes the dictionary by converting it to the builtin 'hashmap' structure. Also, in order to enable a threaded API in the future add an accompanying mutex which must be acquired prior to accessing the dictionary of interned attributes. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'common-main.c')
-rw-r--r--common-main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/common-main.c b/common-main.c
index c654f95..6a68900 100644
--- a/common-main.c
+++ b/common-main.c
@@ -1,5 +1,6 @@
#include "cache.h"
#include "exec_cmd.h"
+#include "attr.h"
/*
* Many parts of Git have subprograms communicate via pipe, expect the
@@ -33,6 +34,8 @@ int main(int argc, const char **argv)
git_setup_gettext();
+ attr_start();
+
git_extract_argv0_path(argv[0]);
restore_sigpipe_to_default();