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

Re: [GSoC] Hello Git

From
Christian Couder <christian.couder@gmail.com>
Date
May 18, 2021, 14:32 UTC
Message-ID
<CAP8UFD0qQg9vfuDvjrc5amnw8w7NFBLEaJUwEksV08HBdFJ7LA@mail.gmail.com>
In-Reply-To
<CAOLTT8SHE-ok3D+oLNSWFi7KPU==VQnTMDmC4YxUyNBJKmBD8A@mail.gmail.com>
Hi ZheNing,
On Tue, May 18, 2021 at 8:40 AM ZheNing Hu <adlternative@gmail.com> wrote:
Show 11 quoted lines
>
> Hello,Git!
>
> ### Self introduction
>
> I'm ZheNing Hu, I am very lucky to participate in the GSoC
> git project this year. Many people in the git community already
> have given me a lot of help in the past few months.
> Junio, Christian, Peff, Eric, Denton..., it's great to get along with
> you guys! Your review and guidance have greatly benefited
> my growth.

We are very happy with your application to the GSoC with us, and with your work so far!

Show 13 quoted lines
> In these days before GSoC, I learned some simple command
> implementation and data structures of git, learned strict coding
> standards and learned how to test, More importantly, I learned how
> to communicate with these kind-hearted reviewers.
>
> Of course, there are still many difficulties for me:
> * My poor English sometimes can’t express the meaning clearly.
> * The Git architecture is very large, even a small command may
> require very complex logic to implement, I often feel very difficult
> to find clues.
>
> Therefore, during GSoC, I hope to overcome these difficulties and
> learn more in-depth knowledge in git.
Sure!
Show 5 quoted lines
> ### How to complete my GSoC project
>
> I don’t want to be rejected by Git after I have completed a lot of
> content, as Olga once did, Therefore, I think it is best to move in
> the right direction step by step under everyone's supervision.

Sometimes it's very difficult to know in advance what will work well enough to be accepted. And if something doesn't work well enough we can still learn from that, and sometimes use it as a base to implement something better.

Show 9 quoted lines
> Current condition:
> 1. In order to use a unified interface containing both short-named
> and full-named atoms, inspired by the short name option and long name
> option of "OPT_*" in `parse-options.h`,  I thought I should add a new short
> name atom to `struct valid_atom` for expansion in `ref-filter.c`, In [1]:
> Junio thinks that `--format` with two-letters short atoms should not be
> implemented in `ref-filter.c` and provided for the `for-each-ref` family.
> Instead, let the "log" family learn the full-named atom. To ensure the
> consistency of `log --format` and `for-each-ref --format`.
Yeah.
Show 15 quoted lines
> But for now,
> It seems that the parsing of full-named atoms in `pretty.c` is not very elegant.
> E.g.
>
>    if (skip_prefix(placeholder, "(describe", &arg)) {
>    ...
>    }
>
>        if (skip_prefix(placeholder, "(trailers", &arg)) {
>    ...
>    }
>
> We should have an atom table like `valid_atom` in `ref-filter.c`,
> but this is missing in `pretty.c`. So how do we complete the
> unification of the two types of atoms now?

Yeah, unifying pretty.c and ref-filter.c was the purpose of Hariom's GSoC last year, and there is still work to do on this, but you might want to focus on the format code used by git cat-file first, as that's what your project is about.

Show 6 quoted lines
> 2. "50cfe1f([GSOC] ref-filter: introduce enum atom_type)" has
> been merged into the `next` branch, should we focus on the
> performance optimization of `ref-filter.c`? Finally, we can build a
> `format_cat_file_item()` similar to `format_ref_array_item()`,
> which should not be difficult. And we have to make sure that the
> performance of `cat-file --batch` is not lower than before.

I wonder if format_ref_array_item() could not just be used by batch_object_write() like Olga did it in:

https://github.com/git/git/pull/568/commits/f911b342ae6503dc9f6f8e3c7df316aa45d97bdf
Show 7 quoted lines
> ### The connection between Git and the file system
>
> I am currently studying operating system course, git as a
> file system on top of the file system.
> There are many differences and similarities with ordinary
> file systems. I am very curious about this knowledge, do
> not know if there are any relevant reading materials?
You might be interested in https://ostreedev.github.io/ostree/

Best, Christian.

Previous: ZheNing HuNext: ZheNing Hu
Message 2 of 8 in “[GSoC] Hello Git”
  1. ZheNing HuMay 18, 2021
  2. Christian CouderMay 18, 2021
  3. ZheNing HuMay 20, 2021
  4. Christian CouderMay 20, 2021
  5. ZheNing HuMay 20, 2021
  6. Christian CouderMay 20, 2021
  7. Jiang XinMay 19, 2021
  8. ZheNing HuMay 20, 2021

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.