GSoC Week 3
Contents
What I Have Done
This week, I focus on handling the reviews from my mentors and Junio. My mentors have put some comments on the PR before I send the patch to the mailing list.
Reviews From Junio
There are many important reviews from Junio. And we have discussed some issues:
- The dangling symref should not be reported by
git-fsck(1)
. There is a common situation where people would use dangling symref to create the pointee ref. Like Junio said:1
2git symbolic-ref refs/heads/maint refs/heads/maint-2.46
git branch maint v2.46.0 - We should change
fsck_files_symref
tofsck_symref_target
. Because we are checking the target not the symref. - The use of
unsigned int *trailing
is not proper which will lose a lot of information for the caller. - The current implementation should check the symbolic link “escape” situation.
- Some error information will cause misleading.
The Problems I Found
However, I have still found some problems in the current implementation:
- When checking symref target, the
referent
buf could be end with'\n'
. If we simply pass thereferent
tocheck_refname_format
function, we will get incorrect behavior. - The current implementation totally ignores the absolute symbolic link situation.
- The current tests lack testing for symbolic links.I wanna make sure that the symbolic link check will work especially in Windows. I am a little worry about the compatibility.
Next Plan
So in order to enhance this patch, I will do the following things:
- Change the defined fsck messages and drop the
danglingSymref
. - Enhance the checks for symbolic link and add the corresponding tests.
Challenges
This week, I spent most of my time addressing reviews. The biggest challenge I encountered was how to reasonably explain my intentions and design ideas when facing others’ reviews. Additionally, understanding the principles and motivations behind the reviews was also challenging. Rather than calling it a challenge, I would say it was a very interesting experience.