~edwargix/git.sr.ht

cde2f4791c7b356df42dddcb26a4b4085c9e3447 — наб 3 years ago 5212a87
Revert "Ensure all pushed refs are UTF-8, lest the webapp 500 on reading the repo"

This reverts commit 424b962d845f813a187235371a291f34f8c46e13.
1 files changed, 0 insertions(+), 8 deletions(-)

M gitsrht-update-hook/update.go
M gitsrht-update-hook/update.go => gitsrht-update-hook/update.go +0 -8
@@ 2,10 2,8 @@ package main

import (
	"fmt"
	"log"
	"os"
	"time"
	"unicode/utf8"

	goredis "github.com/go-redis/redis"
)


@@ 24,12 22,6 @@ func update() {
	}
	logger.Printf("Running update for push %s", pushUuid)

	if !utf8.ValidString(refname) {
		logger.Printf("Refusing ref '%s': not UTF-8", refname)
		log.Printf("%s not valid UTF-8, see https://github.com/libgit2/pygit2/issues/1028 for more information", refname)
		os.Exit(1)
	}

	redisHost, ok := config.Get("sr.ht", "redis-host")
	if !ok {
		redisHost = "redis://localhost:6379"