aosp-merger: Improve merge commit message
* Merge and commit separately, to get newline between commit content and Change-Id * Install prepare-commit-msg git hook, for nicer conflict messages https://gist.github.com/mikeNG/e55ef8e7a1e5cd596a950386503054fd/ Change-Id: I97370b352ccf4f146b4b6ea89af75e032fb13730
This commit is contained in:
14
aosp-merger/prepare-commit-msg
Normal file
14
aosp-merger/prepare-commit-msg
Normal file
@@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
|
||||
case "$2,$3" in
|
||||
merge,)
|
||||
if grep -q "# It looks like you may be committing a merge." "$1"; then
|
||||
sed -i -e '/# ------------------------ >8 ------------------------/,+3d' "$1"
|
||||
/usr/bin/perl -i.bak -ne 's/^#// if /^# Conflicts/ .. /^#\R/; print' "$1"
|
||||
sed -i '/ It looks like you may be committing a merge./i # ------------------------ >8 ------------------------' "$1"
|
||||
fi
|
||||
;;
|
||||
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
Reference in New Issue
Block a user