- PublicInbox::LeiMirror::deduce_epochs($mdiff, $ibx_uri->path);
- [ 200, $v1_path, \@v2_epochs, $muri, $ft, $mf ];
+ deduce_epochs($mdiff, $ibx_uri->path);
+ [ 200, $muri, $v1_path, \@v2_epochs, $ft, $mf, $m1 ];
+}
+
+sub get_fingerprint2 {
+ my ($git_dir) = @_;
+ require PublicInbox::SHA;
+ my $rd = popen_rd([qw(git show-ref)], undef, { -C => $git_dir });
+ PublicInbox::SHA::sha256(do { local $/; <$rd> });
+}
+
+sub writable_dir ($) {
+ my ($dir) = @_;
+ return unless -d $dir && -w _;
+ my @st = stat($dir);
+ $st[2] & 0222; # any writable bits set? (in case of root)