diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2017-07-16 11:28:50 +0100 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2017-07-16 12:47:01 +0100 |
commit | 242ba73109ae30e7d8849b01f0c668b87d4f4d63 (patch) | |
tree | 16185417a19cfde848ce8f5d03109d8c1a50f6cc | |
parent | a4d27ce9d75fc04b74daf8dfc93f5107c2b96778 (diff) |
dgit: unrepres. changes: Tolerate deletion of executable files
We don't care what the old mode was; if we tell dpkg-source to record
the deletion it can do so.
But we do care that it was a file. Experimentally, dpkg-source on
stretch ignores attempts to delete symlinks.
The removal of the check for $newmode has no functional change,
because in this context we know that $newmode is all 0s. If it
wasn't, we would have been in "both old and new files exist", above.
So that limb of the test will never match and should be removed.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
-rw-r--r-- | debian/changelog | 1 | ||||
-rwxr-xr-x | dgit | 5 | ||||
-rwxr-xr-x | tests/tests/unrepresentable | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/debian/changelog b/debian/changelog index f91290e..478ad5f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,7 @@ dgit (3.12~) unstable; urgency=medium * dgit import: Defend against broken symlinks in .. * dgit import: Right error message for missing files in .. * dgit import: Avoid making broken symlinks in .. + * quilt fixup: Tolerate deletion of executable files. Important bugfixes to other components: * dgit-repos-server: Do not reject commits with no author/committer @@ -4920,9 +4920,8 @@ sub quiltify_trees_differ ($$;$$$) { 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$/; + die "deletion of symlink\n" + unless $oldmode =~ m/^10/; } else { # creation die "non-default mode or type\n" diff --git a/tests/tests/unrepresentable b/tests/tests/unrepresentable index 206af86..80b5a05 100755 --- a/tests/tests/unrepresentable +++ b/tests/tests/unrepresentable @@ -30,7 +30,7 @@ badly-1 orig-symlink 'modified symlink' git add orig-symlink badly-2 -badly-1 orig-symlink 'non-default mode or type' +badly-1 orig-symlink 'deletion of symlink' git rm -f orig-symlink badly-2 |