chiark / gitweb /
read HEAD ourselves as git-symbolic-ref does not in fact silently exit 1 if not symbolic
[topbloke.git] / tg-create.pl
index c205110afc0f0289b17ecaf3d1dd83bfa6f46123..d4c9a7e9751c691abf4165e909c85fdb22b9b0d1 100755 (executable)
@@ -16,8 +16,10 @@ our $current = current_tb_branch();
 die "cannot make branch starting at base of another;".
     " check out a real branch\n" if $current->{Kind} eq 'base';
 
-die "strange branch ref, making new branch with this as dep is unwise\n"
-    if $current->{Kind} eq 'weird';
+die "strange branch ref $current->{Kind} $current->{Ref},\n".
+    " making new branch with this as dep is unwise\n"
+    unless ($current->{Kind} eq 'foreign' ||
+           $current->{Kind} eq 'tip');
 
 sub fillin ($$$) {
     my ($key, $newval, $what) = @_;