chiark / gitweb /
dgit: Make commit_getclogp not leave a lot of detritus in .git/dgit
[dgit.git] / dgit
diff --git a/dgit b/dgit
index 6c1d5bc15e52d51187fb9d9b964e9de2514ab7c6..606abb5881ccd2a75736775cf04688a315c91d0d 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -985,7 +985,7 @@ sub commit_getclogp ($) {
     my $memo = $commit_getclogp_memo{$objid};
     return $memo if $memo;
     
-    my $mclog = dgit_privdir()."clog-$objid";
+    my $mclog = dgit_privdir()."clog";
     runcmd shell_cmd "exec >$mclog", @git, qw(cat-file blob),
        "$objid:debian/changelog";
     $commit_getclogp_memo{$objid} = parsechangelog("-l$mclog");
@@ -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: $!";