From 9bc09159f22f31733d34c513d5214dd76031a304 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bernhard=20Rosenkr=C3=A4nzer?= Date: Sun, 17 May 2015 14:10:43 +0200 Subject: Pull in HAVE_MALLOC_H fix from master to make updated sqlite happy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Bernhard Rosenkränzer --- functions | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'functions') diff --git a/functions b/functions index 6488c6f..61ccfe9 100644 --- a/functions +++ b/functions @@ -50,3 +50,27 @@ cherrypick() { fi PATCHES=$((PATCHES+1)) } + +revert() { + local PATCH + PATCH=false + if [ "$1" == "--patch" -o "$1" == "-p" ]; then + PATCH=true + shift + fi + cd "$AOSP"/"$1" + echo "=== Reverting $2 ===" + if $PATCH; then + if ! git show $2 |patch -p1 -R; then + echo "$2 failed to revert by patching, please fix" + exit 1 + fi + git commit -am "Revert $2" + else + if ! git revert --no-edit "$2"; then + echo "$2 failed to revert, please fix" + exit 1 + fi + fi + PATCHES=$((PATCHES+1)) +} -- cgit v1.2.3