Posts

GSoC Week 8

A busy week This was quite a busy week since I had to make sure the build is perfect as well as give ample time to my research since I need to meet some deadlines. I have been working to make sure the build is a success. In the later parts of the week I have been debugging the the functionality of the --for-status option because of the failure of test 6 of t7418-submodule-sparse-gitmodules.sh . Also, to my delight, my set-branch port is finally merged into master of git/git ! What is the test about? The test t7418 mainly involves finding summaries of submodules in case the .gitmodules is missing. Such a scenario may be created because of sparse checking-out a repository and doing it in such a way that the .gitmodules is not listed in the sparse checkout’s cone. I learned about sparse checkout from this article by one of the GSoC mentors and contributor Derrick Stolee. I will not dive much into sparse checkout since it is out of scope of this article, but ...

GSoC Week 7

Taking decisions This week was an even more deeper dive into git submodule 's code. I am almost done with the module_summary frontend function. My set-branch port will move to next on git/git hopefully! I learned even more about shell scripting and the shell code of summary . This time, I will present my thoughts here on what I have learned. There may seem to be a bit less information here because of the relatively early write-up of the blog because I finally leave for my home this Friday! <3 Anyway, moving on to the important stuff Current Progress As of now, the module_summary() (the frontend function for the summary subcommand) is almost done with. I have successfully ported it from shell taking some inspiration from Prathamesh’s patch as well. Prathamesh’s patch had 6 functions namely module_summary() , compute_summary_module_list() , submodule_summary_callback() , prepare_submodule_summary() , print_submodule_summary() and finally verify_subm...

GSoC Week 6

A hot and humid week This week I have been trying to get deeper into the subcommand summary and its nuances. I aim to start coding the rest of the functions in the coming days. I am complete with the most of the front end module_summary() function, Of course, more edits may follow later but I want to focus on a bare working version as of now. Current Progress In this week I had been studying about Parameter Substitution and Parameter Expansion and the code of git submodule summary . I will talk about what I have learnt from these two concepts in this blog and where are they being used as well as about the commit verification part of summary which gives us a starting point to proceed from. I gave a teaser of Parameter Substitution in my Week 2 blog. Parameter Substitution Parameter Substitution in Shell scripting helps us to substitute the value of a parameter/variable with another value in minimal number of steps. The equivalent of this in C would be a cond...

GSoC Week 4 [One month special]

 One month complete! A month has passed now since GSoC started (it will on June 4) and it is a fine milestone I think! I feel happy about it. This week was more about studying things and what is under the hood rather than programming something like it has been always. I was stuck with the callback mechanism of the submodule code. I could not understand the purpose behind it and thought that it was not needed. But as always, the things which confuse me are the ones with very simple and crystal clear logic behind them (but again, not to fret, we learn to walk by falling over and over right?); I will cover the callback mechanism in the blog so that anyone who ever wants to work on submodules or a future student like me has some reference to what is going on. What are callbacks? Callbacks are defined in regard to a function or a segment of a program you call when encountered with a particular trigger (such as an if statement or end of function). And by “you call”, I ...

GSoC Week 3

 A great week! Finally a good week happened! The lockdown in my college vicinity got lifted and hence there is a different feeling of joy! Freedom has much more importance now! set-branch is almost done with (v4 in review) hence I have finished the conversion of 2/4 subcommands. Feels great! Though as per my proposal I should be working on improving CLI parsing, but my instinct is to go for the conversion of summary . Let’s see how that goes. There’s a lot of stuff on my plate right now (my research work, GSoC and self-studies), but who wants to give up huh? It feels nice to be so occupied I don’t know why! Now coming back to GSoC, this week was more of a “touch-up” phase for set-branch (more on that below). The touch-ups The command was in a working state in its v1 though it had major redundancies in it (something which I had to get fixed after advise from the experienced ones of Git). After fixing up a couple of things, and converting the branch option fro...

GSoC Week 2

 A slow week This week felt quite slow. I just got off with the conversion of ‘set-branch’ and figured out what problems were there with the collective effort of my mentors and mine (more on that in the following sections). The ‘set-url’ conversion and my contributions to gitFAQ just reached the master branch of git/git, feels nice <3. What I have inferred till now, is that communication is KEY . If anyone, even if you are a (to-be) GSoC student or a junior/friend of mine reading this, one thing you should never forget is communicating about the problems you are facing with someone senior and more experienced than you. What you are facing right now, there’s a really high chance that they might’ve faced something similar (if not identical) before. The above paragraph kinda sums up how I finished the conversion of set-branch . So going into detail: What had happened? If you read the previous blog, you may have noticed what problem I had faced back then. Quoti...

GSoC Week 1

 A warm entrance It has been a good week. The Google Summer of Code '20 results were announced and I along with two fellow countrymen Hariom and Abhishek made it. Congratulations to all! ;) I had intended to start my project before the results were announced irrespective of my selection, and so far things seem good! I am done with the porting of set-url from shell to C and it is in its final stages of review by Christian, Junio and Denton (at the time of writing the blog it has entered the pu branch of git/git). In the premier week I have been: Working on gitfaq . As the name suggests, it consists of various commonly asked questions about the Git suite. 2 out of 4 commits have been queued and now my goal lies in working out the rest 2 commits so that they are queued as well. Working on set-branch subcommand of git submodule . Let’s explore (2) a bit more: What is set-branch ? Quoting from the official Documentation : Sets the default remote ...