]> git.proxmox.com Git - pmg-api.git/commitdiff
drop now unused repoid.pl
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 23 Jul 2019 19:32:20 +0000 (21:32 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 24 Jul 2019 18:14:05 +0000 (20:14 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
repoid.pl [deleted file]

diff --git a/repoid.pl b/repoid.pl
deleted file mode 100755 (executable)
index 5120ef8..0000000
--- a/repoid.pl
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/usr/bin/perl -w
-
-# use use the first 8 characters from the master commit ID
-
-# git status --porcelain
-
-use strict;
-use lib qw(.);
-use PVE::Tools qw(run_command);
-
-my $gitdir = shift;
-die "no repository" if !$gitdir;
-
-my $path = "$gitdir/refs/heads/master";
-die "master branch does not exists" if ! -f $path;
-
-my $arg1 = shift;
-
-if ($arg1) {
-    die "unknown parameter '$arg1'" if $arg1 ne 'check';
-
-    my $testfunc = sub {
-       my $line = shift;
-       return if $line =~ m/^#/;
-       return if $line =~ m/^\?\?/;
-
-       die "detected modified content: $line\n";
-    };
-
-    my $cmd = ['git', '--git-dir', $gitdir ,'status', '--porcelain'];
-    run_command($cmd, outfunc => $testfunc);
-}
-
-my $repoid = `cat $path`;
-chomp $repoid;
-
-die "invalid commit format" if $repoid !~ m/^[0-9a-f]{40}$/;
-
-my $res = substr $repoid, 0, 8;
-print "$res\n";