chiark
/
gitweb
/
~ianmdlvl
/
dgit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
dgit import: Right error message for missing files in ..
[dgit.git]
/
dgit
diff --git
a/dgit
b/dgit
index 51975965deb49aad24c205848e0ca5170983185b..944de8592418be52f5fae781bdf2447a4439f418 100755
(executable)
--- a/
dgit
+++ b/
dgit
@@
-6349,7
+6349,10
@@
END
foreach my $fi (@dfi) {
my $f = $fi->{Filename};
my $here = "../$f";
foreach my $fi (@dfi) {
my $f = $fi->{Filename};
my $here = "../$f";
- next if lstat $here;
+ if (lstat $here) {
+ next if stat $here;
+ fail "lstat $here works but stat gives $! !";
+ }
fail "stat $here: $!" unless $! == ENOENT;
my $there = $dscfn;
if ($dscfn =~ m#^(?:\./+)?\.\./+#) {
fail "stat $here: $!" unless $! == ENOENT;
my $there = $dscfn;
if ($dscfn =~ m#^(?:\./+)?\.\./+#) {
@@
-6360,7
+6363,7
@@
END
fail "cannot import $dscfn which seems to be inside working tree!";
}
$there =~ s#/+[^/]+$## or
fail "cannot import $dscfn which seems to be inside working tree!";
}
$there =~ s#/+[^/]+$## or
- fail "
cannot import $dscfn which seems to not have a basename
";
+ fail "
import $dscfn requires ../$f, but it does not exist
";
$there .= "/$f";
symlink $there, $here or fail "symlink $there to $here: $!";
progress "made symlink $here -> $there";
$there .= "/$f";
symlink $there, $here or fail "symlink $there to $here: $!";
progress "made symlink $here -> $there";