{"thread":{"id":"52885","subject":"[GSoC][RFC][PROPOSAL v1] Unify ref-filter formats with other --pretty formats","startedAt":"2020-02-26T00:03:46Z","lastAt":"2020-03-04T15:16:45Z","messageCount":2,"participants":["Hariom verma","Christian Couder"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"392496","messageId":"CA+CkUQ9Pnta8Ut9ZaeKLSPn_EyQwh=Wgm1eiSWirghgtcWZqoA@mail.gmail.com","threadId":"52885","inReplyTo":null,"subject":"[GSoC][RFC][PROPOSAL v1] Unify ref-filter formats with other --pretty formats","fromName":"Hariom verma","fromEmail":"hariom18599@gmail.com","sentAt":"2020-02-26T00:03:31Z","receivedAt":"2020-02-26T00:03:46Z","isPatch":false,"sender":{"key":"hariom18599@gmail.com","avatar":"https://avatars.githubusercontent.com/u/37576387?v=4"},"body":"Here is the initial version of my proposal. I would really love to\nhave comments on it.\nAlso, how should I manage the project timeline?\n\nProject title says some past GSoC and Outreachy Interns had worked on this.\nI would also like to be redirected there. So I can learn from there\nwork as well.\n\nThanks,\nHariom\n\n=====================================\n\nView on Docs: https://docs.google.com/document/d/15GPvle6S0iNg430aJx-gMrXvsgnzTlFNFhyP-K6Zmtw/edit?usp=sharing\n\n======================================\n\n**Unify ref-filter formats with other --pretty formats**\n\nName  :  Hariom Verma\nMajor  :  Computer Science and Engineering\nMobile no.  : <<mob_no>>\nEmail  : <<email>>\nTime Zone  : IST (UTC +05:30)\n\n## About me\nI am a Computer Science undergraduate at Shri G S Institute of\nTechnology & Science, Indore, India. I am passionate about software\nfreedom and open source communities. I've been writing in C, C++,\nPython & Dart for almost 3 years, and contributed to some projects\nwhich can be seen on Github.\n\nI’m contributing to Git since Oct 2019 and would love to be a member\nof such a versatile community.\n\n### Contact:\nIRC: harry-hov (on #git-devel@freenode)\nGitHub: harry-hov\nLinkedin: https://www.linkedin.com/in/harry-hov/\n\n## Me & Git\nMy contributions have helped me understand the review and patch\nsubmission process in a batter way. Also, I now feel a bit more\ncomfortable with Git’s codebase.\n\nCommit\nStatus\n-------------------\nreceive.denyCurrentBranch: respect all worktrees[1]\nStatus: next\n\nt5509: use a bare repository for test push target[2]\nStatus: next\n\nget_main_worktree(): allow it to be called in the Git directory[3]\nStatus: next\n\ngit-compat-util.h: drop the `PRIuMAX` and other fallback definitions[4]\nStatus: Merged to master\n\nbuiltin/blame.c: constants into bit shift format[5]\nStatus: Merged to Master\n\n## Proposed Project\n\n### Abstract\nGit has an old problem of duplicated implementations of some logic.\nFor example, Git had at least 4 different implementations to format\ncommand output for different commands. The foremost aim of this\nproject is to simplify codebase by getting rid of duplication of a\nsimilar logic and, as a result, simplify adding new functionality.\nThe current task is to reuse ref-filter formatting logic in pretty to\nminimize code duplication and to have one unified interface to extract\nall needed data from the object and to print it properly.\n\n### Plan\nAs Thomas Gummerer suggested[6] I’ll start by first looking at what\nactually needed to be replaced (for example by studying the PRETTY\nFORMATS section in 'man git-log', what which verbs you can use in the\nref-filter ('man git-for-each-ref') to achieve the same thing.\nThen I’ll research how one format is implemented in 'pretty.c', and\nsee how a similar thing using the ref-filter is implemented in\n'ref-filter.c'.\ne.g. the \"%(objectname:short) %(contents:subject)\" (this is missing\ncoloring, but just to get you the idea) is similar to\n'--pretty=oneline'.  Now one can try to find how 'oneline' is\nimplemented in 'pretty.c', and could translate that to use the\n'ref-filter' API.\n\n### Potential Problem\nThe biggest challenge is to maintain backward compatibility while\nusing reuse ref-filter formatting logic in pretty. One can't just\ndelete some commands, rewrite them and change their interface.\nAlso, bugs could get introduced.\n\n## Availability\nMy exams will end on 30 April. I might travel home after that. So, I\ncan start actively writing code for this project after 3 May. My\ncollege resumes on 15 July. I can easily devote 45-50 hours a week\nuntil my college reopens and 35-40 hours per week after that. I'm also\nfree on the weekends and I intend to complete most of the work before\nmy college reopens. Other than this project, I have no commitments for\nthis summer. I will also periodically post my status through blogs.\n\n## Post GSoC\nAs I said, I would love to be a member of Git’s community. So, I\nintend to keep contributing even after the GSoC period ends.\n\n## Experience with Open Souce (Optional)\n-> Organized many Git workshops for newcomers with HackSocIndore[7].\nHackSocIndore is a group of developers that organizes Hackathons,\nWorkshops & Technical Events. I’m the core team member at HackSoc.\n-> Mentor, Kharagpur Winter of Code (KWoC)[8]\nKharagpur Winter of Code is a 5-week long online program for students\nwho are new to Open Source Development.\n\n\n[1]:https://public-inbox.org/git/d21a590d6c23f231c54b731b737c363b83660f79.1582484231.git.gitgitgadget@gmail.com/\n[2]:https://public-inbox.org/git/ae749310f067c43429741987cd9f47c1ae4ceb3f.1582484231.git.gitgitgadget@gmail.com/\n[3]:https://public-inbox.org/git/8718facbc951614f19407afa6ca8d6110507483d.1582484231.git.gitgitgadget@gmail.com/\n[4]:https://public-inbox.org/git/177deddcf83c2550c0db536a7a6942ba69a92fa5.1574600963.git.gitgitgadget@gmail.com/\n[5]:https://public-inbox.org/git/838478a185322572ed4747eb484b678a8e2d7ac6.1571334411.git.gitgitgadget@gmail.com/\n[6]:https://public-inbox.org/git/20190331184930.GV32487@hank.intra.tgummerer.com/\n[7]:https://www.hacksoc.in\n[8]:https://kwoc.kossiitkgp.org\n"},{"id":"392857","messageId":"CAP8UFD2516a1inME4nUeo6f8K5TJGEJ3RXFg_Xk2+GqBv=ouRA@mail.gmail.com","threadId":"52885","inReplyTo":"CA+CkUQ9Pnta8Ut9ZaeKLSPn_EyQwh=Wgm1eiSWirghgtcWZqoA@mail.gmail.com","subject":"Re: [GSoC][RFC][PROPOSAL v1] Unify ref-filter formats with other --pretty formats","fromName":"Christian Couder","fromEmail":"christian.couder@gmail.com","sentAt":"2020-03-04T15:16:17Z","receivedAt":"2020-03-04T15:16:45Z","isPatch":false,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"Hi,\n\nThanks for your proposal!\n\nOn Wed, Feb 26, 2020 at 1:03 AM Hariom verma <hariom18599@gmail.com> wrote:\n>\n> Here is the initial version of my proposal. I would really love to\n> have comments on it.\n> Also, how should I manage the project timeline?\n\nMy advice would be to look at previous proposals on the mailing list.\nWe mostly want a project timeline that makes sense and show that you\nhave studied on a high level the work that you will have to do.\n\n> Project title says some past GSoC and Outreachy Interns had worked on this.\n> I would also like to be redirected there. So I can learn from there\n> work as well.\n\nThanks Abhishek for your answer about this.\n\nYeah, please look at the work that was done, which includes what was\nsent to the mailing list and maybe things that weren't sent.\n\n> **Unify ref-filter formats with other --pretty formats**\n>\n> Name  :  Hariom Verma\n> Major  :  Computer Science and Engineering\n> Mobile no.  : <<mob_no>>\n> Email  : <<email>>\n> Time Zone  : IST (UTC +05:30)\n>\n> ## About me\n> I am a Computer Science undergraduate at Shri G S Institute of\n> Technology & Science, Indore, India. I am passionate about software\n> freedom and open source communities. I've been writing in C, C++,\n> Python & Dart for almost 3 years, and contributed to some projects\n> which can be seen on Github.\n\nPlease add a link to your GitHub page here, so that we can quickly\ntake a look at what you contributed.\n\n> I’m contributing to Git since Oct 2019 and would love to be a member\n> of such a versatile community.\n>\n> ### Contact:\n> IRC: harry-hov (on #git-devel@freenode)\n> GitHub: harry-hov\n> Linkedin: https://www.linkedin.com/in/harry-hov/\n\nPlease move this contact information along with your name, email and\ntime zone above.\n\n> ## Me & Git\n> My contributions have helped me understand the review and patch\n> submission process in a batter way. Also, I now feel a bit more\n> comfortable with Git’s codebase.\n>\n> Commit\n> Status\n> -------------------\n> receive.denyCurrentBranch: respect all worktrees[1]\n> Status: next\n>\n> t5509: use a bare repository for test push target[2]\n> Status: next\n>\n> get_main_worktree(): allow it to be called in the Git directory[3]\n> Status: next\n>\n> git-compat-util.h: drop the `PRIuMAX` and other fallback definitions[4]\n> Status: Merged to master\n>\n> builtin/blame.c: constants into bit shift format[5]\n> Status: Merged to Master\n\nI would prefer to have the links here rather than at the end of the\ndocument. Also please add links to the commits on GitHub or GitLab.\n\n> ## Proposed Project\n>\n> ### Abstract\n> Git has an old problem of duplicated implementations of some logic.\n> For example, Git had at least 4 different implementations to format\n> command output for different commands. The foremost aim of this\n> project is to simplify codebase by getting rid of duplication of a\n> similar logic and, as a result, simplify adding new functionality.\n> The current task is to reuse ref-filter formatting logic in pretty to\n> minimize code duplication and to have one unified interface to extract\n> all needed data from the object and to print it properly.\n>\n> ### Plan\n> As Thomas Gummerer suggested[6] I’ll start by first looking at what\n> actually needed to be replaced (for example by studying the PRETTY\n> FORMATS section in 'man git-log', what which verbs you can use in the\n> ref-filter ('man git-for-each-ref') to achieve the same thing.\n> Then I’ll research how one format is implemented in 'pretty.c', and\n> see how a similar thing using the ref-filter is implemented in\n> 'ref-filter.c'.\n> e.g. the \"%(objectname:short) %(contents:subject)\" (this is missing\n> coloring, but just to get you the idea) is similar to\n> '--pretty=oneline'.  Now one can try to find how 'oneline' is\n> implemented in 'pretty.c', and could translate that to use the\n> 'ref-filter' API.\n>\n> ### Potential Problem\n> The biggest challenge is to maintain backward compatibility while\n> using reuse ref-filter formatting logic in pretty. One can't just\n> delete some commands, rewrite them and change their interface.\n> Also, bugs could get introduced.\n\nIt would be nice if you could talk about what previous people\nespecially Olga did and what problems they faced.\n\n> ## Availability\n> My exams will end on 30 April. I might travel home after that. So, I\n> can start actively writing code for this project after 3 May. My\n> college resumes on 15 July. I can easily devote 45-50 hours a week\n> until my college reopens and 35-40 hours per week after that. I'm also\n> free on the weekends and I intend to complete most of the work before\n> my college reopens. Other than this project, I have no commitments for\n> this summer. I will also periodically post my status through blogs.\n>\n> ## Post GSoC\n> As I said, I would love to be a member of Git’s community. So, I\n> intend to keep contributing even after the GSoC period ends.\n\nGreat!\n\n> ## Experience with Open Souce (Optional)\n> -> Organized many Git workshops for newcomers with HackSocIndore[7].\n> HackSocIndore is a group of developers that organizes Hackathons,\n> Workshops & Technical Events. I’m the core team member at HackSoc.\n> -> Mentor, Kharagpur Winter of Code (KWoC)[8]\n> Kharagpur Winter of Code is a 5-week long online program for students\n> who are new to Open Source Development.\n\nNice!\n\n> [8]:https://kwoc.kossiitkgp.org\n\nThe above link is failing for me.\n\nThanks,\nChristian.\n"}]}