Lines Matching full:git
3 # ===- git-clang-format - ClangFormat Git Integration -------*- python -*--=== #
12 clang-format git integration
15 This file provides a clang-format integration for git. Put it somewhere in your
16 path and ensure that it is executable. Then, "git clang-format" will invoke
20 git clang-format -h
36 "git clang-format [OPTIONS] [<commit>] [<commit>|--staged] [--] [<file>...]"
45 To format staged changes, i.e everything that's been `git add`ed:
46 git clang-format
49 git clang-format HEAD~1
52 git clang-format main
57 The following git-config settings set the default of the corresponding option:
65 # This file is created within the .git directory.
313 """Return the git configuration as a dictionary.
321 for entry in run("git", "config", "--list", "--null").split("\0"):
330 value = run("git", "config", non_string_options[name], name)
380 run("git", "rev-parse", value, verbose=False)
394 a valid git object."""
395 cmd = ["git", "cat-file", "-t", value]
432 cmd = ["git", git_tool, "-p", "-U0"] + extra_args + commits + ["--"]
502 """Change to the top level of the git repository."""
503 toplevel = run("git", "rev-parse", "--show-toplevel")
508 """Create a new git tree with the given files from the working directory.
522 "git",
544 """Run clang-format on each file and save the result to a git tree.
562 "git",
569 "git",
585 # Adjust python3 octal format so that it matches what git expects
605 '--index-info' is must be a list of values suitable for "git update-index
609 cmd = ["git", "update-index", "--add", "-z", mode]
617 tree_id = run("git", "write-tree")
629 """Run clang-format on the given file and save the result to a git blob.
648 "git",
675 "git",
717 gitdir = run("git", "rev-parse", "--git-dir")
721 run("git", "read-tree", "--index-output=" + path, tree)
735 ["git", "diff", "--diff-filter=M", "--exit-code", old_tree, new_tree]
750 "git",
765 `patch_mode`, runs `git checkout --patch` to select hunks interactively."""
768 "git",
782 "git", "diff-files", "--name-status", *changed_files
801 subprocess.run(["git", "checkout", "--patch", new_tree], check=True)
805 run("git", "checkout-index", "-f", "--", *changed_files)