librelist archives

« back to archive

[libgit2] Repository Init started

[libgit2] Repository Init started

From:
Emeric Fermas
Date:
2010-12-15 @ 15:25
Hello,

I've started working on this feature
(https://www.pivotaltracker.com/story/show/6447259).

I'll try to push a first draft implementation before Monday.

Cheers,

Em.

Re: [libgit2] Repository Init started

From:
Emeric Fermas
Date:
2010-12-15 @ 16:41
Hello,

Here's a current _unfinished_ proposal to open the discussion and
gather early feedback: https://gist.github.com/742217

Cheers,
Em.



On Wed, Dec 15, 2010 at 4:25 PM, Emeric Fermas <emeric.fermas@gmail.com> wrote:
> Hello,
>
> I've started working on this feature
> (https://www.pivotaltracker.com/story/show/6447259).
>
> I'll try to push a first draft implementation before Monday.
>
> Cheers,
>
> Em.
>

Re: [libgit2] Repository Init started

From:
Vicent Marti
Date:
2010-12-15 @ 16:47
Hey Emeric,

thanks, this is neat, but I don't really see the need of a new
`git_repository_init_results` structure. The interface should be as
follows:

int git_repository_init(git_repository ** repo_out, const char* path,
unsigned is_bare);

There is no point on having an extra layer of indirection: just create
a new repository object on top of the repository you've just
initialized. If the user doesn't want to use it, he can free it
immediately. The only difference between allocating a new
git_repository and a new git_repository_init_results is an extra hash
table -- but that's negligible.

Cheers,
Vicent Marti



On Wed, Dec 15, 2010 at 6:41 PM, Emeric Fermas <emeric.fermas@gmail.com> wrote:
> Hello,
>
> Here's a current _unfinished_ proposal to open the discussion and
> gather early feedback: https://gist.github.com/742217
>
> Cheers,
> Em.
>
>
>
> On Wed, Dec 15, 2010 at 4:25 PM, Emeric Fermas <emeric.fermas@gmail.com> wrote:
>> Hello,
>>
>> I've started working on this feature
>> (https://www.pivotaltracker.com/story/show/6447259).
>>
>> I'll try to push a first draft implementation before Monday.
>>
>> Cheers,
>>
>> Em.
>>
>

Re: [libgit2] Repository Init started

From:
Emeric Fermas
Date:
2010-12-15 @ 17:01
Hello Vincent,

Thanks a lot for your feedback!

>If the user doesn't want to use it, he can free it immediately.
You're right, I'll change the interface and will keep the list updated
about my progress.


Cheers,
Em.



On Wed, Dec 15, 2010 at 5:47 PM, Vicent Marti <tanoku@gmail.com> wrote:
> Hey Emeric,
>
> thanks, this is neat, but I don't really see the need of a new
> `git_repository_init_results` structure. The interface should be as
> follows:
>
> int git_repository_init(git_repository ** repo_out, const char* path,
> unsigned is_bare);
>
> There is no point on having an extra layer of indirection: just create
> a new repository object on top of the repository you've just
> initialized. If the user doesn't want to use it, he can free it
> immediately. The only difference between allocating a new
> git_repository and a new git_repository_init_results is an extra hash
> table -- but that's negligible.
>
> Cheers,
> Vicent Marti
>
>
>
> On Wed, Dec 15, 2010 at 6:41 PM, Emeric Fermas <emeric.fermas@gmail.com> wrote:
>> Hello,
>>
>> Here's a current _unfinished_ proposal to open the discussion and
>> gather early feedback: https://gist.github.com/742217
>>
>> Cheers,
>> Em.
>>
>>
>>
>> On Wed, Dec 15, 2010 at 4:25 PM, Emeric Fermas <emeric.fermas@gmail.com> wrote:
>>> Hello,
>>>
>>> I've started working on this feature
>>> (https://www.pivotaltracker.com/story/show/6447259).
>>>
>>> I'll try to push a first draft implementation before Monday.
>>>
>>> Cheers,
>>>
>>> Em.
>>>
>>
>

Re: [libgit2] Repository Init started

From:
Emeric Fermas
Date:
2010-12-17 @ 19:21
Hello,

Sent a pull request with a basic repository.init() implementation:
https://github.com/libgit2/libgit2/pull/29

Limits:

* Reinit of an existing directory is not implemented yet. Will blindly
return GIT_SUCCESS.
* The parent directory structure of the repository has to already
exist. Recursive building of the parent tree structure is not
implemented yet.
* Config file creation handling is not implemented yet.


Em.



On Wed, Dec 15, 2010 at 6:01 PM, Emeric Fermas <emeric.fermas@gmail.com> wrote:
> Hello Vincent,
>
> Thanks a lot for your feedback!
>
>>If the user doesn't want to use it, he can free it immediately.
> You're right, I'll change the interface and will keep the list updated
> about my progress.
>
>
> Cheers,
> Em.
>
>
>
> On Wed, Dec 15, 2010 at 5:47 PM, Vicent Marti <tanoku@gmail.com> wrote:
>> Hey Emeric,
>>
>> thanks, this is neat, but I don't really see the need of a new
>> `git_repository_init_results` structure. The interface should be as
>> follows:
>>
>> int git_repository_init(git_repository ** repo_out, const char* path,
>> unsigned is_bare);
>>
>> There is no point on having an extra layer of indirection: just create
>> a new repository object on top of the repository you've just
>> initialized. If the user doesn't want to use it, he can free it
>> immediately. The only difference between allocating a new
>> git_repository and a new git_repository_init_results is an extra hash
>> table -- but that's negligible.
>>
>> Cheers,
>> Vicent Marti
>>
>>
>>
>> On Wed, Dec 15, 2010 at 6:41 PM, Emeric Fermas <emeric.fermas@gmail.com> wrote:
>>> Hello,
>>>
>>> Here's a current _unfinished_ proposal to open the discussion and
>>> gather early feedback: https://gist.github.com/742217
>>>
>>> Cheers,
>>> Em.
>>>
>>>
>>>
>>> On Wed, Dec 15, 2010 at 4:25 PM, Emeric Fermas 
<emeric.fermas@gmail.com> wrote:
>>>> Hello,
>>>>
>>>> I've started working on this feature
>>>> (https://www.pivotaltracker.com/story/show/6447259).
>>>>
>>>> I'll try to push a first draft implementation before Monday.
>>>>
>>>> Cheers,
>>>>
>>>> Em.
>>>>
>>>
>>
>