From 9b6198a1fea6a400a83a6ea3d040b42a9d0e38d4 Mon Sep 17 00:00:00 2001 From: JustAnotherArchivist Date: Sun, 21 Jun 2020 22:12:20 +0000 Subject: [PATCH] Replace git cat-file -t with -e and explain the magic ID --- mitmproxy/version.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mitmproxy/version.py b/mitmproxy/version.py index f14eb697d..c55ccdf76 100644 --- a/mitmproxy/version.py +++ b/mitmproxy/version.py @@ -21,8 +21,9 @@ def get_dev_version() -> str: here = os.path.abspath(os.path.join(os.path.dirname(__file__), "..")) try: # Check that we're in the mitmproxy repository: https://github.com/mitmproxy/mitmproxy/issues/3987 + # cb0e3287090786fad566feb67ac07b8ef361b2c3 is the first mitmproxy commit. subprocess.run( - ['git', 'cat-file', '-t', 'cb0e3287090786fad566feb67ac07b8ef361b2c3'], + ['git', 'cat-file', '-e', 'cb0e3287090786fad566feb67ac07b8ef361b2c3'], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, cwd=here,