threads / discuss / 20228

Git Option/Subcommand Processing Library?

Subject: Git Option/Subcommand Processing Library?

## tl;dr

5 messages between Jul 25, 2009 and Jul 26, 2009.

replies: 4people: 2as markdown or json

Michael Bergin· Jul 25, 2009, 16:28 UTC · lore

Is there a library containing just the option and subcommand processing code from git? I saw a post about gitopt but can't find a project with that name. If not is there any problem with me doing this? Thanks.

- Mike Bergin
Johannes Schindelin· Jul 25, 2009, 16:32 UTC · re: Michael Bergin · lore

Re: Git Option/Subcommand Processing Library?

Hi,
On Sat, 25 Jul 2009, Michael Bergin wrote:
> Is there a library containing just the option and subcommand processing 
> code from git?  I saw a post about gitopt but can't find a project with 
> that name.

The "library" is contained in the files parse-options.[ch] in git.git. I am unsure if you need strbuf.c, too, or not.

> If not is there any problem with me doing this?
Not if you abide by the license of git.git, which is GPLv2.

Ciao, Dscho

Michael Bergin· Jul 25, 2009, 19:51 UTC · re: Johannes Schindelin · lore

Re: Git Option/Subcommand Processing Library?

Thanks for the pointers. I also want to create a generic library for command facades like git. For that I will probably use git.c as a guide but to make it generic I would need to add/rearrange code. GPLv2 works fine for my purposes. I hope this isn't an offensive question or anything but would releasing just the library under LGPL be considered?

On Jul 25, 2009, at 12:32 PM, Johannes Schindelin wrote:
Show 22 quoted lines
> Hi,
>
> On Sat, 25 Jul 2009, Michael Bergin wrote:
>
>> Is there a library containing just the option and subcommand  
>> processing
>> code from git?  I saw a post about gitopt but can't find a project  
>> with
>> that name.
>
> The "library" is contained in the files parse-options.[ch] in  
> git.git.  I
> am unsure if you need strbuf.c, too, or not.
>
>> If not is there any problem with me doing this?
>
> Not if you abide by the license of git.git, which is GPLv2.
>
> Ciao,
> Dscho
>
>
Johannes Schindelin· Jul 25, 2009, 23:18 UTC · re: Michael Bergin · lore

Re: Git Option/Subcommand Processing Library?

Hi,
On Sat, 25 Jul 2009, Michael Bergin wrote:
Show 5 quoted lines
> Thanks for the pointers.  I also want to create a generic library for 
> command facades like git.  For that I will probably use git.c as a guide 
> but to make it generic I would need to add/rearrange code.  GPLv2 works 
> fine for my purposes.  I hope this isn't an offensive question or 
> anything but would releasing just the library under LGPL be considered?

You need to ask all authors of all the code you reuse. I, for one, have no objections.

Ciao, Dscho

Michael Bergin· Jul 26, 2009, 00:38 UTC · re: Johannes Schindelin · lore

Re: Git Option/Subcommand Processing Library?

I really appreciate your help. I'm going to do this regardless of license so I'll ask about that when I have a finished project. Let me know if you have any suggestions for features, etc. Thanks again.

- Mike Bergin
On Jul 25, 2009, at 7:18 PM, Johannes Schindelin wrote:
Show 19 quoted lines
> Hi,
>
> On Sat, 25 Jul 2009, Michael Bergin wrote:
>
>> Thanks for the pointers.  I also want to create a generic library for
>> command facades like git.  For that I will probably use git.c as a  
>> guide
>> but to make it generic I would need to add/rearrange code.  GPLv2  
>> works
>> fine for my purposes.  I hope this isn't an offensive question or
>> anything but would releasing just the library under LGPL be  
>> considered?
>
> You need to ask all authors of all the code you reuse.  I, for one,  
> have
> no objections.
>
> Ciao,
> Dscho

← back to recent threads