Lines Matching +full:rev +full:- +full:parse
3 # Use of this source code is governed by a BSD-style license that can be
14 Usage: commit_id.py check - check if git is present
15 commit_id.py get_git_dirs - prints work-tree and common git directories
16 commit_id.py unpack <ref_file> - check if <ref_file> exists, and if not
17 create it based on .git/packed-refs
18 commit_id.py position - print commit position
19 commit_id.py gen <file_to_write> - generate commit.h"""
24 command, stdout=sp.PIPE, shell=True, cwd=cwd).communicate()[0].strip().decode('utf-8')
28 return grab_output('git rev-parse --git-dir', cwd)
32 return grab_output('git rev-parse --git-common-dir', cwd)
36 return grab_output('git rev-list HEAD --count', cwd)
43 ret = 'true' == grab_output('git rev-parse --is-inside-work-tree', cwd)
55 # Parse lines (which are in the format <hash> <ref_file>) and find the input file
96 packed_refs_full_path = os.path.join(cwd, git_common_dir, 'packed-refs')
123 commit_id = grab_output('git rev-parse --short=%d HEAD' % commit_id_size, cwd)
124 commit_date = grab_output('git show -s --format=%ci HEAD', cwd) or commit_date