summaryrefslogtreecommitdiff
path: root/git-debpush
diff options
context:
space:
mode:
Diffstat (limited to 'git-debpush')
-rwxr-xr-xgit-debpush8
1 files changed, 8 insertions, 0 deletions
diff --git a/git-debpush b/git-debpush
index 402b1dd..c3b067d 100755
--- a/git-debpush
+++ b/git-debpush
@@ -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=()