Skip to content

Conversation

bk2204
Copy link
Member

@bk2204 bk2204 commented Jul 28, 2020

This series addresses a couple of problems with our CI system.

  • First, our trailing whitespace check was not functional, so there's a commit to remove the trailing whitespace that's crept it and one to fix the check.
  • Second, Git for Windows 2.27.0 introduced a bug that, with the configuration used by GitHub Actions, causes all symlinks to be perpetually marked modified, causing our formatting check to fail.

The commits are, as usual, logical and bisectable with sane commit messages.

bk2204 added 3 commits July 24, 2020 16:52
The git-lfs-config manual page has trailing whitespace.  Let's remove
it.
We currently intend for our CI check for trailing whitespace to be
fatal; that is, if any trailing whitespace is present, our CI script
should fail.

However, currently that doesn't work, since apparently set -e is not
concerned with a negated pipeline having a nonzero exit code.  To make
things more robust, let's make this into an if statement and exit 1 if
we match any files (that is, if grep returns 0).

Note that this used to work because it was the last command in the file,
but it no longer does for the above reason.
Traditionally, symbolic links on Unix have the size of the destination
in bytes, whereas symbolic links on Windows have a full block size as
their size on disk.  While this is normally not a problem, it has caused
a significant amount of pain for users that share repositories using
symlinks between a Windows version of Git and a Linux version using the
Windows Subsystem for Linux, since the index stores the size of all
files and Git would always see these files as modified.

Git for Windows 2.27.0 introduced a very desirable feature, which is
that for Git, the size of a symlink stored in the index is always
computed based on the Unix approach, which means that a repository can
be shared.  However, it came with a significant bug.

If the core.fscache option is enabled, a different lstat implementation
is used, which does not have that fix applied.  As a result, when that
option is enabled, as it is on GitHub Actions, all symbolic links
perpetually appear to be modified, even though git diff does not show
any differences.  git reset --hard similarly has no effect.  This causes
our cibuild script to fail, since we do a git reset --hard, format
files, and then look for any modified files.

Fortunately, this issue is fixed in Git for Windows 2.28.0, but that
version isn't available via Chocolatey right now, so let's roll back to
2.26.2 until GitHub Actions updates to the latest version.
@bk2204 bk2204 marked this pull request as ready for review July 29, 2020 13:25
@bk2204 bk2204 requested a review from a team July 29, 2020 13:25
Copy link
Member

@chrisd8088 chrisd8088 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Easy 👍 , thanks!

@bk2204 bk2204 merged commit d36280d into master Jul 29, 2020
@bk2204 bk2204 deleted the moar-ci-windows branch July 29, 2020 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants