summaryrefslogtreecommitdiff
path: root/tests/tests/unrepresentable
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2017-07-16 11:19:29 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2017-07-16 12:46:25 +0100
commitfd9881c5c24f97f7c7421db946e6f09afdb2758a (patch)
tree86ca1d43086ba131a25c9f02b755681536dee335 /tests/tests/unrepresentable
parent73431be6826351c4b3bbd50b61848693e1646749 (diff)
dgit: unrepres. changes: Prepare to tolerate symlinks
Permit symlinks (which have mode 120000 in git) to make their way through for more detailed checks. No functional change except to error messages, because: * If neither thing was a symlink, then the existing regexps still match and the new "modified symlink" clause will not, so the flow is unchanged. * Otherwise, if both $oldmode and $newmode match [^0], ie, this is a modification rather than deletion or removal, we insist that $oldmode=$newmode, and then, fail the new "modified symlink" check. * Otherwise, we fail the check for default mode. So in the case we are allowing to proceed further, we fail as before. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'tests/tests/unrepresentable')
-rwxr-xr-xtests/tests/unrepresentable6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/tests/unrepresentable b/tests/tests/unrepresentable
index fa71bd3..206af86 100755
--- a/tests/tests/unrepresentable
+++ b/tests/tests/unrepresentable
@@ -25,12 +25,12 @@ badly-2 () {
attempt
}
-badly-1 orig-symlink 'not a plain file'
+badly-1 orig-symlink 'modified symlink'
ln -sf NEWTARGET orig-symlink
git add orig-symlink
badly-2
-badly-1 orig-symlink 'not a plain file'
+badly-1 orig-symlink 'non-default mode or type'
git rm -f orig-symlink
badly-2
@@ -39,7 +39,7 @@ start
git commit -m deleted
attempt
-badly-1 src.c 'mode changed'
+badly-1 src.c 'mode or type changed'
chmod +x src.c
git add src.c
badly-2