Running touch on a tracked file in Git, to update its timestamp, and then running meson dist would cause dist to fail:
ERROR: Repository has uncommitted changes that will not be included in the dist tarball
Use --allow-dirty to ignore the warning and proceed anyway
Unlike git status and git diff, git diff-index doesn't refresh the index before comparing, so stat changes are assumed to imply content changes. Run git update-index -q --refresh first to refresh the index.
Running
touch
on a tracked file in Git, to update its timestamp, and then runningmeson dist
would cause dist to fail:Unlike
git status
andgit diff
,git diff-index
doesn't refresh the index before comparing, so stat changes are assumed to imply content changes. Rungit update-index -q --refresh
first to refresh the index.Fixes: #12985