about summary refs log tree commit homepage
path: root/script/public-inbox-gcf2
diff options
context:
space:
mode:
Diffstat (limited to 'script/public-inbox-gcf2')
-rwxr-xr-xscript/public-inbox-gcf214
1 files changed, 14 insertions, 0 deletions
diff --git a/script/public-inbox-gcf2 b/script/public-inbox-gcf2
new file mode 100755
index 00000000..51811698
--- /dev/null
+++ b/script/public-inbox-gcf2
@@ -0,0 +1,14 @@
+#!perl -w
+# Copyright (C) 2020 all contributors <meta@public-inbox.org>
+# License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
+eval { require PublicInbox::Gcf2 };
+die "libgit2 development package or Inline::C missing for $0: $@\n" if $@;
+my $gcf2 = PublicInbox::Gcf2::new();
+while (<STDIN>) {
+        chomp;
+        if (m!\A/!) { # +/path/to/git-dir
+                $gcf2->add_alternate("$_/objects");
+        } else {
+                $gcf2->cat_oid(1, $_);
+        }
+}