From ef0c4cd40f2c8bd50ea252f7de56dae3b64eeced Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Wed, 27 Jun 2018 00:16:29 +0100 Subject: dgit: Do not introduce duplicate origs in .changes files The .dsc and .changes matching code contained roughly $fieldbody =~ / \Q$item\E\n/m but this is wrong when the $fieldbody matches $item in its last line, and there is no trailing newline (as would be usual). This code is obviouslu confused because m affects only ^ $ which don't appear in the regexp. Change these to / \Q$item\E$/m which is what ought to have been, and probably was, intended. In one case we are trying to delete a line. In that case we need to remove the leading newline. The field body always starts with a newline so the use of \n rather than ^ is fine. Closes:#869146. Signed-off-by: Ian Jackson --- debian/changelog | 2 ++ 1 file changed, 2 insertions(+) (limited to 'debian/changelog') diff --git a/debian/changelog b/debian/changelog index 0dc3014..4a0883c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,8 @@ dgit (5.3~) unstable; urgency=medium Bugfixes: + * dgit: Do not introduce duplicate origs in .changes files, + eg if the .changes already has that orig. Closes:#869146. * Honour GIT_REFLOG_ACTION everywhere. Closes:#901935. * git-debrebase new-upstream: Provide better reflog entries by setting GIT_REFLOG_ACTION. Closes:#901925. -- cgit v1.2.3