GSoC : Week 1
As I talked in my previous blog, I sent two patches to the mailing list:
- environment: move access to “core.sparsecheckout” into repo_settings : This patch removes the global variable
core_apply_sparse_checkout
and shifts the setting to repo_settings under the variablesparse_checkout
. I got reviews for this patch to change the name and make some changes in the getter/setter function for which I sent v2 of the patch. I also got a new review to add range-diff and also to mention and thank the reviewers in the cover-letter. So will send a v3 of the patch for that. - builtin/prune: remove dependency on global variables and ‘the_repository’ : This patch removes dependency on global variables and
the_repository
from “builtin/prune.c”. This patch didn’t get any review yet.
This week, I focused on removing the global variables comment_line_str
, comment_line_str_to_free
and auto_comment_line_char
, aiming to replace them with a functions which uses repo_config_get_string_tmp()
from config.c
.
There was one specific test case which kept on failing: when core.commentchar
is set to auto
and we try to amend a commit message that begins with #foo
. Previously, this relied on the global comment_line_str
. To replace that, I needed a way to pass the computed prefix through various functions. My new function accepts a strbuf
containing the commit message, analyzes it, and returns the appropriate prefix. However, in several call sites, it’s not feasible to pass the strbuf
directly, which leads to incorrect prefix computation. To work around this, I attempted passing the prefix string through the relevant functions instead.
You can see my attempts on my fork. I think I’ll need to spend more time on this problem and will likely pick up another task alongside it.
Also, my laptop’s motherboard died this week. I’m currently using a temporary laptop, but I may need to purchase a new one soon, we’ll see how it goes.
-Ayush:)