Lines Matching +full:- +full:- +full:git_args
3 # Use of this source code is governed by a BSD-style license that can be
7 lastchange.py -- Chromium revision fetching utility.
43 command = ['sh', '-c', ' '.join(command)]
70 command = ['sh', '-c', ' '.join(command)]
98 Return the merge-base of HEAD and ref.
104 The git commit SHA of the merge-base as a string.
108 command = ['merge-base', 'HEAD', ref]
114 Fetch the Git hash (and Cr-Commit-Position if any) for a given directory.
127 git_args = ['log', '-1', '--format=%H %ct']
129 git_args.append('--grep=' + commit_filter)
131 git_args.append(start_commit)
133 output = _RunGitCommand(directory, git_args)
139 output = _RunGitCommand(directory, ['cat-file', 'commit', hash_])
141 if line.startswith('Cr-Commit-Position:'):
142 pos = line.rsplit()[-1].strip()
143 logging.debug("Found Cr-Commit-Position '%s'", pos)
144 revision = "{}-{}".format(hash_, pos)
157 if src_index != -1:
188 """Get the top git directory - the directory that contains the .git directory.
193 The output of "git rev-parse --show-toplevel" as a string
195 return _RunGitCommand(source_dir, ['rev-parse', '--show-toplevel'])
221 parser.add_argument("-m", "--version-macro",
222 help=("Name of C #define when using --header. Defaults to "
224 parser.add_argument("-o",
225 "--output",
228 "Can be combined with other file-output-related "
230 parser.add_argument("--header",
233 "Can be combined with other file-output-related "
235 parser.add_argument("--revision",
237 help=("Write last change to FILE as a one-line revision. "
238 "Can be combined with other file-output-related "
240 parser.add_argument("--merge-base-ref",
244 parser.add_argument("--revision-id-only", action='store_true',
246 "Git, a 40-character commit hash, excluding the "
247 "Cr-Commit-Position)."))
248 parser.add_argument("--revision-id-prefix",
251 parser.add_argument("--print-only", action="store_true",
253 "file-output-related options."))
254 parser.add_argument("-s", "--source-dir", metavar="DIR",
256 parser.add_argument("--filter", metavar="REGEX",
259 "'^Change-Id:' to suppress local commits."),
260 default='^Change-Id:')
293 logging.error("You requested a --merge-base-ref value of '%s' but no "