Skip to contentSkip to conversation

ap-push: Never push an empty revision

PATCH In review Ian Jackson 2 participants 2 messages Oct 21, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ap-push: Never push an empty revision

ap-push should not be used to delete the target branch.

This safety catch will prevent accidentaly deletion of branches if there is an undetected failure of whatever is generating the revision to push.

---
 ap-push |    4 ++++
 1 file changed, 4 insertions(+)
ap-push +4 -0
index d2195f2..3011561 100755
@@ -25,6 +25,10 @@ revision=$2
 . ./cri-common
 select_xenbranch
 
+if [ "x$revision" = x ]; then
+	echo >&2 "NOT pushing empty revision!"; exit 1
+fi
+
 : ${TAG_LINUX2639:=tested/2.6.39.x}
 
 . ./ap-common
Signature · 1 line
1.7.10.4