chiark / gitweb /
Dgit.pm: reflog_cache_insert: Use ensurepath for the reflog
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 17 Jul 2019 02:18:31 +0000 (03:18 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 17 Jul 2019 02:19:21 +0000 (03:19 +0100)
Otherwise quilt fixup can fail in a too-fresh git tree.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Debian/Dgit.pm

index 2004fe1e835c847e9521de3a45cfbc5ab16557d1..a5030df78c86b1cc0e562454040505accc4a7079 100644 (file)
@@ -889,7 +889,7 @@ sub reflog_cache_insert ($$$) {
     # When we no longer need to support squeeze, use --create-reflog
     # instead of this:
     my $parent = $ref; $parent =~ s{/[^/]+$}{};
     # When we no longer need to support squeeze, use --create-reflog
     # instead of this:
     my $parent = $ref; $parent =~ s{/[^/]+$}{};
-    ensuredir "$maindir_gitcommon/logs/$parent";
+    ensurepath "$maindir_gitcommon/logs", "$parent";
     my $makelogfh = new IO::File "$maindir_gitcommon/logs/$ref", '>>'
       or confess "$!";
 
     my $makelogfh = new IO::File "$maindir_gitcommon/logs/$ref", '>>'
       or confess "$!";