summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2016-12-20 21:38:34 +0000
committerIan Jackson <ijackson@chiark.greenend.org.uk>2016-12-20 21:38:39 +0000
commit03f67737414ebb3631f097d45c5aff9a83e63b1b (patch)
tree4eb7d5a88f3bf291549f4d7e898c1e95783d427a
parent1f7b9876c5641666901f40888eb8a975449569c1 (diff)
Improve "cannot represent change" message
Print the git old and new modes too. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
-rw-r--r--debian/changelog2
-rwxr-xr-xdgit2
-rwxr-xr-xtests/tests/unrepresentable2
3 files changed, 4 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog
index 64ed65c..846fe23 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,8 @@ dgit (2.13~) unstable; urgency=medium
--include-removal to dpkg-source, and tolerating it when we do our
quilt fixup analysis. dpkg-source has supported this since at least
stretch. Closes:#848901.
+ * Improve "cannot represent change" message: print the git old and new
+ modes too.
--
diff --git a/dgit b/dgit
index 9a8d221..acb4563 100755
--- a/dgit
+++ b/dgit
@@ -4509,7 +4509,7 @@ sub quiltify_trees_differ ($$;$$$) {
};
if ($@) {
local $/="\n"; chomp $@;
- push @$unrepres, [ $f, $@ ];
+ push @$unrepres, [ $f, "$@ ($oldmode->$newmode)" ];
}
}
diff --git a/tests/tests/unrepresentable b/tests/tests/unrepresentable
index 9dd2111..5b3e139 100755
--- a/tests/tests/unrepresentable
+++ b/tests/tests/unrepresentable
@@ -21,7 +21,7 @@ badly-1 () {
badly-2 () {
git commit -m "Commit wrongness $wrongfn ($wrongmsg)"
- t-expect-fail "cannot represent change: $wrongmsg: $wrongfn" \
+ t-expect-fail E:"cannot represent change: $wrongmsg .*: $wrongfn" \
attempt
}