{"thread":{"id":"36251","subject":"[RFC][GSOC] Proposal Draft for GSoC, Suggest Changes","startedAt":"2014-03-20T16:36:18Z","lastAt":"2014-03-31T18:04:02Z","messageCount":3,"participants":["karthik nayak","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"237177","messageId":"CAOLa=ZRdxHz8VVT+iRaNSrj=EdpAFO2kjOhJ-++S9hODwDFmGg@mail.gmail.com","threadId":"36251","inReplyTo":null,"subject":"[RFC][GSOC] Proposal Draft for GSoC, Suggest Changes","fromName":"karthik nayak","fromEmail":"karthik.188@gmail.com","sentAt":"2014-03-20T16:36:18Z","receivedAt":"2014-03-20T16:36:18Z","isPatch":false,"sender":{"key":"karthik.188@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1786334?v=4"},"body":"Hello,\nI have completed my microproject under the guidance of Eric, After\ngoing through the code and\nprevious mailing lists. I have drafted my Proposal. Still going\nthrough the code\nas of now and figuring things out. Would be great to have your\nsuggestions on my proposal, so that i can improve it before submitting\nit. Also have written the proposal in markdown for easier formatting.\nDoesn't look pretty on plain text.\nThanks\nKarthik\n\n\nGit configuration API improvements\n\nAbstract\n\nCurrently git_config() has a few issues which need to be addressed:\n\nReads and parses the configuration files each time.\nValues cannot be unset,only can be set to false which has different\nimplications.\nRepeated setting and un-setting of value in a particular new header,\nleaves trails.\n\nThis project is to fix these problems while also retaining backward\ncompatibility\nwherever git_config() is called, by implementing a cache for the config's in a\ntree data structure, which provides for easier modification.\n\nAbout Me\n\nName : Karthik Nayak\nEmail : Karthik.188@gmail.com\nCollege : BMS Institute of Technology\nStudying : Engineering In Computer Science\nIRC : nayak94\nPhone : 91-XXXX-XXX-XXX\nCountry : India\nInterests : Guitar, Photography, Craft.\nGithub : KarthikNayak\n\nTechnical Experience\n\nHave been Learning about the Linux Kernel and its implementation on the android\nplatform. Released also on XDA-Dev for the phones LG P500 and Xperia SP.\nWorking on a Library in C on various Sorting Techniques.\nContributed to the Open-Source Lab Manual for Colleges under VTU.\nActive Member of Gnu/Linux Users Group in College and Free Software\nMovement of Karnataka.\n\nWhy i Picked Git\n\nThis is my first attempt at GSOC and as I began going through the list\nof organisations, what struck me is that\nI haven't really used any of the software's of most of the listed\norganisations. That's when I realized why\nnot contribute to something I use on a daily basis, this way I wont be\ncontributing only because I want to take\npart in GSOC, rather I'd contribute because I would love to be a part\nof something I use on a regular basis\nand would be able to contribute to the project even after GSOC.\n\nProposal\n\nIdeas Page : Git configuration API improvements\n\nThe Following improvements have to be made to how configs are handled in git :\n\nRead all the config files once and store them in an appropriate data structure.\n\nI suggest the use of an tree data structure to store the cache of the\nconfig files.\nI think tree data structure is a better choice over a hash - key data\nstructure as a tree data\nstructure although has a lower time efficiency than a hash - key data\nstructure while traversing\nfor a config request. A tree data structure can more optimal for\nfurther improvements like\nthe problem with setting and unsetting of configs can be easily\nhandled as when a node under\na particular header is deleted the header can check if it has no\nchildren nodes and on being true\ncan delete the header from the config file.\n\nChange git_config() to iterate through the pre-read values in memory\nrather than re-reading\nthe configuration files. This function should remain\nbackwards-compatible with the old implementation\nso that callers don't have to all be rewritten at once.\n\nNow whenever git_config() is called within a single invocation of git\nit can traverse the\ntree data structure already created and get the particular config.\nThis needs to maintain backward\ncompatibility. So the Basic functioning of functions like git_config()\nand so on would change the\nAPI should remain the same for the user invoking these calls.\n\nAdd new API functions that allow the cache to be inquired easily and\nefficiently.\nRewrite callers to use the new API wherever possible.\n\nNow that the base data structure and underlying changes have been made\nfor the data structure\nto work have been made, we can now add various new API functions to\nassist the usage of the data\nstructure. And also rewrite callers to use the new API's made available\n\nIssues to be addressed\n\nHeaders and comments left are all configs under a header is deleted.\n\nwhenever we set and unset configs under a particular header it leaves\ngarbage value\nbehind, for example :\n\ngit config pull.rebase true\ngit config --unset pull.rebase\ngit config pull.rebase true\ngit config --unset pull.rebase\n\nwould result in :\n\n[pull]\n[pull]\n\nAnd further changes made appear under the last header.\nThe issue also gives rise to comments being stranded within a header.\n\nPossible Solution :\n\nMake sure that the header is deleted whenever the last config under it\nis deleted.\nAlso delete comments within a header and comments made above a particular config\nwhen a config is removed and comments made above a header when the whole header\nis being removed.\n\nHow to invalidate the cache correctly in the case that the\nconfiguration is changed\nwhile git is executing.\n\nIf config is being changed while git is currently running then the\nchanges need to be considered.\n\nPossible Solution :\n\nA simple solution would be to discard the whole cache made and when an\ninvocation is\nmade the cache, is rebuilt again. Else we can find a way to update\nonly the changed config\nalthough this would be a harder implementation.\n\nTimeline\n\nBefore Coding Starts\n\nWeek 1 : Discuss the flow of course with the mentor.\nWeek 2-3 : Discuss the adequate Data Structure for caching config values.\nWeek 4 : Discuss on changing of git_config() to correspond to the new\nData Structure.\n\nCoding Starts\n\nWeek 1-2 : Submit Code for a new data structure. This will cache the\nconfig after its been read the first\nand this is stored as per to provide backward compatibility.\nWeek 3-5 : Make git_config() iterate over the new data structure when\nit is called, and make sure it is\nbackward compatible, until changes have been made to the calling functions.\n\nMid Term Evaluation\n\nWeek 6-11 : Add new API functions to allow integration and allow to\nretrieve configuration\nas per the data type (string, bool, int ... etc).\nWeek 11-12 : Small changes and cleaning up and fix for duplication of\nConfig Header after config\nbeing deleted.\nWeek 13 : Final Cleanup and Mentor suggested final touches to be made.\n\nPen Down Date\n\nSubmission of Code to GSOC\n"},{"id":"238109","messageId":"CAOLa=ZSzJMS=mx1tNYPjup0b5DCDVoxuCJPXAwDUo3tQTe-neA@mail.gmail.com","threadId":"36251","inReplyTo":"CAOLa=ZRdxHz8VVT+iRaNSrj=EdpAFO2kjOhJ-++S9hODwDFmGg@mail.gmail.com","subject":"Re: [RFC][GSOC] Proposal Draft for GSoC, Suggest Changes","fromName":"karthik nayak","fromEmail":"karthik.188@gmail.com","sentAt":"2014-03-31T15:12:15Z","receivedAt":"2014-03-31T15:12:15Z","isPatch":false,"sender":{"key":"karthik.188@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1786334?v=4"},"body":"Hello,\nNow that i have already submitted my proposal to GSOC , i was\nwondering if there is any way\nwhere i could contribute to git via bug fixes or something similar to\nthe microprojects which\nwas available prior to GSOC application.\nAlso wondering if any clarification was needed as per my proposal.\nWould be great to hear from you all .\nThanks\n- Karthik\n"},{"id":"238119","messageId":"xmqqfvly6y99.fsf@gitster.dls.corp.google.com","threadId":"36251","inReplyTo":"CAOLa=ZSzJMS=mx1tNYPjup0b5DCDVoxuCJPXAwDUo3tQTe-neA@mail.gmail.com","subject":"Re: [RFC][GSOC] Proposal Draft for GSoC, Suggest Changes","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2014-03-31T18:04:02Z","receivedAt":"2014-03-31T18:04:02Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"karthik nayak <karthik.188@gmail.com> writes:\n\n> if there is any way\n> where i could contribute to git via bug fixes or something similar\n\nYes, it is called the Git mailing list, and you are posting to\none. ;-)\n\nThis project works primarily with \"scratch your itch\" principle.\nWhen you see bugs or room for improvement in an area you are\nstudying in preparation for GSoC, you are welcome to send a patch\nseries to address them, even it is totally unrelated to your GSoC\napplication.\n\nThanks.\n"}]}