Skip to content

Fix gitattributes mismatch in utf8_win.txt test file

The build-source step was failing on the CI:

dpkg-source: info: building assertj-core using existing ./assertj-core_2.3.0.orig.tar.xz
dpkg-source: warning: file assertj-core-2.3.0/src/test/resources/utf8_win.txt has no final newline (either original or modified version)
dpkg-source: info: local changes detected, the modified files are:
 assertj-core-2.3.0/src/test/resources/utf8_win.txt
dpkg-source: error: aborting due to unexpected upstream changes, see /tmp/assertj-core_2.3.0-4co1~4+2+ge84292f.diff.Er49g2

This is due to the facts that:

  1. this repository ships a src/test/resources/.gitattributes file which sets text eol=crlf for utf8_win.txt
  2. the CI pipeline forces on all files the attributes -text -eol -crlf -ident -filter -working-tree-encoding -export-subst
  3. the package was likely originally imported in the repository without the above override, so the utf8_win.txt file was committed in its "normalized" form with LF line terminators instead of the CRLF that are actually expected

Fix the situation by:

  1. set the gitattributes override locally
  2. extract utf8_win.txt from the orig tarball
  3. commit it here in its "denormalized" form, with CRLF line endings

Task: T6873

Edited by Emanuele Aina

Merge request reports