Skip to content

Commit 7949c2a

Browse files
committed
Remove Phabricator-specific handling in pre-push.py, also don't print commits beyond 10
If you push a new branch, it would tend to explode printing all the commits.
1 parent fee69dd commit 7949c2a

File tree

1 file changed

+3
-16
lines changed

1 file changed

+3
-16
lines changed

llvm/utils/git/pre-push.py

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -176,28 +176,15 @@ def handle_push(args, local_ref, local_sha, remote_ref, remote_sha):
176176

177177
# Print the revision about to be pushed commits
178178
print('Pushing to "%s" on remote "%s"' % (remote_ref, args.url))
179-
for sha in revs:
179+
for sha in revs[:10]:
180180
print(" - " + git("show", "--oneline", "--quiet", sha))
181+
if len(revs) > 10:
182+
print("and %d more!" % (len(revs) - 5))
181183

182184
if len(revs) > 1:
183185
if not ask_confirm("Are you sure you want to push %d commits?" % len(revs)):
184186
die("Aborting")
185187

186-
for sha in revs:
187-
msg = git("log", "--format=%B", "-n1", sha)
188-
if "Differential Revision" not in msg:
189-
continue
190-
for line in msg.splitlines():
191-
for tag in ["Summary", "Reviewers", "Subscribers", "Tags"]:
192-
if line.startswith(tag + ":"):
193-
eprint(
194-
'Please remove arcanist tags from the commit message (found "%s" tag in %s)'
195-
% (tag, sha[:12])
196-
)
197-
if len(revs) == 1:
198-
eprint("Try running: llvm/utils/git/arcfilter.sh")
199-
die('Aborting (force push by adding "--no-verify")')
200-
201188
return
202189

203190

0 commit comments

Comments
 (0)