From 98ff9fa866eecd50ce444ea7a506db894f2b5fac Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 3 Aug 2017 08:31:12 +0100 Subject: [PATCH] directory refactor: open_main_gitattrs confesses if $maindir not set This improves the error message considerably for "didn't call record_maindir" bugs. Signed-off-by: Ian Jackson --- dgit | 1 + 1 file changed, 1 insertion(+) diff --git a/dgit b/dgit index 6c1d5bc1..8b638c47 100755 --- 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: $!"; -- 2.30.2