Index: packager.py |
diff --git a/packager.py b/packager.py |
index ab9557148de8834951ea1ea93e83c55a0be18cf9..d4f7b8fd35848077864fed893314cbe91862eec8 100644 |
--- a/packager.py |
+++ b/packager.py |
@@ -72,8 +72,11 @@ def getBuildNum(baseDir): |
result = subprocess.check_output(['hg', 'id', '-R', baseDir, '-n']) |
return re.sub(r'\D', '', result) |
elif Git().istype(baseDir): |
- result = subprocess.check_output(['git', 'rev-list', 'HEAD'], cwd=baseDir) |
- return str(len(result.splitlines())) |
+ result = subprocess.check_output( |
+ ['git', 'rev-list', '--count', '--branches', '--tags'], |
+ cwd=baseDir, |
+ ) |
+ return result.strip() |
Sebastian Noack
2018/10/08 14:01:04
Perhaps we can unify the code paths here:
if Me
tlucas
2018/10/08 14:19:42
I see how this would improve the code, but since w
Sebastian Noack
2018/10/08 14:26:06
I think the requested change is trivial, and makes
|
except subprocess.CalledProcessError: |
pass |