Page MenuHomeFreeBSD

D28337.id82867.diff
No OneTemporary

D28337.id82867.diff

Index: tools/tools/git/arc-patch
===================================================================
--- /dev/null
+++ tools/tools/git/arc-patch
@@ -0,0 +1,9 @@
+#!/bin/sh
+# Run arc patch and update the commit message afterwards to filter out
+# unneccessary phabricator tags.
+# Since the message probably still needs some editing afterwards, it also
+# runs git commit --amend to allow finalizing the message.
+scriptdir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd -P)
+arc patch --nobranch --skip-dependencies "$@" && "$scriptdir"/arcfilter.sh
+git commit --amend
+
Index: tools/tools/git/arcfilter.sh
===================================================================
--- /dev/null
+++ tools/tools/git/arcfilter.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+# Remove unnecessary phabricator tags from the commit at HEAD
+# Based on the arcfilter.sh script from LLVM
+git log -1 --pretty=%B | \
+ sed 's/^Summary://' | \
+ awk '/Reviewers:|Subscribers:/{p=1} /Reviewed By:|Differential Revision:/{p=0} !p && !/^Summary:$/ {sub(/^Summary: /,"");print}' | \
+ sed 's/^Reviewers: /Reviewers:\t/' | \
+ sed 's/^Reviewed By: /Reviewed By:\t/' | \
+ git commit --amend --date=now -F -

File Metadata

Mime Type
text/plain
Expires
Thu, Jun 11, 8:54 AM (9 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33873480
Default Alt Text
D28337.id82867.diff (1 KB)

Event Timeline