librelist archives

« back to archive

Tree from index for commit (Rugged)

Tree from index for commit (Rugged)

From:
Stephanie Collett
Date:
2011-08-19 @ 18:34
Hi,

Last March I was creating a script that adds and commit files through 
Rugged. At the time there was no way to write the tree from the index to 
create a commit. Is there a way to move from an index to a commit now?

I'm using the latest Rugged (7d6fdce from Aug 4th) and Libgit2 v0.14.0

Thanks,
Stephanie

Re: [libgit2] Tree from index for commit (Rugged)

From:
Stephanie Collett
Date:
2011-08-20 @ 04:47
Hi Vincent,

Yeah, I've noticed a ton of traffic in github project feed. Thanks for 
updating the Ruby bindings. 

Cheers,
Stephanie
________________________________________
From: libgit2@librelist.com [libgit2@librelist.com] on behalf of Vicent 
Marti [vicent@github.com]
Sent: Friday, August 19, 2011 5:58 PM
To: libgit2@librelist.com
Subject: Re: [libgit2] Tree from index for commit (Rugged)

Hey Stephanie,

the functionality is certainly available in libgit2, but it still
hasn't been wrapped on Rugged. The library shifts so often that it's
quite hard to keep all bindings up to date.

I'll try to do a rush this weekend to get Rugged up to speed. It
should have tree writing by Monday.

Cheers,
Vicent

On Fri, Aug 19, 2011 at 8:34 PM, Stephanie Collett
<Stephanie.Collett@ucop.edu> wrote:
>
> Hi,
> Last March I was creating a script that adds and commit files through
> Rugged. At the time there was no way to write the tree from the index to
> create a commit. Is there a way to move from an index to a commit now?
> I'm using the latest Rugged (7d6fdce from Aug 4th) and Libgit2 v0.14.0
> Thanks,
> Stephanie

Re: [libgit2] Tree from index for commit (Rugged)

From:
Vicent Marti
Date:
2011-08-20 @ 00:58
Hey Stephanie,

the functionality is certainly available in libgit2, but it still
hasn't been wrapped on Rugged. The library shifts so often that it's
quite hard to keep all bindings up to date.

I'll try to do a rush this weekend to get Rugged up to speed. It
should have tree writing by Monday.

Cheers,
Vicent

On Fri, Aug 19, 2011 at 8:34 PM, Stephanie Collett
<Stephanie.Collett@ucop.edu> wrote:
>
> Hi,
> Last March I was creating a script that adds and commit files through
> Rugged. At the time there was no way to write the tree from the index to
> create a commit. Is there a way to move from an index to a commit now?
> I'm using the latest Rugged (7d6fdce from Aug 4th) and Libgit2 v0.14.0
> Thanks,
> Stephanie

Re: [libgit2] Tree from index for commit (Rugged)

From:
Stephanie Collett
Date:
2011-12-15 @ 23:33
Hi,

I'm following up on an use case for Rugged/Libgit2. I'd like to be able to
add a file to an index and then commit. I noticed the index.write_tree 
method has been implement. This now works great…

> repo = Rugged::Repository.new('.git')
> index = repo.index
> index.reload
> index.add('test.txt')
> index.write
> index.write_tree

However, I'm having trouble creating a commit object. Is this API 
documentation up-to-date?


person = Rugged::Signature.new('Scott', 'schacon@gmail.com', Time.now)

gobjc = Rugged::Commit.new(@repo)
gobjc.message = "my message"
gobjc.author = person
gobjc.tree = gobjt
gobjc.write

-Stephanie

From: Stephanie Collett 
<Stephanie.Collett@ucop.edu<mailto:Stephanie.Collett@ucop.edu>>
Reply-To: <libgit2@librelist.com<mailto:libgit2@librelist.com>>
Date: Fri, 19 Aug 2011 18:34:43 +0000
To: <libgit2@librelist.com<mailto:libgit2@librelist.com>>
Subject: [libgit2] Tree from index for commit (Rugged)


Hi,

Last March I was creating a script that adds and commit files through 
Rugged. At the time there was no way to write the tree from the index to 
create a commit. Is there a way to move from an index to a commit now?

I'm using the latest Rugged (7d6fdce from Aug 4th) and Libgit2 v0.14.0

Thanks,
Stephanie