From: "Shawn O. Pearce" <spearce@spearce.org>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: Nasser Grainawi <nasser@codeaurora.org>,
Git Mailing List <git@vger.kernel.org>
Subject: Re: [JGIT] Request for help
Date: Wed, 2 Sep 2009 18:22:07 -0700 [thread overview]
Message-ID: <20090903012207.GF1033@spearce.org> (raw)
In-Reply-To: <alpine.DEB.1.00.0909030157090.8306@pacific.mpi-cbg.de>
Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> On Wed, 2 Sep 2009, Nasser Grainawi wrote:
>
> > I'm looking to add 'git patch-id' to JGit and I could use a few
> > pointers. I'm not very familiar with the JGit code base or Java, so
> > please excuse any blatant oversights or unintelligent questions.
> >
> > First off, is there a "hacking JGit" document anywhere? One of those
> > would be great right now.
>
> There have been some mails with details about JGit from Shawn (IIRC) to
> this very list.
Yea, for the most part I think we use Eclipse, and you just have
to import JGit's top level directory into Eclipse as it comes with
Eclipse project files. But I know some folks only use our Maven
build (under jgit-maven/jgit) or use NetBeans. I have no idea how
to import the project into the latter or configure its unit tests
to run.
> > So far I'm just trying to define the inputs and outputs. On Shawn's
> > suggestion I'm planning on making it part of the org.spearce.jgit.patch
> > package. C Git patch-id very generically has an input of a 'patch', so
> > I'm thinking this implementation should use the Patch object.
>
> C Git patch-id takes a valid patch as input; I do not think that you want
> to use the Patch object.
I think we do want to use the Patch object. The Patch entity in
JGit is a parsed representation of the git diff or unified diff
structure. Its relatively easy to walk over, and all of the mess
about determining line type has already been done.
We'd probably want to do something that is a lot like the object
Patch as the output of our diff routine. A tool (e.g. Gerrit Code
Review) might only want the EditList for a given file, and not
really care about the actual formatted patch text, as it reformats
everything itself. I think patch-id computation is along those
same lines.
If we were to compute a patch-id off an InputStream we would probably
just send it through the Patch object first.
> This is not really difficult in Java, however, it relies on a working diff
> implementation (and IIRC my implementation has not yet been integrated
> into JGit).
Speaking of... where does that stand?
--
Shawn.
next prev parent reply other threads:[~2009-09-03 1:22 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-02 23:28 [JGIT] Request for help Nasser Grainawi
2009-09-03 0:04 ` Johannes Schindelin
2009-09-03 1:22 ` Shawn O. Pearce [this message]
2009-09-03 6:55 ` jgit diff, was " Johannes Schindelin
2009-09-03 10:45 ` [JGIT PATCH 0/5] jgit diff Johannes Schindelin
2009-09-03 10:46 ` [JGIT PATCH 1/5] Add set to IntList Johannes Schindelin
2009-09-03 10:46 ` [JGIT PATCH 2/5] Add Myers' algorithm to generate diff scripts Johannes Schindelin
2009-09-03 10:46 ` [JGIT PATCH 3/5] Add a test class for Myers' diff algorithm Johannes Schindelin
2009-09-03 10:47 ` [JGIT PATCH 4/5] Prepare RawText for diff-index and diff-files Johannes Schindelin
2009-09-03 10:47 ` [JGIT PATCH 5/5] Add the "jgit diff" command Johannes Schindelin
2009-09-03 10:48 ` [JGIT PATCH 0/5] jgit diff Johannes Schindelin
2009-10-01 18:47 ` Shawn O. Pearce
2009-10-01 21:47 ` Johannes Schindelin
2009-09-03 15:54 ` jgit diff, was Re: [JGIT] Request for help Christian Halstrick
2009-09-03 12:45 ` Jonas Fonseca
2009-09-03 14:42 ` Shawn O. Pearce
2009-09-03 15:38 ` Jonas Fonseca
2009-09-03 15:52 ` Shawn O. Pearce
2009-09-04 5:00 ` Gabe McArthur
2009-09-04 7:33 ` Mark Struberg
2009-09-04 12:22 ` Jonas Fonseca
2009-09-04 12:27 ` Mark Struberg
2009-09-04 12:41 ` Jonas Fonseca
2009-09-04 12:47 ` Mark Struberg
2009-09-03 1:23 ` Shawn O. Pearce
2009-09-03 19:46 ` Nasser Grainawi
2009-09-03 19:49 ` Shawn O. Pearce
2009-09-03 21:09 ` Nasser Grainawi
-- strict thread matches above, loose matches on Subject: below --
2009-09-04 7:12 Mark Struberg
[not found] <ed88cb980909040744k2fa372fapb7ee457c745b9aa0@mail.gmail.com>
2009-09-04 14:49 ` Mark Struberg
2009-09-04 17:28 ` Mark Struberg
2009-09-04 18:50 ` Jonas Fonseca
2009-09-04 18:54 ` Mark Struberg
2009-09-04 19:51 ` Mark Struberg
2009-09-04 23:47 ` Gabe
2009-09-05 0:06 ` Douglas Campos
2009-09-05 1:29 ` Gabe McArthur
2009-09-05 16:25 ` Robin Rosenberg
2009-09-05 16:40 ` Mark Struberg
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=20090903012207.GF1033@spearce.org \
--to=spearce@spearce.org \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=nasser@codeaurora.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).