Lines Matching refs: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.
165 """Return the git configuration as a dictionary.
173 for entry in run('git', 'config', '--list', '--null').split('\0'):
177 value = run('git', 'config', non_string_options[name], name)
223 run('git', 'rev-parse', value, verbose=False)
235 a valid git object."""
236 cmd = ['git', 'cat-file', '-t', value]
262 cmd = ['git', 'diff-index', '-p', '-U0', commit, '--']
307 """Change to the top level of the git repository."""
308 toplevel = run('git', 'rev-parse', '--show-toplevel')
313 """Create a new git tree with the given files from the working directory.
321 """Run clang-format on each file and save the result to a git tree.
337 '--index-info' is must be a list of values suitable for "git update-index
341 cmd = ['git', 'update-index', '--add', '-z', mode]
349 tree_id = run('git', 'write-tree')
355 """Run clang-format on the given file and save the result to a git blob.
373 hash_object_cmd = ['git', 'hash-object', '-w', '--path='+filename, '--stdin']
407 gitdir = run('git', 'rev-parse', '--git-dir')
411 run('git', 'read-tree', '--index-output='+path, tree)
420 subprocess.check_call(['git', 'diff', old_tree, new_tree, '--'])
427 `patch_mode`, runs `git checkout --patch` to select hunks interactively."""
428 changed_files = run('git', 'diff-tree', '-r', '-z', '--name-only', old_tree,
431 unstaged_files = run('git', 'diff-files', '--name-status', *changed_files)
446 subprocess.check_call(['git', 'checkout', '--patch', new_tree])
450 run('git', 'checkout-index', '-a', '-f')