diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2017-07-16 11:26:32 +0100 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2017-07-16 12:46:28 +0100 |
commit | a4d27ce9d75fc04b74daf8dfc93f5107c2b96778 (patch) | |
tree | 9c3760e583479701e406434c58ca84a855400772 /dgit | |
parent | fd9881c5c24f97f7c7421db946e6f09afdb2758a (diff) |
dgit: unrepres. changes: Separate out creation and deletion
We are going to want to handle these cases separately because the
behaviour of dpkg-source is different.
In this commit, simply clone the existing code (and add a few
comments), so no functional change.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'dgit')
-rwxr-xr-x | dgit | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -4915,9 +4915,16 @@ sub quiltify_trees_differ ($$;$$$) { $oldmode =~ m/^(?:10|12)\d{4}$/; if ($oldmode =~ m/[^0]/ && $newmode =~ m/[^0]/) { + # both old and new files exist die "mode or type changed\n" if $oldmode ne $newmode; die "modified symlink\n" unless $newmode =~ m/^10/; + } elsif ($oldmode =~ m/[^0]/) { + # deletion + die "non-default mode or type\n" + unless $newmode =~ m/^100644$/ || + $oldmode =~ m/^100644$/; } else { + # creation die "non-default mode or type\n" unless $newmode =~ m/^100644$/ || $oldmode =~ m/^100644$/; |