On Thu, Jan 13, 2022 at 08:54:34AM -0800, Jaydeep Das wrote:
> I want to contribute to git but I have some doubts regarding their codebase.
>
>
> 1. My ccls linter is picking a lot of syntax errors on the
> codebase(there are no errors/warnings on compilation though). Is the
> codebase based on C99? Because most the errors end in `invalid in C99`
It's not C99 (I think, mainly for the reasons Git works on quite oddball
systems). You should tweak your linter.
Still, I admit I'm puzzled by what you say: even though I'm not a C standards
lawyer I have hard time beleiving the C language standards can be _so_
backwards-incompatible.
For instance, let's look at what GCC 10.2.1 run with --std=c99 thinks about
K&R-style function declarations (of which many of the C freshmen did not know
they have even existed); the code
--------------------------------8<--------------------------------
#include <stdio.h>
int foo(a, b)
int a;
int b;
{
return a + b;
}
int main()
{
int x;
x = foo(42, 12);
printf("%d\n", x);
return 0;
}
--------------------------------8<--------------------------------
compiles just OK with
$ gcc --std=c99 -Wall -Wpedantic -c kr.c
> 2. Since I am just a beginner, I want to start with something simple.
> Currently the error messages in git for some commands are not that
> verbose.
> I want to improve the error messages. Where should I start?
The best way to start is to post a message to the developers' mailing list
with your suggestons for the changes and wait for the feedback.
That is better than merely posting a patch because the change might be
completely or partially unwelcome, and you'd better have the "go ahead"
from the devs before embarking: Git is a complex piece of software, and
drive-by contributions are hardly possible.
Be sure to read [1] for the details on where and how to post.
1.
https://gist.github.com/tfnico/4441562#writing-an-email-to-the-developers-list
--
You received this message because you are subscribed to the Google Groups "Git
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/git-users/20220114161633.yevo5o6g7cm4oebx%40carbon.