diff options
Diffstat (limited to 'external/poky/meta/lib/oeqa/utils/metadata.py')
-rw-r--r-- | external/poky/meta/lib/oeqa/utils/metadata.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/external/poky/meta/lib/oeqa/utils/metadata.py b/external/poky/meta/lib/oeqa/utils/metadata.py index b7def772..8013aa68 100644 --- a/external/poky/meta/lib/oeqa/utils/metadata.py +++ b/external/poky/meta/lib/oeqa/utils/metadata.py @@ -1,6 +1,6 @@ # Copyright (C) 2016 Intel Corporation # -# Released under the MIT license (see COPYING.MIT) +# SPDX-License-Identifier: MIT # # Functions to get metadata from the testing host used # for analytics of test results. @@ -72,8 +72,11 @@ def git_rev_info(path): info['commit'] = subprocess.check_output(["git", "rev-parse", "HEAD"], cwd=path).decode('utf-8').strip() except subprocess.CalledProcessError: pass + try: + info['commit_count'] = int(subprocess.check_output(["git", "rev-list", "--count", "HEAD"], cwd=path).decode('utf-8').strip()) + except subprocess.CalledProcessError: + pass return info - try: repo = Repo(path, search_parent_directories=True) except (InvalidGitRepositoryError, NoSuchPathError): |