chiark
/
gitweb
/
~ianmdlvl
/
dgit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5b98b23
)
do not use git-show-ref as it is hopeless; just do it ourselves
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sat, 17 Aug 2013 10:57:35 +0000
(11:57 +0100)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sat, 17 Aug 2013 10:57:35 +0000
(11:57 +0100)
dgit
patch
|
blob
|
history
diff --git
a/dgit
b/dgit
index 279d92de1bb7a81a5351a1b6d20bd71a0e596cb4..5fc937898d77ca14c1c031eecd933adbd81606b4 100755
(executable)
--- a/
dgit
+++ b/
dgit
@@
-454,15
+454,17
@@
sub fetch_from_archive () {
print "last upload to archive has NO git hash\n";
}
print "last upload to archive has NO git hash\n";
}
- $!=0; $upload_hash =
- cmdoutput_errok @git, qw(show-ref --heads), lrref();
- if ($?==0) {
- die unless chomp $upload_hash;
- } elsif ($?==256) {
+ my $lrref_fn = ".git/".lrref();
+ if (open H, $lrref_fn) {
+ $upload_hash = <H>;
+ chomp $upload_hash;
+ die "$lrref_fn $upload_hash ?" unless $upload_hash =~ m/^\w+$/;
+ } elsif ($! == &ENOENT) {
$upload_hash = '';
} else {
$upload_hash = '';
} else {
- die
$?
;
+ die
"$lrref_fn $!"
;
}
}
+ print DEBUG "last upload hash $upload_hash\n";
my $hash;
if (defined $dsc_hash) {
die "missing git history even though dsc has hash"
my $hash;
if (defined $dsc_hash) {
die "missing git history even though dsc has hash"