{"thread":{"id":"38893","subject":"Fwd: [RFC] [GSoC Proposal Draft] Unifying git branch -l,git tag -l and git for-each-ref","startedAt":"2015-03-23T18:33:53Z","lastAt":"2015-03-23T18:33:53Z","messageCount":1,"participants":["Sundararajan R"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"258378","messageId":"CAPV5_7L=439EK6hjdY-d7FVpdCZaj=H0-Bubqxmk8NFFJNBgfw@mail.gmail.com","threadId":"38893","inReplyTo":"CAPV5_7KVxLWoWGRYksnq+is4tgdP_KS4=GVPMZZ23d-23dLKkw@mail.gmail.com","subject":"Fwd: [RFC] [GSoC Proposal Draft] Unifying git branch -l,git tag -l and git for-each-ref","fromName":"Sundararajan R","fromEmail":"dyoucme@gmail.com","sentAt":"2015-03-23T18:33:53Z","receivedAt":"2015-03-23T18:33:53Z","isPatch":false,"sender":{"key":"dyoucme@gmail.com","avatar":null},"body":"Hi all,\n\nI have attempted a microproject [1][2] and this is my first draft of\nthe proposal.I have included only the matter regarding my approach\nto solving the problem and shall add my personal details later.\n\nPlease be kind enough to go through my proposal and suggest modifications\nor detailing wherever required. Also give me feedback on whether my approach to\nsolving the problem is correct.\n\nIn the meantime I am reading up the code of Jeff's attempt at\nunification,here [3] for preparing my final proposal.\n\n--------------------------------------------------------------------------------\n\nTitle\n-----\n\nUnifying git branch -l,git tag -l and git for-each-ref\n\nAbstract\n--------\n\ngit for-each-ref and the list modes of git branch and git tag involve selecting\na subset of the refs and printing out the result. Currently the implementations\nare not shared in the sense that :-\n\nSELECTION\n1. git branch knows --contains,--merged and --no-merged\n2. git tag only knows --contains\n\nFORMATTING\n1. git for-each-ref knows formatting which none of the other two commands know.\n\nSORTING\n1. git tag knows sorting only on the basis of refnames\n2. git for-each-ref knows sorting on the basis of all the fieldnames\nwhich can be\nused in its --format option\n\nThe idea is to unify the computations for these processes in a common library\nand teach these commands all these options uniformly.\n\nWhy do we need unification?\nThese commands try to accomplish more or less the same thing . So,new\nfeatures would\nmost likely be applicable to all three of them. So, unification will\nallow us build\nnew features for all these commands in one go instead of doing it separately for\neach of the three commands.\n\nJeff has already worked quite a bit on unifying the selection part. I shall use\nthat work as a starting point when I start off building the library\nand its API calls.\n\nDeliverables\n------------\n\n1. The unified library will borrow the --contains implementation from git tag\n(due to the speed up it had received), the --merged/--no-merged implementation\nfrom git branch and the --format implementation from git for-each-ref.\n\n2. The commands will then be taught these options by making calls to\nthis library\nfunctions and structures.\n\n3. Add documentation and tests for these new features.\n\nOptionals\n---------\n\n1. Implement the --sort option for these commands in the unified library.\n2. Add documentation and tests for this feature\n\nApproach\n--------\n\nThe common library will contain a structure which will store the\npresent state of the\nlist of refs in the sense that after we perform a computation(eg.\n--contains <commit>)\non the list of refs, the new list will store the result of that computation.\n\nThe structure will also have other attributes which the options\nstructure will take in\nas its (void *)value attribute’s value before parsing the different\noptions. This is to\ncommunicate to the structure about the various options(eg. --merged,\n--format, --sort)\nwe want to use. The list of refs shall be fetched by the API in accordance with\nthe command(eg. git tag) and its option(eg. --merged) which were\npassed to the API.\n\nNext comes the matter of printing out the results according to the\nformat specified\n(the default format for the command if no format is specified). This\nwill be done\nin a method similar to how git for-each-ref prints out the results in\nthe given format.\n\nApproximate Timeline\n--------------------\n\n(To estimate the amount of work that can be done in summers though it may change\n during the project[based on advice from mentors])\n\nMay 03 - May 10\nRead and understand the implementation of --contains option in git tag and the\n--merged/--no-merged implementation in git branch.\n\nMay 11 - May 17\nGo through Jeff’s work on unification to get detailed pointers on how\nto start with\nunifying selection. Finalise all the structures required and also the API calls\nthe library would have to make for the selection options.\n\nMay 18 - May 24\nStart working on the API.  Discuss ideas with mentor, brainstorm on\nthe details of\nwhat function calls will be made to the API and what function calls\nwill be made by the API.\n\nCODING PERIOD BEGINS\n\nMay 25 - May 31\nImplement the --contains option in the library by taking the cue from\nhow git tag --contains\nis implemented.\n\nJune 1 - June 7\nImplement the -merge and --no-merged options similar to how they are\nimplemented in git branch\n\nJune 8 - June 11\nMake computations more efficient, improve comments and start documentation.\nDiscuss about additional features and requirements with mentors.\n\nJune 12 - June 25\nTeach the three commands to use the API for formatting and sorting.\nAdd tests and refactor\nthe code of the API if required. Complete the documentation for the\nnew features added.\n\nMID-TERM EVALUATION\n\nJune 26 - June 30\nDiscuss with mentors about the state and the pace with which the\nproject is coming on.\nStart finalising the details of the further goals to be accomplished.\n\nJuly 01 - July 07\nStart working on the formatting and sorting by going through their\ncode respective codes\nin git for-each-ref. Put together a list of API calls along with their\nfunctionality,\nwhich we need to add to the library to implement these features.\n\nJuly 08 - July 21\nImplement the --format feature in the library with all the API calls\nit needs to make\n\nJuly 22 - August 04\nTeach the three commands to use the API for formatting and sorting.\nImprove comments\nand code readability. Add documentation and tests for all the new\nfeatures that have\nbeen implemented.\n\nAugust 05 - August 16\nI have kept these two weeks as a buffer. If a feature is taking more\ntime than expected\nthen I will concentrate on rectifying it. Else, I shall start working\non the implementation\nof the --sort feature in the library by taking the cue from its\nimplementation in git for-each-ref.\nI shall also add documentation and tests for this\n\nSUGGESTED ‘PENCILS DOWN’ DATE\n\nAfter August 16\nSubmit the project on the GSoC melange website .Try to contribute to\nprojects that fit my\nskill set and remain active on mailing list.\n\n-------------------------------------------------------------------------------------------------\nThanks and regards,\nR Sundararajan\n\n[1] : http://thread.gmane.org/gmane.comp.version-control.git/265695\n[2] : http://thread.gmane.org/gmane.comp.version-control.git/265696/focus=265742\n[3] : https://github.com/peff/git/commits/jk/for-each-ref-contains-wip\n"}]}