git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Jonas Fonseca" <jonas.fonseca@gmail.com>
To: "Farrukh Najmi" <farrukh@wellfleetsoftware.com>
Cc: git@vger.kernel.org
Subject: Re: Newbie questions regarding jgit
Date: Tue, 11 Nov 2008 22:37:40 +0100	[thread overview]
Message-ID: <2c6b72b30811111337v2fe23c75v25251838f721a007@mail.gmail.com> (raw)
In-Reply-To: <4919EECB.7070408@wellfleetsoftware.com>

On Tue, Nov 11, 2008 at 21:44, Farrukh Najmi
<farrukh@wellfleetsoftware.com> wrote:
> Hi all,

Hello,

> I am git newbie and looking to use jgit in a servlet endpoint.

Sounds interesting. I have been thinking about how hard it would be to
write a very simpe jgitweb kind of thing and am very interested to
hear more about your experiences.

> Where can I find a public maven repo for gjit? It seems there is one
> somewhere because of the following file in src tree:

I would also like to have a public available maven repository for
JGit. If Shawn or Robin acks, I can look into hosting one in the SVN
area of the Google Code project page. Given the lack of a real release
cycle it probably only makes sense to have a snapshot repository.

> Now I am wondering where to begin to learn how to do the equivalent of the
> following commands via the gjit Java API:
>
>   * git add /file/
>   * git rm /file/
>   * git mv /file
>   * Whatever is the git way to get a specific version of a file

JGit currently has two APIs for working with the index, which will
allow you to add, remove and move data around in the tree. In nbgit I
ended up using GitIndex, which I found easier to figure out. As I
understand it, in the long run you want to use the DirCache API, but
it is still a work in progress.

> I am hoping that there aremore docs, samples, tutorials etc. somewhere that
> I am missing. Thanks for any help you can provide. Some pointers or code
> fragments would be terrific.

I started working on a tutorial for JGit, but didn't get very far so
it mostly consists of stub pages.

 - http://code.google.com/docreader/#p=egit&s=egit&t=JGitTutorial

I have been working on moving the tutorial to maven project before
starting to write the more code heavy topics. This would make it
possible to include code snippets in the tutorial, while also allowing
to compile and test the examples.

-- 
Jonas Fonseca

  parent reply	other threads:[~2008-11-11 21:38 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-11 20:44 Newbie questions regarding jgit Farrukh Najmi
2008-11-11 21:12 ` Farrukh Najmi
2008-11-11 21:37 ` Jonas Fonseca [this message]
2008-11-11 21:44   ` Shawn O. Pearce
2008-11-11 22:01     ` Jonas Fonseca
2008-11-11 23:11       ` Shawn O. Pearce
2008-11-11 23:48         ` [PATCH] Add maven distribution management info for the new snapshot repository Jonas Fonseca
2008-11-12  0:58           ` Shawn O. Pearce
2008-11-12  1:01             ` Shawn O. Pearce
2008-11-12  2:24         ` Newbie questions regarding jgit Imran M Yousuf
2008-11-12 12:51       ` Farrukh Najmi
2008-11-12 14:05   ` Farrukh Najmi
2008-11-12 14:33     ` Farrukh Najmi
2008-11-12 17:56       ` Farrukh Najmi
2008-11-12 18:30         ` Jonas Fonseca
2008-11-12 19:29         ` Shawn O. Pearce
  -- strict thread matches above, loose matches on Subject: below --
2008-11-12 22:36 Robin Rosenberg
2008-11-12 22:37 Robin Rosenberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2c6b72b30811111337v2fe23c75v25251838f721a007@mail.gmail.com \
    --to=jonas.fonseca@gmail.com \
    --cc=farrukh@wellfleetsoftware.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).