Posts

Showing posts from August, 2020

The Final Report

The Final Report This blog will describe my GSoC project along with a small account of how I started contributing to Git. My GSoC '20 project was to convert 'submodule' to a builtin by porting it from shell to C. Initially, Git commands were written in shell with some instances of Perl as well. As times progressed, various platforms to run Git emerged & projects became large (spanning millions of lines of code), enter, problems in production level code, such as: Difficulties in portability of code. The submodule shell script uses commands such as echo, grep, cd, test and printf to name a few. When switching to non-POSIX compliant systems, one will have to use emulation layers to implement such commands on the system. Which is a lot of extra work. There is large overhead involved in calling the command . As these commands implemented in shell script are not buitlins, they tend to call multiple fork() and exec() syscalls for creating more child p...

GSoC Week 16

One last time The final evaluations start on August 24 , i.e. , in 2 days. GSoC was a fantastic rollercoaster ride. I learned so much about Git, C, shell scripting, Linux and programming in general. It was the best learning experience I have had to date. There were many highs and lows throughout this whole journey and gladly my mentors, Christian Couder and Kaartic Sivaraam helped me get through it all. This is the final edition of my GSoC blog series since for next week I have to write a blog to summarise, my GSoC project and the experience. Therefore, for one last time, I will give an account of the work I have done in the past week. This week went fine in terms of GSoC. The summary patch series will graduate to master as stated in the “What’s cooking” mail dated August 22 (IST). The t7401 patch series also looks good, and its v3 will also get into the pipeline (currently in seen ). I am happy that I have been able to contribute a significant amount to Git d...

GSoC Week 15

Feedback on the patches Finally, I submitted the patches about ten days back (yes, I missed the previous blog because I kind of forgot about it). The patches got fine feedback and required some changes to be good to go. On t7401: modernise cleanup and warn The patch was well received though needed some changes in the commit (t7401: modernise style, 2020-07-23) . It was better to redirect the output of the rev-parse to a file and then cut the output using cut -c1-7 instead of using the pipe | operator. Also, Taylor Blau and Junio C Hamano suggested I drop the commit (t7401: ensure uniformity in the '--for-status' test, 2020-07-10) since the change it made could be combined with the commit (t7401: change test_i18ncmp syntax for clarity, 2020-07-10) . I also introduced a commit (t7401: change indentation for enhanced readability, 2020-08-11) which improves the indentation of the tests in the script for enhanced readability*. Also, the commit (t7401: add ...

GSoC Week 13

Passed the Second Eval! The results for the second evaluation arrived on the dawn of August 1, and I passed. It felt great to get positive feedback from Christian and Kaartic regarding my performance. Also, I think no one saw my patch regarding t7401, so I will send it once again on the list most probably. Finally, we are done with the v2 of git submodule summary . It was a big rollercoaster, so many bugs and new use cases coming along the way. The one last problem which came in the way may appear to some as very trivial but explains another difference between the shell and the C version. The Problem The problem was that when the shell version of summary was run outside of the test suite, it resulted in two newlines being printed at the end of the output (though it printed only one newline when run inside the tests) whereas the C version printed just one newline irrespective of where it was run. The explanation for inconsistency between the test and non-test ou...