Skip to content

Compiled 'testing' binary is tracked and .gitignore is empty #4

Description

@dmccoystephenson

The compiled binary testing is tracked in git, and .gitignore is empty (0 bytes):

$ git ls-files -s .gitignore testing
100644 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 0	.gitignore
100644 ee22e73c990692e0edfc3a7cfbc3179dd95e89f4 0	testing

Because Makefile writes its output to ./testing, every build rewrites a tracked file. Consequences observed in this repository:

  • Any build dirties the working tree with an 18 KB binary diff, which then has to be discarded by hand before committing anything else.
  • The committed binary can silently drift from src/testing.cpp, since nothing verifies that the two correspond.
  • The stale committed binary is what makes the masked-build-failure behaviour of cr.sh possible, because a runnable artifact is always present even when the build did not succeed.
  • Every project generated from this template inherits both the tracked artifact and the empty .gitignore.

Two decisions are needed, and both are repository-policy calls rather than routine cleanup, which is why they are being surfaced here rather than changed directly:

  1. Whether testing should remain tracked, or be removed from the index (git rm --cached testing).
  2. Whether .gitignore should list the build artifact (and, more generally, what a C++ starter template ought to ignore).

Removing a tracked file and editing repository-wide ignore policy both warrant explicit owner approval, so no change is being proposed as part of an unrelated pull request.

This issue was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener).


drafted by Claude on behalf of Daniel Stephenson

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions