diff options
author | Mehdi Amini <joker.eph@gmail.com> | 2025-09-03 12:49:13 -0700 |
---|---|---|
committer | Mehdi Amini <joker.eph@gmail.com> | 2025-09-03 12:50:10 -0700 |
commit | 7949c2a9312f6311bd4a9344e1c9780307910fd2 (patch) | |
tree | 725ef8508a55ad0c5ea2d801e52a169d857ee416 | |
parent | fee69dde12643c616209b0ec667280024a130a89 (diff) | |
download | llvm-7949c2a9312f6311bd4a9344e1c9780307910fd2.zip llvm-7949c2a9312f6311bd4a9344e1c9780307910fd2.tar.gz llvm-7949c2a9312f6311bd4a9344e1c9780307910fd2.tar.bz2 |
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.
-rwxr-xr-x | llvm/utils/git/pre-push.py | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/llvm/utils/git/pre-push.py b/llvm/utils/git/pre-push.py index dfa009d..fb21702 100755 --- a/llvm/utils/git/pre-push.py +++ b/llvm/utils/git/pre-push.py @@ -176,28 +176,15 @@ def handle_push(args, local_ref, local_sha, remote_ref, remote_sha): # Print the revision about to be pushed commits print('Pushing to "%s" on remote "%s"' % (remote_ref, args.url)) - for sha in revs: + for sha in revs[:10]: print(" - " + git("show", "--oneline", "--quiet", sha)) + if len(revs) > 10: + print("and %d more!" % (len(revs) - 5)) if len(revs) > 1: if not ask_confirm("Are you sure you want to push %d commits?" % len(revs)): die("Aborting") - for sha in revs: - msg = git("log", "--format=%B", "-n1", sha) - if "Differential Revision" not in msg: - continue - for line in msg.splitlines(): - for tag in ["Summary", "Reviewers", "Subscribers", "Tags"]: - if line.startswith(tag + ":"): - eprint( - 'Please remove arcanist tags from the commit message (found "%s" tag in %s)' - % (tag, sha[:12]) - ) - if len(revs) == 1: - eprint("Try running: llvm/utils/git/arcfilter.sh") - die('Aborting (force push by adding "--no-verify")') - return |