git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[GSOC] Introduction and microproject selection

From
ZZZejun Zhao <jelly.zhao.42@gmail.com>
Date
Feb 4, 2025, 17:50 UTC
Message-ID
<CAKfgWeZ5GSySF1N2oxoKJLnzeXOjyBh_DbhdFywXiv9L-JaRgA@mail.gmail.com>
Hi everyone,

I'm Zejun Zhao, currently a first-year MSc student in Computer Science. I love the idea of open source and have contributed to several open source projects mostly about OS kernels.

I've been using Git for years and I'm familiar with Git's porcelain commands. I'd like to dive into its internals now and contribute to the project directly, which I believe will help me better understand how Git works and what a well-organized open source community is like.

I have read this year's microprojects list and decided to go to the "Fix Sign Comparison Warnings in Git's Codebase" idea. I'd like to choose `apply.c` as my target of the idea. I followed the instructions and found out that the `-Wsign-compare` warnings there are of basically three types:

  1. comparing a `length` of `size_t` type with a result of pointer
      arithmetic of `int` type
  2. comparing a `length` of `size_t` type with a `length` of `int` type
  3. comparing a loop count `i` of `int` type with an unsigned loop bound

I think there can be three different strategies, one for each of the above three types:

  1. cast the result of pointer arithmetic to `size_t` type
  2. try to change the type of the `length` to `size_t` (may fall back
      to Strategy 1 if the variable is not guaranteed to be unsigned)
  3. use a loop count `i` of `size_t` type

Please let me know if I had anything wrong or there is any other point that I should look into to do better. Any feedback or guidance is appreciated.

Best wishes, Zejun Zhao

Next: Patrick Steinhardt
Message 1 of 2 in “[GSOC] Introduction and microproject selection”
  1. Zejun ZhaoFeb 4, 2025
  2. Patrick SteinhardtFeb 5, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.