From f07c84aa3217532cceb86978bf74077cb4656298 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Caletka?= Date: Mon, 20 Aug 2018 16:33:00 +0200 Subject: [PATCH] Fix no reload on very first push to the repository --- dzonegit.py | 3 ++- test_dzonegit.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dzonegit.py b/dzonegit.py index b1ce3a2..4ed85d8 100644 --- a/dzonegit.py +++ b/dzonegit.py @@ -479,7 +479,8 @@ def post_receive(stdin=sys.stdin): if refname != "refs/heads/master": continue if against == "0000000000000000000000000000000000000000": - against = get_head() # Empty commit + # Empty commit + against = "4b825dc642cb6eb9a060e54bf8d69288fbee4904" should_reconfig = [ f for f in get_altered_files(against, "ACDRU", revision) if f.suffix == ".zone" diff --git a/test_dzonegit.py b/test_dzonegit.py index 9c64b1d..83da399 100644 --- a/test_dzonegit.py +++ b/test_dzonegit.py @@ -328,7 +328,7 @@ def test_post_receive(git_dir): git_dir.chdir() head = dzonegit.get_head() revisions = "{} {} refs/heads/master\n".format( - "4b825dc642cb6eb9a060e54bf8d69288fbee4904", + "0000000000000000000000000000000000000000", head, ) stdin = StringIO(revisions)