Skip to content

ignorePlanFiles assumes Git always creates .git/info #6836

Description

@krewenki

The ignorePlanFiles test helper writes directly to .git/info/exclude without creating the parent directory first.

That assumption doesn't hold with Git 2.55.0. A fresh clone here doesn't contain .git/info, so these tests fail during setup:

go test ./server/events -run 'TestClone_ResetOnWrongCommit($|WithMergeStrategy$)' -count=1

Both fail with open .../.git/info/exclude: no such file or directory. We never reach the stale plan cleanup behavior the tests are meant to exercise.

This should probably just create filepath.Dir(excludePath) before writing the file. Small fix, but it keeps the test from depending on an incidental detail of the Git version that created the clone.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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