chiark / gitweb /
directory refactor: open_main_gitattrs confesses if $maindir not set
[dgit.git] / dgit
diff --git a/dgit b/dgit
index 6c1d5bc15e52d51187fb9d9b964e9de2514ab7c6..8b638c476f091bba7333dff8723fca79e6347daf 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -3314,6 +3314,7 @@ sub ensure_setup_existing_tree () {
 }
 
 sub open_main_gitattrs () {
+    confess 'internal error no maindir' unless defined $maindir;
     my $gai = new IO::File "$maindir_gitcommon/info/attributes"
        or $!==ENOENT
        or die "open $maindir_gitcommon/info/attributes: $!";