chiark
/
gitweb
/
~ianmdlvl
/
dgit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Split brain: Make quiltify_trees_differ cleverer
[dgit.git]
/
Debian
/
Dgit.pm
diff --git
a/Debian/Dgit.pm
b/Debian/Dgit.pm
index fa85374150288cc53a1ef363042262315b76ab52..2555812c46abcdd1c617e718b0cb1c5643e8e0ba 100644
(file)
--- a/
Debian/Dgit.pm
+++ b/
Debian/Dgit.pm
@@
-8,6
+8,7
@@
use warnings;
use POSIX;
use IO::Handle;
use Config;
use POSIX;
use IO::Handle;
use Config;
+use Digest::SHA;
BEGIN {
use Exporter ();
BEGIN {
use Exporter ();
@@
-18,6
+19,7
@@
BEGIN {
@EXPORT = qw(setup_sigwarn
debiantag server_branch server_ref
stat_exists link_ltarget
@EXPORT = qw(setup_sigwarn
debiantag server_branch server_ref
stat_exists link_ltarget
+ hashfile
fail ensuredir executable_on_path
waitstatusmsg failedcmd
cmdoutput cmdoutput_errok
fail ensuredir executable_on_path
waitstatusmsg failedcmd
cmdoutput cmdoutput_errok
@@
-229,6
+231,13
@@
sub link_ltarget ($$) {
link $old, $new or die "link $old $new: $!";
}
link $old, $new or die "link $old $new: $!";
}
+sub hashfile ($) {
+ my ($fn) = @_;
+ my $h = Digest::SHA->new(256);
+ $h->addfile($fn);
+ return $h->hexdigest();
+}
+
sub git_rev_parse ($) {
return cmdoutput qw(git rev-parse), "$_[0]~0";
}
sub git_rev_parse ($) {
return cmdoutput qw(git rev-parse), "$_[0]~0";
}