chiark / gitweb /
Dgit: Break out $tarball_f_ext_re.
[dgit.git] / git-debpush
index 402b1dd6a14d5b13df45fb488f36520acbcf6319..c3b067dca4eff7feb0edab1812c33694f3e29e5e 100755 (executable)
@@ -230,6 +230,14 @@ case "$quilt_mode" in
     *) badusage "invalid quilt mode: $quilt_mode" ;;
 esac
 
+# **** Early sanity check ****
+
+if [ "$branch" = "HEAD" ] \
+       && ! git symbolic-ref --quiet HEAD >/dev/null; then
+    fail_check detached \
+               "HEAD is detached; you probably don't want to debpush it"
+fi
+
 # **** Gather git information ****
 
 remoteconfigs=()