Hi there. First of all, I'd like to thank all of the support up to now with my microproject :). Here's a first draft of my proposal for Google Summer of Code '17, based on the "Convert scripts to builtins" idea. Please let me know what you think.
--- SYNOPSIS There are many advantages to converting parts of git that are still scripts to C builtins, among which execution speed, improved compatibility and code deduplication. This proposal aims to apply this to git-add--interactive, one of the most useful features of Git. FEASIBILITY Many git scripts have attracted attention for being turned into builtins. There is ongoing work on git-stash (https://public-inbox.org/git/20170321053135.thk77soxc4irx...@sigill.intra.peff.net/), and porting interactive rebase is one of the ideas for this edition of GSoC. Not as much attention, however, has been directed to git-add--interactive. There was only one discussion regarding the feasibility of its porting (https://public-inbox.org/git/CAP8UFD2PcBsU6=FK4OHVrB7E98ycohS_0pYcbCBar=of1hl...@mail.gmail.com/). It resulted in a consensus that doing it would be a task too large – although interesting – for GSoC 2015 based on the amount of its lines of code. It is, however, only a few lines larger than git-rebase--interactive, which has been considered an appropriate idea. As such, it looks like a possible project for three months of full-time work. Aside from the benefits cited above, turning git-add--interactive into a builtin can reduce Git's dependency on Perl to the point where no "common" command would continue to rely on it. PROJECTED TIMELINE - Prior to May 4 -- Refine my basic knowledge of Perl -- Craft one or two small patches to some of Git's Perl components (preferentially to git-add--interactive itself) to improve my understanding of the language and of how Git's Perl scripts actually work - May 4 - May 30 -- Clarify implementation details with my mentor, and work on a more detailed roadmap for the project -- Investigate roughly how to replace command invocations from the script with actual builtin functions; which Git APIs in Perl already have functional equivalents in C; which parts will require a full rewrite. - May 30 - June 30 (start of coding period) -- Define the architecture of the builtin within git (which functions/interfaces will it have? where will its code reside?). -- Implement a small subset of the builtin (to be defined with my mentor) and glue it into the existing Perl script. Present this as a first patch to get feedback early regarding the implementation and avoid piling up mistakes early. -- Do necessary changes based on this initial review. -- Have roughly 1/3 of the script's functionality ported to C. - June 30 - July 28 -- Port the remainder of the script to a builtin. -- Have a weekly roadmap, sending a part of the patch every 15 days to the mailing list for review and to avoid massive commits by the end of GSoC. -- Apply suggestions from community reviews when possible; if not, save them for doing toward the end of GSoC (see below). (Note: due to a previous commitment, during a five-day period of July I will only be able to work part-time on GSoC. The actual week will be known over the next weeks.) - July 28 - August 29 -- By the start of this period, send a patch with the builtin fully implemented to the mailing list. -- Fix bugs, test extensively, possibly extend test coverage for git-add--interactive. -- Respond to the (predictably big) community feedback regarding the change. I currently work full-time in a payments company (see below), but in case of being accepted I am willing to quit my job some months early to dedicate myself fully to GSoC starting June. BIOGRAPHICAL INFORMATION My name is Daniel Ferreira and I'm a student from São Paulo, Brazil. I was accepted by Stanford University last year and I will start college this fall. I started coding C about six years ago writing up system modifications ("tweaks") for jailbroken iPhones. Since then, I have written/contributed to a couple of open-source projects like an IRC bot and other assorted things – all of them tracked on Git (https://github.com/theiostream). I have also developed a (closed-source) library in C for interacting with payment terminals in the company I have worked for over the last two years (Pagar.me). There, we use Git extensively for managing projects with around 20 people working concurrently. MICROPROJECT I have sent a series of patches to complete the microproject of converting recursive calls to readdir() into calls to dir_iterator. The most recent version can be found in https://public-inbox.org/git/1490465551-71056-2-git-send-email-bnm...@gmail.com/T/#u. Thanks, -- Daniel.