[forge-dev] GitPlugin Facet (Lincoln Baxter, III)

Jevgeni Zelenkov jevgeni.zelenkov at googlemail.com
Fri Apr 20 16:52:43 EDT 2012


Hi Lincoln,

Thanks for the explanation, that helped me to understand it but not 
completely. So, what do you actually mean by "inspect the state of a 
Project"?

I take methods provided by you:
- getBranches()
- getTags()
- getRemotes()
- getStatus()

And here are some more suggestions to help inspect the state of a project:
- showLatestDiff()
- showLatestCommit()
- getNotes()
- showLog()
- switchBranch()
- cleanWorkingDirectory()

Would that be enough?
I guess, I don't understand the use cases for the GitFacet yet.
Who is going to use it and what are the potential scenarios? The git 
undo plugin will require a lot more than that. And I assume that 
GitFacet is not really a wrapper for the jGit functionality.

Regards,
Jevgeni

On 04/20/2012 06:00 PM, forge-dev-request at lists.jboss.org wrote:
> Message: 5
> Date: Fri, 20 Apr 2012 09:21:10 -0400
> From: "Lincoln Baxter, III"<lincolnbaxter at gmail.com>
> Subject: Re: [forge-dev] GitPlugin Facet
> To: forge-dev List<forge-dev at lists.jboss.org>
> Message-ID:
> 	<CAEp_U4GGVD8p8hH2M5PRm6gK_MkDGtAyXzokGcm3VVz70jeX2g at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hey Jevgeni,
>
> Welcome!
>
> Regarding the GitFacet - I believe it's in the right place for the moment,
> but I don't believe that the GitPlugin should be referencing it, since the
> commands in GitPlugin could be used even without a Project.
>
> GitFacet (as the issue describes poorly) is something that should be usable
> to inspect the state of a Project via:
>
> project.hasFacet(GitFacet.class)
>
> After that, everything else is an added benefit. It should probably also
> perform tasks like:
>
> project.getFacet(GitFacet.class).getBranches()
> project.getFacet(GitFacet.class).getTags()
> project.getFacet(GitFacet.class).getRemotes()
> project.getFacet(GitFacet.class).getStatus()
>
> And that's where your imagination kicks in.
>
> Does that make sense?
>
> ~Lincoln



More information about the forge-dev mailing list