See discussion in #932612.
Suggested-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
*) 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=()
=back
+=item B<detached>
+
+Ignore the fact that HEAD is to be tagged, but HEAD is detached (this
+check is only run when B<--branch=HEAD> or no B<--branch> option is
+specified).
+
=back
=head1 SEE ALSO