Lines Matching full:commits
38 If zero or one commits are given, run clang-format on all lines that differ
42 If two commits are given (requires --diff), run clang-format on all lines in the
127 commits, files = interpret_args(opts.args, dash_dash, opts.commit)
128 if len(commits) > 1:
130 die('--diff is required when two commits are given')
132 if len(commits) > 2:
133 die('at most two commits allowed; %d given' % len(commits))
134 changed_lines = compute_diff_and_extract_lines(commits, files)
154 if len(commits) > 1:
155 old_tree = commits[1]
157 revision=commits[1],
201 """Interpret `args` as "[commits] [--] [files]" and return (commits, files).
207 left (if present) are taken as commits. Otherwise, the arguments are checked
208 from left to right if they are commits or files. If commits are not given,
212 commits = [default_commit]
214 commits = args
215 for commit in commits:
224 commits = []
228 commits.append(args.pop(0))
229 if not commits:
230 commits = [default_commit]
233 commits = [default_commit]
235 return commits, files
263 def compute_diff_and_extract_lines(commits, files): argument
265 diff_process = compute_diff(commits, files)
275 def compute_diff(commits, files): argument
276 """Return a subprocess object producing the diff from `commits`.
280 one was specified, or the difference between both specified commits, filtered
283 if len(commits) > 1:
285 cmd = ['git', git_tool, '-p', '-U0'] + commits + ['--']