Skip to content

BUG: Remove accidentally committed CTest artifacts - #2021

Open
hjmjohnson wants to merge 1 commit into
ANTsX:mainfrom
hjmjohnson:bug-remove-committed-ctest-artifacts
Open

BUG: Remove accidentally committed CTest artifacts#2021
hjmjohnson wants to merge 1 commit into
ANTsX:mainfrom
hjmjohnson:bug-remove-committed-ctest-artifacts

Conversation

@hjmjohnson

@hjmjohnson hjmjohnson commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator

Removes two transient CTest outputs that were accidentally committed to the source tree — Examples/Testing/Temporary/CTestCostData.txt and LastTest.log — and adds a .gitignore rule so they cannot come back.

Why these are accidental, not intentional fixtures

Both files entered the tree in d9b0d68 ("ENH: Quiet option."), a commit whose subject and remaining ten files are unrelated source changes — antsRegistration.cxx, antsApplyTransforms.cxx, antsMotionCorr.cxx, itkantsRegistrationHelper.h/.hxx, and others. The signature of a git add -A sweep.

Supporting evidence:

  • Contents are empty artifacts. CTestCostData.txt contains only ---. LastTest.log records a test run with no tests: Start testing: Nov 12 21:41 PST / End testing: Nov 12 21:41 PST.
  • Never touched since. One commit in their entire history — the one that added them in 2015.
  • Unreferenced. No *.cmake, CMakeLists.txt, *.sh, or *.py in the repo mentions either path.
  • Regenerated anyway. CTest rewrites both into the build tree's Testing/Temporary on every invocation, so the tracked copies are shadowed and never read.
Why the ignore pattern needs the leading **/

The rule added is:

**/Testing/Temporary/

A gitignore pattern containing a slash anywhere other than at the end is anchored to the repository root. Writing Testing/Temporary/ would therefore match only <root>/Testing/Temporary/ and would not match Examples/Testing/Temporary/ — the very path this PR removes. Verified with git check-ignore -v against a probe file at that depth before and after the fix.

Note also that .gitignore has no effect on files already tracked, which is why these two survived in the tree; untracking them is what makes the rule effective.

Examples/Testing/Temporary/CTestCostData.txt and LastTest.log are
transient CTest outputs, swept into d9b0d68 ("ENH: Quiet option.")
alongside ten unrelated source changes. CTestCostData.txt holds only
"---" and LastTest.log records an empty Nov 2015 run. Neither is
referenced by the build system, and both are rewritten in the build
tree on every ctest invocation.

Ignore **/Testing/Temporary/ so the pattern cannot recur. The leading
**/ is required: a pattern with an interior slash is anchored to the
repository root and would miss Examples/Testing/Temporary/.
@hjmjohnson
hjmjohnson force-pushed the bug-remove-committed-ctest-artifacts branch from 7c3dc4c to 2bfc660 Compare August 22, 2026 16:12
@hjmjohnson
hjmjohnson marked this pull request as ready for review August 22, 2026 16:12
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.

1 participant