~edwargix/git.sr.ht

3ec35e1406c0065ac0b69d8eb8c7f1e951e26d7a — Drew DeVault 6 years ago fb48e86
gitsrht-update-hook: skip stage 3 if possible
1 files changed, 5 insertions(+), 0 deletions(-)

M gitsrht-update-hook/post-update.go
M gitsrht-update-hook/post-update.go => gitsrht-update-hook/post-update.go +5 -0
@@ 265,6 265,11 @@ func postUpdate() {
		logger.Fatal("No post-update script configured, cannot run stage 3")
	}

	if len(deliveries) == 0 && len(dbinfo.AsyncWebhooks) == 0 {
		logger.Println("Skipping stage 3, no work")
		return
	}

	// Run stage 3 asyncronously - the last few tasks can be done without
	// blocking the pusher's terminal.
	stage3 := exec.Command(hook, string(deliveriesJson), string(payloadBytes))