[maintainer-tools PATCH 1/7] dim: don't run add-missing-cc on merge commits

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



get_maintainer.pl needs a diff, so this script can't run on a merge
commit.

Signed-off-by: Eric Engestrom <eric.engestrom@xxxxxxxxxx>
---
 dim | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/dim b/dim
index 619d855b321b..af1baa11c7b2 100755
--- a/dim
+++ b/dim
@@ -1960,6 +1960,11 @@ function dim_fixes
 
 function dim_add_missing_cc
 {
+	if [ $(git cat-file -p HEAD | grep -cE ^parent) -ne 1 ]; then
+		echoerr "This script doesn't work on merge commits"
+		return
+	fi
+
 	git show | scripts/get_maintainer.pl --email --norolestats --pattern-depth 1 | while read cc; do
 		email="$(echo "$cc" | sed -e 's/.*<//' -e 's/>.*//')"
 		name=''
-- 
Cheers,
  Eric

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux