Lines Matching +full:merge +full:- +full:base
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)]
97 Return the merge-base of HEAD and ref.
101 ref: The ref to use to find the merge base.
103 The git commit SHA of the merge-base as a string.
105 logging.debug("Calculating merge base between HEAD and %s in %s",
107 command = ['merge-base', 'HEAD', ref]
113 Fetch the Git hash (and Cr-Commit-Position if any) for a given directory.
126 git_args = ['log', '-1', '--format=%H %ct']
128 git_args.append('--grep=' + commit_filter)
138 output = _RunGitCommand(directory, ['cat-file', 'commit', hash_])
140 if line.startswith('Cr-Commit-Position:'):
141 pos = line.rsplit()[-1].strip()
142 logging.debug("Found Cr-Commit-Position '%s'", pos)
143 revision = "{}-{}".format(hash_, pos)
156 if src_index != -1:
187 """Get the top git directory - the directory that contains the .git directory.
192 The output of "git rev-parse --show-toplevel" as a string
194 return _RunGitCommand(source_dir, ['rev-parse', '--show-toplevel'])
220 parser.add_argument("-m", "--version-macro",
221 help=("Name of C #define when using --header. Defaults to "
223 parser.add_argument("-o",
224 "--output",
227 "Can be combined with other file-output-related "
229 parser.add_argument("--header",
232 "Can be combined with other file-output-related "
234 parser.add_argument("--revision",
236 help=("Write last change to FILE as a one-line revision. "
237 "Can be combined with other file-output-related "
239 parser.add_argument("--merge-base-ref",
241 help=("Only consider changes since the merge "
242 "base between HEAD and the provided ref"))
243 parser.add_argument("--revision-id-only", action='store_true',
245 "Git, a 40-character commit hash, excluding the "
246 "Cr-Commit-Position)."))
247 parser.add_argument("--revision-id-prefix",
250 parser.add_argument("--print-only", action="store_true",
252 "file-output-related options."))
253 parser.add_argument("-s", "--source-dir", metavar="DIR",
255 parser.add_argument("--filter", metavar="REGEX",
258 "'^Change-Id:' to suppress local commits."),
259 default='^Change-Id:')
290 logging.error("You requested a --merge-base-ref value of '%s' but no "
291 "merge base could be found between it and HEAD. Git "