# Git Option/Subcommand Processing Library?

5 messages from 2009-07-25 to 2009-07-26. Participants: Michael Bergin, Johannes Schindelin.
Thread: https://gitlist.dev/t/20228

## Michael Bergin, 2009-07-25 16:28

Subject: Git Option/Subcommand Processing Library?
Message-ID: <231BD892-07B1-452C-A224-047829E21991@gmail.com>
URL: https://gitlist.dev/e/231BD892-07B1-452C-A224-047829E21991%40gmail.com

```
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, 2009-07-25 16:32

Subject: Re: Git Option/Subcommand Processing Library?
Message-ID: <alpine.DEB.1.00.0907251830420.8306@pacific.mpi-cbg.de>
URL: https://gitlist.dev/e/alpine.DEB.1.00.0907251830420.8306%40pacific.mpi-cbg.de
In-Reply-To: <231BD892-07B1-452C-A224-047829E21991@gmail.com>

```
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, 2009-07-25 19:51

Subject: Re: Git Option/Subcommand Processing Library?
Message-ID: <D30CE3A7-176D-4132-88A6-23C46A4EA185@gmail.com>
URL: https://gitlist.dev/e/D30CE3A7-176D-4132-88A6-23C46A4EA185%40gmail.com
In-Reply-To: <alpine.DEB.1.00.0907251830420.8306@pacific.mpi-cbg.de>

```
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:

> 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, 2009-07-25 23:18

Subject: Re: Git Option/Subcommand Processing Library?
Message-ID: <alpine.DEB.1.00.0907260117540.8306@pacific.mpi-cbg.de>
URL: https://gitlist.dev/e/alpine.DEB.1.00.0907260117540.8306%40pacific.mpi-cbg.de
In-Reply-To: <D30CE3A7-176D-4132-88A6-23C46A4EA185@gmail.com>

```
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

```

## Michael Bergin, 2009-07-26 00:38

Subject: Re: Git Option/Subcommand Processing Library?
Message-ID: <D48B952D-501B-4B90-A2B7-00DF5F21D3A4@gmail.com>
URL: https://gitlist.dev/e/D48B952D-501B-4B90-A2B7-00DF5F21D3A4%40gmail.com
In-Reply-To: <alpine.DEB.1.00.0907260117540.8306@pacific.mpi-cbg.de>

```
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:

> 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

```
