Friday, March 13, 2009

GitStore

I just released another module http://search.cpan.org/dist/GitStore/ this morning.

GitStore - Git as versioned data store in Perl
use GitStore;

my $gs = GitStore->new('/path/to/repo');
$gs->store( 'users/obj.txt', $obj );
$gs->store( ['config', 'wiki.txt'], { hash_ref => 1 } );
$gs->commit();
$gs->store( 'yyy/xxx.log', 'Log me' );
$gs->discard();

# later or in another pl
my $val = $gs->get( 'user/obj.txt' ); # $val is the same as $obj
my $val = $gs->get( 'config/wiki.txt' ); # $val is { hashref => 1 } );
my $val = $gs->get( ['yyy', 'xxx.log' ] ); # $val is undef since discard

for now, it requires the Git::PurePerl master code. you must git clone it from http://github.com/acme/git-pureperl/tree/master and install into your local dir.

The git repo is http://github.com/fayland/perl-git-store/tree/master
welcome to fork it and submit any patches.

Thanks.

Labels: ,

Sunday, March 08, 2009

Net::GitHub

I just released the new http://search.cpan.org/dist/Net-GitHub/.

it's basically a Perl interface to github.com which is the most popular git host in the world. perl5's source and perl6's rakudo source are there too.

I'm starting to like git and I put my code there too.
be inspired by Net::Google::Code, I created the http://github.com/fayland/perl-net-github/tree/master
everyone is welcome to fork it then pull request back to me.

Thanks very much, Enjoy.

Labels: , ,

Saturday, March 07, 2009

note: github and Win32

when author is unknown, you need set
E:\Fayland\perl-net-github>git config --global user.name "fayland"
E:\Fayland\perl-net-github>git config --global user.email fayland@gmail.com

just a note.

if more than one master, you need
git config branch.master.remote origin
git config branch.master.merge refs/heads/master
from http://snippets.dzone.com/posts/show/5714

another note.

Labels:

Monday, November 17, 2008

Window git and mojo

download the win git from http://code.google.com/p/msysgit/

and try
git clone git://github.com/kraih/mojo.git mojo

I'm playing the Mojo from today. and I'll post more later.

Thanks.

Labels: ,

Wednesday, September 17, 2008

jrock's git repos

http://git.jrock.us/?o=age

well, it has a lot of beautiful code.

git clone git://git.jrock.us/Ernst

Thanks.

Labels:

Monday, November 26, 2007

hosting git project in http://repo.or.cz/

http://repo.or.cz/ is a free git hosting site.

* register user: http://repo.or.cz/m/reguser.cgi
if u don't have a cat ~/.ssh/id_rsa.pub yet. use "ssh-keygen -t rsa"
* register project: http://repo.or.cz/m/regproj.cgi
* edit project, add yourself as a user.
* create a local git dir
> mkdir fayland-git
> cd fayland-git
> git init-db
> vim README
> git add .
> export GIT_AUTHOR_NAME="Fayland Lam"
> export GIT_COMMITTER_NAME="Fayland Lam"
> git commit
* at last
> git push git+ssh://repo.or.cz/srv/git/fayland.git master

that's it.

Labels: