{"thread":{"id":"37240","subject":"[RFC] GSoC status update (config API improvements)","startedAt":"2014-07-29T12:58:18Z","lastAt":"2014-07-29T13:11:21Z","messageCount":2,"participants":["Tanay Abhra","Matthieu Moy"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"246903","messageId":"53D79A6A.2090302@gmail.com","threadId":"37240","inReplyTo":null,"subject":"[RFC] GSoC status update (config API improvements)","fromName":"Tanay Abhra","fromEmail":"tanayabh@gmail.com","sentAt":"2014-07-29T12:58:18Z","receivedAt":"2014-07-29T12:58:18Z","isPatch":false,"sender":{"key":"tanayabh@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2097229?v=4"},"body":"One month to go for GSoC to end and I am almost at the end of my project.\nSo what have we accomplished do far? Let's see,\n\n1> Git config cache:\n\nI have written a config cache which reads and caches the key/value pairs\nin a hashmap. It is generalized as config-set which can also be used to read\nconfig-like files (for example submodule config files).\n\nInstead of the unwieldy git_config() callback process for querying, callers\ncan now use the new API to query config values in as straightforward manner.\n\nfor example, for querying \"foo.frotz\", we can just write,\n\n\tchar *value;\n\tgit_config_get_value(\"foo.frotz\", &value);\n\nSimilar to git_config_get_value() there are helpers which do conversion to the\ndesired type (int or bool) as well as querying.\n\nIt is already in pu as \"ta/config-set\" and its latest iteration can be found\non [1].\n\n2> git_config() now uses the caching layer underneath.\n\ngit_config() now uses the config-set API, thus preventing expensive rereads\nof the configuration files during a git invocation.\n\nIt's almost polished and ready for pu. The latest iteration can be found on [2].\n\n3> git_config() calls rewrites\n\nMost of the git_config() calls in the code base can be rewritten as one liners using\nthe new config-set API.\n\nWork has already started on it and can be seen on [3].\n\n4> Tidy git configuration files\n\nTo be honest, I haven't started any real work on it, except brainstorming on it\nfor a little while. Basically it aims to correct the two broken tests in\nt1300-repo-config.sh, caused by the deficiencies in git_config_set() which are,\nsection headers are left untouched, even when all the keys related to it have been\nunset and adding a key into an empty section reuses the header .\n\n5> Any new feature suggestions??\n\nOther than the above, new features can be built on top of the new API.\nGoing through the previous mailing lists I could find one or two ideas, namely,\n\na> Unsetting previously set values\nLocal config files can be used to unset config values previously set in system\nfiles. The user may not have the privilege to touch the system files so he can\nleverage the new API to unset the previously set values.\n\nAny suggestions for new features or improvements are welcome!\n\nAlso, I like to thank my mentors Matthieu and Ram for their suggestions\nand timely review even when my patches were late. ;)\n\nCheers,\nTanay Abhra.\n\n[1]:http://thread.gmane.org/gmane.comp.version-control.git/254286\n[2]:http://thread.gmane.org/gmane.comp.version-control.git/254412\n[3]:http://thread.gmane.org/gmane.comp.version-control.git/253948\n"},{"id":"246907","messageId":"vpq7g2w71ja.fsf@anie.imag.fr","threadId":"37240","inReplyTo":"53D79A6A.2090302@gmail.com","subject":"Re: [RFC] GSoC status update (config API improvements)","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2014-07-29T13:11:21Z","receivedAt":"2014-07-29T13:11:21Z","isPatch":false,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Tanay Abhra <tanayabh@gmail.com> writes:\n\n> a> Unsetting previously set values\n> Local config files can be used to unset config values previously set in system\n> files. The user may not have the privilege to touch the system files so he can\n> leverage the new API to unset the previously set values.\n\nI had totally forgotten about this, but this was the initial motivation\nto write a config cache, so it would be a good conclusion for your\nproject.\n\nThanks to the patches you already wrote, the feature went from\n\"impossible to implement given the design\" to \"fairly straightforward to\nimplement\" :-).\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"}]}