Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [egit-dev] Having git config values in code templates

The contributor guide [1] describes how to contribute changes.

In a nutshell the author needs to electronically sign the Eclipse Contribution License Agreement
sign-off the commits he wants to contribute and push them for review using

$ git push https://git.eclipse.org/r/egit/egit HEAD:refs/for/master

or 

$ git push ssh://git.eclipse.org:29418/egit/egit HEAD:refs/for/master


-Matthias

On Mon, Jan 26, 2015 at 2:09 PM, Peter Palaga <ppalaga@xxxxxxxxxx> wrote:
Thanks for the positive feedback, Max and Andrey. I'll try to ask the author first if he is not ready to go through the steps himself. -- PP


On 01/26/2015 01:47 PM, Andrey Loskutov wrote:
Not sure if this is really needed, as the code is really small & trivial.

First of all I would suggest to create enhancement request in bugzilla for egit core describing what is the feature you want to add to egit, and refer to the plugin as one of the possible implementations. Second - convince the author to "rebase" his code (essentially 3 classes + one entry in plugin.xml) on top of egit (we have already org.eclipse.egit.ui.internal.variables package, so it naturally belongs there) and submit a patch to egit project (the author used EPL, so it should be OK). CQ will be needed at the very end, if the patch will be accepted and exceeds 1000 lines, which is far more than the actual code has :-)

On Monday 26 January 2015 13:26 Max Rydahl Andersen wrote:

The code here is very simple and only depends on base eclipse bundles. I
think it makes sense to have these variables made available via eclipse
git ui bundle IMO.

A PR would probably be the first step - and since its more than a few
lines of code a CQ is probably needed to be opened by egit leads too,
but since it is very simple and under EPL that would hopefully be easy
to get done.

/max

Hi,

I hope this has not been asked before.

= Short version

What needs to be done to make [1] a part of eGit?

= Long version

The @author tag of JavaDoc supposed to contain some kind of commonly
understandable identifier of the author(s) of the given Java file.

Developers often use their full name of a combination of the full name
and e-mail address.

As a matter of fact, there is no full name variable available in Java
Code templates that are used when creating new Java files. There is
only ${user} that resolves to the current user's login on the local
machine which often fails to serve as a generally understandable
identifier of the author.

There is a couple of ways to workaround this (e.g. hand-edit the
template, override java.user in eclipse.ini) but they are error prone
and hard to enforce in team environments.

I recently stumbled accross eclipse-git-template-variables plugin [1]
that simply makes the values from git config available in java code
templates. This solves the above problem very elegantly.
However, making a team dependent on a plugin developend by an
individual sounds quite risky.
Therefore the question: What needs to be done to make [1] a part of
eGit?

I am not the author of the plugin, I do not know its internals and I
even have not tried of it works. But if there is a chance that it
could be included in eGit, I am ready to help in some form.

[1] https://github.com/harmsk/eclipse-git-template-variables

Thanks,

Peter
--

Peter Palaga, Senior Sustaining Engineer, Red Hat JBoss Portal


_______________________________________________
egit-dev mailing list
egit-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/egit-dev


Back to the top