mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-09 15:05:44 +01:00
accept update events
This commit is contained in:
@@ -109,7 +109,7 @@ public class GitPostReceiveHook implements PostReceiveHook
|
||||
|
||||
for (ReceiveCommand rc : receiveCommands)
|
||||
{
|
||||
if (isCreateCommand(rc))
|
||||
if (isCreateOrUpdateCommand(rc))
|
||||
{
|
||||
RevCommit commit = walk.parseCommit(rc.getNewId());
|
||||
|
||||
@@ -150,10 +150,12 @@ public class GitPostReceiveHook implements PostReceiveHook
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private boolean isCreateCommand(ReceiveCommand rc)
|
||||
private boolean isCreateOrUpdateCommand(ReceiveCommand rc)
|
||||
{
|
||||
return (rc.getResult() == ReceiveCommand.Result.OK)
|
||||
&& (rc.getType() == ReceiveCommand.Type.CREATE);
|
||||
&& ((rc.getType() == ReceiveCommand.Type.CREATE)
|
||||
|| (rc.getType() == ReceiveCommand.Type.UPDATE)
|
||||
|| (rc.getType() == ReceiveCommand.Type.UPDATE_NONFASTFORWARD));
|
||||
}
|
||||
|
||||
//~--- fields ---------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user