Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [egit-dev] Merge request integration with Git Flow

On Sat, Feb 6, 2021 at 4:34 PM Max <eclipse@xxxxxxxxxxxxx> wrote:
I pushed a first draft for this change here:
https://git.eclipse.org/r/c/egit/egit/+/175918
I tested it successfully with a post-flow-hotfix-publish in the
.git/hooks folder returning a non-success exit code, on Linux.

@Muhmud, as you can see this currently only supports pre- and
post-publish hooks.
I am not sure yet, when I'll be able to finish this, but if you'd like
to see it finished soon, your contribution would be very welcome!
Please feel free to take over the Gerrit.

@Matthias, I'm not quite sure if calling
FS.detect().runHookIfPresent(..) directly, is what's intended.
Would it make sense to expose the GitHook class as API, or to create a
CustomHook sub-class?

I think we can make GitHook public. I guess you don't want to move the core gitflow support down to JGit.

-Matthias
 
Cheers
Max

Am 25.01.2021 01:57 schrieb Muhmud Ahmad:
> Hi Max,
>
> Yes, that would still be mostly OK for me; we do have a very small
> number of developers using Eclipse on Windows, but if we get there
> eventually, that would be fine.
>
> Thanks for your responsiveness on this issue, I think it will be a
> great feature addition!
>
> Thanks,
>
> Muhmud.
>
> On Mon, 25 Jan 2021 at 01:20, Max <eclipse@xxxxxxxxxxxxx> wrote:
>
>> Thanks Matthias.
>> Only had a brief first look, but it seems it should be feasible to
>> introduce Gitflow specific Hooks.
>>
>>> This means there is no implementation for Windows yet.
>>
>> @Muhmud, wondering if you are still interested in this feature,
>> given it
>> is currently somewhat restricted?
>> I'm sure also contributions for making the hooks run on Windows
>> would be
>> welcome, but not sure what would be required for that.
>>
>> Am 15.01.2021 13:17 schrieb Matthias Sohn:
>>> On Fri, Jan 15, 2021 at 9:59 AM Max <eclipse@xxxxxxxxxxxxx>
>> wrote:
>>>
>>>> Hi Muhmud,
>>>>
>>>> I think it would be nice, if the EGit Gitflow support could also
>>>> support
>>>> these scripts.
>>>> However, I am not clear on the current situation of Git-hook
>>>> support in
>>>> EGit.
>>>> We don't seem to mention it in our user guide [1], but maybe it
>> is
>>>> not
>>>> necessary because it is standard Git behavior that does not
>> require
>>>> a
>>>> separate EGit setup?
>>>> Maybe someone can point me in the right direction.
>>>
>>> look at the type hierarchy of GitHook [1] in jgit. It currently
>>> supports the following hooks
>>>
>>> * commit-msg
>>> * post-commit
>>> * pre-commit
>>> * pre-push
>>>
>>> running the hooks via FS.runHookIfPresent() is currently only
>>> implemented in FS_Posix
>>> This means there is no implementation for Windows yet.
>>>
>>> [1]
>>>
>>
> https://git.eclipse.org/r/plugins/gitiles/jgit/jgit/+/refs/heads/master/org.eclipse.jgit/src/org/eclipse/jgit/hooks/GitHook.java
>> [1]
>>> [3]
>>> [2]
>>>
>>
> https://git.eclipse.org/r/plugins/gitiles/jgit/jgit/+/refs/heads/master/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java?autodive=0%2F%2F#1821
>> [2]
>>> [4]
>>> [3]
>>>
>>
> https://git.eclipse.org/r/plugins/gitiles/jgit/jgit/+/refs/heads/master/org.eclipse.jgit/src/org/eclipse/jgit/util/FS_POSIX.java?autodive=0%2F%2F#268
>> [3]
>>> [5]
>>>
>>>> If EGit in general would support these hooks, and it is only a
>>>> matter of
>>>> triggering them in the right moment in Gitflow, I'd be up for
>>>> supporting
>>>> the effort to add this feature.
>>>>
>>>> Cheers
>>>> Max
>>>>
>>>> [1] https://wiki.eclipse.org/EGit/User_Guide [4] [1]
>>>>
>>>> Am 14.01.2021 04:47 schrieb Muhmud Ahmad:
>>>>> The gitflow AVH edition allows you to provide hook scripts to
>>>>> customize git flow operations. So, you can provide a hook
>> script
>>>> for
>>>>> "post hotfix publish" which then creates a merge request for
>> your
>>>>> changes.
>>>>>
>>>>> Would it be possible to have this kind of functionality in
>> egit?
>>>>> Preferably so that they share the same hook script directory
>>>>> configuration so that Eclipse and command line execution do the
>>>> same
>>>>> things?
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Muhmud.
>>>>>
>>>>> _______________________________________________
>>>>> egit-dev mailing list
>>>>> egit-dev@xxxxxxxxxxx
>>>>> To unsubscribe from this list, visit
>>>>> https://www.eclipse.org/mailman/listinfo/egit-dev [5] [2]
>>>>
>>>> _______________________________________________
>>>> egit-dev mailing list
>>>> egit-dev@xxxxxxxxxxx
>>>> To unsubscribe from this list, visit
>>>> https://www.eclipse.org/mailman/listinfo/egit-dev [5] [2]
>>>
>>>
>>> Links:
>>> ------
>>> [1] https://wiki.eclipse.org/EGit/User_Guide [4]
>>> [2] https://www.eclipse.org/mailman/listinfo/egit-dev [5]
>>> [3]
>>>
>>
> https://git.eclipse.org/r/plugins/gitiles/jgit/jgit/+/refs/heads/master/org.eclipse.jgit/src/org/eclipse/jgit/hooks/GitHook.java
>> [1]
>>> [4]
>>>
>>
> https://git.eclipse.org/r/plugins/gitiles/jgit/jgit/+/refs/heads/master/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java?autodive=0%2F%2F#1821
>> [2]
>>> [5]
>>>
>>
> https://git.eclipse.org/r/plugins/gitiles/jgit/jgit/+/refs/heads/master/org.eclipse.jgit/src/org/eclipse/jgit/util/FS_POSIX.java?autodive=0%2F%2F#268
>> [3]
>
>
> Links:
> ------
> [1]
> https://git.eclipse.org/r/plugins/gitiles/jgit/jgit/+/refs/heads/master/org.eclipse.jgit/src/org/eclipse/jgit/hooks/GitHook.java
> [2]
> https://git.eclipse.org/r/plugins/gitiles/jgit/jgit/+/refs/heads/master/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java?autodive=0%2F%2F#1821
> [3]
> https://git.eclipse.org/r/plugins/gitiles/jgit/jgit/+/refs/heads/master/org.eclipse.jgit/src/org/eclipse/jgit/util/FS_POSIX.java?autodive=0%2F%2F#268
> [4] https://wiki.eclipse.org/EGit/User_Guide
> [5] https://www.eclipse.org/mailman/listinfo/egit-dev

Back to the top