Lines Matching full:git
3 #===- git-clang-format - ClangFormat Git Integration ---------*- python -*--===#
13 clang-format git integration
16 This file provides a clang-format integration for git. Put it somewhere in your
17 path and ensure that it is executable. Then, "git clang-format" will invoke
21 git clang-format -h
35 usage = 'git clang-format [OPTIONS] [<commit>] [--] [<file>...]'
42 The following git-config settings set the default of the corresponding option:
50 # This file is created within the .git directory.
166 """Return the git configuration as a dictionary.
174 for entry in run('git', 'config', '--list', '--null').split('\0'):
178 value = run('git', 'config', non_string_options[name], name)
224 run('git', 'rev-parse', value, verbose=False)
236 a valid git object."""
237 cmd = ['git', 'cat-file', '-t', value]
263 cmd = ['git', 'diff-index', '-p', '-U0', commit, '--']
308 """Change to the top level of the git repository."""
309 toplevel = run('git', 'rev-parse', '--show-toplevel')
314 """Create a new git tree with the given files from the working directory.
322 """Run clang-format on each file and save the result to a git tree.
338 '--index-info' is must be a list of values suitable for "git update-index
342 cmd = ['git', 'update-index', '--add', '-z', mode]
350 tree_id = run('git', 'write-tree')
356 """Run clang-format on the given file and save the result to a git blob.
374 hash_object_cmd = ['git', 'hash-object', '-w', '--path='+filename, '--stdin']
408 gitdir = run('git', 'rev-parse', '--git-dir')
412 run('git', 'read-tree', '--index-output='+path, tree)
421 subprocess.check_call(['git', 'diff', old_tree, new_tree, '--'])
428 `patch_mode`, runs `git checkout --patch` to select hunks interactively."""
429 changed_files = run('git', 'diff-tree', '-r', '-z', '--name-only', old_tree,
432 unstaged_files = run('git', 'diff-files', '--name-status', *changed_files)
447 subprocess.check_call(['git', 'checkout', '--patch', new_tree])
451 run('git', 'checkout-index', '-a', '-f')