threads / discuss / 56012

[GSoC] My Git Dev Blog — Week 6

Subject: [GSoC] My Git Dev Blog — Week 6

## tl;dr

6 messages between Jun 27, 2021 and Jun 28, 2021.

replies: 5people: 3as markdown or json

Atharva Raykar· Jun 27, 2021, 11:24 UTC · lore

Here's the latest instalment of my weekly Git blog: https://atharvaraykar.me/gitnotes/week6

A peek:
  * Project progress and current strategy.
    (mostly relevant to mentors)
  * Reflections:
    - How does Git even start?
      (https://atharvaraykar.me/gitnotes/week6#how-does-git-even-start)
      This was just something I was curious about, not really important
      to my project. If anyone knows the answer to what I asked in that,
      section, it would be nice to know!

Thanks. --- Atharva Raykar ಅಥರ್ವ ರಾಯ್ಕರ್ अथर्व रायकर

Felipe Contreras· Jun 27, 2021, 17:01 UTC · re: Atharva Raykar · lore

RE: [GSoC] My Git Dev Blog — Week 6

Atharva Raykar wrote:
Show 6 quoted lines
>   * Reflections:
>     - How does Git even start?
>       (https://atharvaraykar.me/gitnotes/week6#how-does-git-even-start)
>       This was just something I was curious about, not really important
>       to my project. If anyone knows the answer to what I asked in that,
>       section, it would be nice to know!
They are not all linked together.

Take for example shell.c, which will be used to generate shell.o, which is used here:

  PROGRAM_OBJS += shell.o
PROGRAM_OBJS is used here:
  PROGRAMS += $(patsubst %.o,git-%$X,$(PROGRAM_OBJS))
This means shell.o will be used to generate a program called git-shell.

But the "git" program will not use PROGRAM_OBJS, therefore it will not link shell.o.

Cheers.
-- 
Felipe Contreras
Atharva Raykar· Jun 28, 2021, 07:35 UTC · re: Felipe Contreras · lore

Re: [GSoC] My Git Dev Blog — Week 6

On 27-Jun-2021, at 22:31, Felipe Contreras <felipe.contreras@gmail.com> wrote:
Show 25 quoted lines
> 
> Atharva Raykar wrote:
> 
>>  * Reflections:
>>    - How does Git even start?
>>      (https://atharvaraykar.me/gitnotes/week6#how-does-git-even-start)
>>      This was just something I was curious about, not really important
>>      to my project. If anyone knows the answer to what I asked in that,
>>      section, it would be nice to know!
> 
> They are not all linked together.
> 
> Take for example shell.c, which will be used to generate shell.o, which
> is used here:
> 
>  PROGRAM_OBJS += shell.o
> 
> PROGRAM_OBJS is used here:
> 
>  PROGRAMS += $(patsubst %.o,git-%$X,$(PROGRAM_OBJS))
> 
> This means shell.o will be used to generate a program called git-shell.
> 
> But the "git" program will not use PROGRAM_OBJS, therefore it will not
> link shell.o.

Thanks, that explained a lot of things for me, and I noticed 'git.c:cmd_main()' does indeed call these separately created executables (like git-shell).

I'll try to update my blog post with this explanation when I get some free time for it.

Christian Couder· Jun 27, 2021, 22:07 UTC · re: Atharva Raykar · lore

Re: [GSoC] My Git Dev Blog — Week 6

On Sun, Jun 27, 2021 at 1:24 PM Atharva Raykar <raykar.ath@gmail.com> wrote:
>
> Here's the latest instalment of my weekly Git blog:
s/instalment/installment/
> https://atharvaraykar.me/gitnotes/week6
Great, thanks!
Small nit: s/has not not yet/has not yet/

About "This kind of an invocation was done before in the context of submodules, but it does not look reusable to me because it seems to have side effects, that meddle with the repository’s object store." couldn't a commit walk do the job (see Documentation/MyFirstObjectWalk.txt)?

Atharva Raykar· Jun 28, 2021, 07:48 UTC · re: Christian Couder · lore

Re: [GSoC] My Git Dev Blog — Week 6

On 28-Jun-2021, at 03:37, Christian Couder <christian.couder@gmail.com> wrote:
Show 6 quoted lines
> 
> On Sun, Jun 27, 2021 at 1:24 PM Atharva Raykar <raykar.ath@gmail.com> wrote:
>> 
>> Here's the latest instalment of my weekly Git blog:
> 
> s/instalment/installment/

Instalment is the commonwealth spelling: https://wikidiff.com/instalment/installment

Show 5 quoted lines
>> https://atharvaraykar.me/gitnotes/week6
> 
> Great, thanks!
> 
> Small nit: s/has not not yet/has not yet/
Thanks, I'll update it.
Show 5 quoted lines
> About "This kind of an invocation was done before in the context of
> submodules, but it does not look reusable to me because it seems to
> have side effects, that meddle with the repository’s object store."
> couldn't a commit walk do the job (see
> Documentation/MyFirstObjectWalk.txt)?

I did have a look at it (not very thorough, though), and I immediately felt that it was too low-level to be a drop-in replacement for 'is_tip_reachable'. I'll have a more thorough look at it though, and see if I can make that work out nicely.

Atharva Raykar· Jun 28, 2021, 17:01 UTC · lore

Re: [GSoC] My Git Dev Blog — Week 6

On 28-Jun-2021, at 22:03, Shourya Shukla <periperidip@gmail.com> wrote:
Show 21 quoted lines
> 
>> Le dim. 27 juin 2021 à 16:54, Atharva Raykar <raykar.ath@gmail.com> a écrit :
>> Here's the latest instalment of my weekly Git blog:
>> https://atharvaraykar.me/gitnotes/week6
>> 
>> A peek:
>> 
>>   * Project progress and current strategy.
>>     (mostly relevant to mentors)
>> 
>>   * Reflections:
>>     - How does Git even start?
>>       (https://atharvaraykar.me/gitnotes/week6#how-does-git-even-start)
>>       This was just something I was curious about, not really important
>>       to my project. If anyone knows the answer to what I asked in that,
>>       section, it would be nice to know!
> 
> This was a nice read! I always used to wonder how exactly Git starts.
> One thing you can do is that link the file/line you talk about. Takes 5-10
> minutes extra but is totally worth it in my opinion especially from the
> reader's standpoint.
Yeah, makes sense. I'll add the links.
> Do keep in mind that if you choose to link a file/line, link it from a
> specific tag (in this case a Git version) instead of the usual 'master'
> link. There is a reason for this which I leave it to you to find out ;)
> If you are not able to figure it out, feel free to PM us or ask on the list.

Right, that makes sense now that you mention it. I did not consider the fact I have been linking a moving target the whole time.

Heh, I gotta fix all those other blog links now.
> Do give Makefiles a read in case you are not well-versed on them. It
> might make the 'Git startup' process a bit easier to understand.

Yeah, I did try reading the makefiles at first, but I found it easy to get lost when I didn't know what to look for at first. I did eventually understand how the startup works now :)

Reading that Makefile in the past helped me with other undocumented (to my knowledge) things as well, like support for compile-time instrumentation with LLVM's ASAN (I plan to write a short blog post about that outside of my weekly reports someday).

← back to recent threads