All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Lemuria <nekadek457@gmail.com>
To: "João Victor Bonfim"
	<JoaoVictorBonfim+Git-Mail-List@protonmail.com>,
	"Philip Oakley" <philipoakley@iee.email>
Cc: git@vger.kernel.org
Subject: Re: Git internal command line parser
Date: Sat, 25 Dec 2021 16:32:05 +0800	[thread overview]
Message-ID: <65fdfd25-736f-5105-6eba-b70cd51cc780@gmail.com> (raw)
In-Reply-To: <bZ5IKn77iTM5gCits_kl5lZ7uiOOkkt8dcHPT1UVlPWsrnqapXBtAkYB4uGGBA3Oizq4J7BN4GC6mLR8wQ7x_qqLJPbae6IMTqxW9JFJSbg=@protonmail.com>



On 25/12/2021 10:55 am, João Victor Bonfim wrote:
>> If you are on Windows, it gets even more interesting because all the
>> individual sub-commands are just hard links back to the single git.exe
>> that then links to those sub-command's code.
> 
> That seems undesirable...
> I know operating otherwise would be even more complicated and might create undue complexity or diminish performance, but I guess that, if it works, don't mess with it.
> 

Was this directed towards Lemuria (me)?

>> And I likely will consider this "front-end to many separate
> executable apps" approach for my future large projects.
> 
> Lemuria, please consider those points as, sometimes, what is great at performance might not help with scalability and other matters, therefore, as the designer/engineer of a software system, a choice must be made and an evaluation of the properties of each possibility is a necessity.
> 
> Do with that what you will.
> 
>> I'm also a beginner to C, not quite an expert at it.
> 
> Practice programming a lot and never forget two things: [1] you are working with a man made machine, therefore its limitations and capabilities are by design, so you must consider them every step of the way when developing (like how computers send information, how computers process informations, how machine behaviour can be altered, abused or exploited through alteration of the environment or mechanism and through the use of sleight of hand). [2] Your code always has real life consequences and it is your moral responsibility to consider them and make sure that prejudice isn't codified into them.

Okay, I understand. I'll do everything to keep my code bias-free.
I'm working on a project in C and if it's okay, I'll link you to
the GitHub repository.

I'm sure the git mailing list isn't the right place for me to get
criticism on that project however.

> Those are my two tid bits about being a responsible and effective programmer.
> 
> ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
> 
> Em sexta-feira, 24 de dezembro de 2021 às 15:36, Philip Oakley <philipoakley@iee.email> escreveu:
> 
>> On 24/12/2021 18:30, Lemuria wrote:
>>
>>> On 25/12/2021 2:13 am, Philip Oakley wrote:
>>>
>>>> On 24/12/2021 14:38, Lemuria wrote:
>>>>
>>>>> #=< TLDR: Where's the code for git's internal command line parser?
>>>>>
>>>>>> ===#
>>>>>
>>>>> I'm interested in the internals of git, more specifically it's command
>>>>>
>>>>> line parser.
>>>>
>>>> One place to start is https://github.com/git/git/blob/master/git.c
>>>
>>> Wait, is all of Git just one big executable or are there many
>>>
>>> executables and `git` is just the front-end for accessing the
>>>
>>> separate git executables, such as say, the one for processing
>>>
>>> commits?
>>
>> Yes, `git` is a front end.
>>
>> If you are on Windows, it gets even more interesting because all the
>>
>> individual sub-commands are just hard links back to the single git.exe
>>
>> that then links to those sub-command's code.
>>
>>>>> Does Git use a library like getopt for it's command line handling, or
>>>>>
>>>>> does it use a custom parser?
>>>>>
>>>>> If possible, I would appreciate being redirected to the source code
>>>>>
>>>>> files that handle this.
>>>>>
>>>>> Sincerely,
>>>>>
>>>>> Lemuria
>>>>
>>>> Philip

  reply	other threads:[~2021-12-25  8:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-24 14:38 Git internal command line parser Lemuria
2021-12-24 18:13 ` Philip Oakley
2021-12-24 18:30   ` Lemuria
2021-12-24 18:36     ` Philip Oakley
2021-12-24 19:05       ` Lemuria
2021-12-25  2:55       ` João Victor Bonfim
2021-12-25  8:32         ` Lemuria [this message]
2021-12-26  2:38           ` João Victor Bonfim
2021-12-26  3:40             ` Lemuria
2021-12-27 16:43         ` Philip Oakley
2021-12-29 23:16           ` João Victor Bonfim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=65fdfd25-736f-5105-6eba-b70cd51cc780@gmail.com \
    --to=nekadek457@gmail.com \
    --cc=JoaoVictorBonfim+Git-Mail-List@protonmail.com \
    --cc=git@vger.kernel.org \
    --cc=philipoakley@iee.email \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.