Today marks the begining of the fifth week of my Outreachy internship at Git. It has been a lot of learning, code writing, code reviews, docs writing and meetings. I really enjoyed every bits of it and it is fun contributing to one of the most used softwares by all developers in the world.
If you have been following me, you would know my internship is about adding os-version
capability to the Git v2 protocol. The capability would allow information such as operating system name to be shared between the Git Client (git in your local system) and the Git Server (e.g., GitHub or GitLab). This allows for statistical analysis, security and debugging purposes, which makes it beneficial. You can read more about it in my previous blogs.
The update so far is that, I have implemented two out of the three main features in my projects. Firstly, by default, the os-version
capability allowed just the sharing of the operating system(OS) name between the Git client and server. Due to privacy concern issue as some people might not be comfortable with sharing this information, I implemented a transfer.advertiseOSVersion
config options which makes it possible for people to disable completely this capability. By default, it is set to true
and can be used to disable os-version
capability. You can read it more about it here.
I also implemented osVersion.command
config option. The output of the command specified by this config option will be the one shared instead of the OS name. It is important to note that if transfer.advertiseOSVersion
is set to false
, the os-version
will be disabled and nothing will be shared even if osVersion.command
is set. I also talked about explaining the technical details of how it works.
The technical details is actually not that complex. There is a function called git_config_get_string_tmp
in Git codebase. It basically used to get the string specified by a config option. Another important function is capture_command
function which is used to run a command in Git. So, the implementation involved me using the git_config_get_string_tmp
to get the string/command specialized by osVersion.command
config and then used the capture_command
to execute the command. If there is no string specified or there is any error when executing the command, the default OS name is shared.
So, I have implemented all the above feature and got reviewed multiple times by my mentor. Today, I sent all these implementation to the Git mailing list in form of patch series. Basically, every opensource projects have a process involves in reviewing a code changes and getting it merged. Some projects used github pr, some use phabricator, gerrit and others. Git community used a mailing list a traditional approach used by Linux OS community where you send your code/patches to a mailing list and the review happens there. There is always a public url where you can access all the patches and discussions happening in such mailing list, you can access for Git here. You can view and follow my patch review through this link.
Next Steps
Next week, my main focus will be on reiterating and improving all the patches I sent to the Git mailing list based on the feedback I will be getting from the Git community. In fact, this is one of the most important component in any opensource projects, feedback and improvement based on the feedback.
PS: Attached picture is from the Git Rev News and you can find it git.github.io/rev_news/2024/12/31/edition-118
Thank you.