From 3c0d37078f2ad35c70c5d0a2e125a08f7f2f04d9 Mon Sep 17 00:00:00 2001 From: Yuki Furuta Date: Fri, 22 Apr 2022 14:35:02 +0900 Subject: [PATCH] Fix: UnboundLocalError: local variable 'version_type' referenced before assignment --- vcstool/clients/git.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vcstool/clients/git.py b/vcstool/clients/git.py index ae1ae8bb..85099ccd 100644 --- a/vcstool/clients/git.py +++ b/vcstool/clients/git.py @@ -725,6 +725,8 @@ def validate(self, command): else: for _hash in hashes: if _hash.startswith(command.version): + version_type = 'hash' + version_name = command.version break else: cmd = result_ls_remote['cmd']