Skip to content

Conversation

@o1da
Copy link
Contributor

@o1da o1da commented Jan 23, 2026

Add support for .fengine-reset-ignore to preserve specified files and directories during reset endpoint invocation.

Oldrich Vykydal added 2 commits January 23, 2026 15:48
@o1da o1da requested a review from defreng as a code owner January 23, 2026 15:03
@Yanni8 Yanni8 self-requested a review January 23, 2026 15:08
To achieve this, you can create a file called `.foxops-reset-ignore` in the root of your template. It would propagate it
to the root of your incarnation repository.

This file should contain a list of file paths (one per line) that should be ignored during the reset process. No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

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

should contain a list of file paths

Maybe it's just me, but I understand that a file path should support nested exclusions. For example, I would like to exclude a specific file, such as example/file1, while still being able to delete another file, like example/file2.

In my opinion, this would be the ideal solution. So might be nice to change to code to actually support this functionality 😄 .

However, the current approach only works at the root level, meaning files can only be excluded at the root level from being removed during a reset.

if file.name == ".git":
continue

if file.name in ignore_list:
Copy link
Contributor

Choose a reason for hiding this comment

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

We are not excluding the
.fengine-reset-ignore file here. So we are going to delete it on reset...

Copy link
Contributor

Choose a reason for hiding this comment

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

not necessarily. if it is part of the template, it won't be deleted

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, however, I would assume that most people would not include this as part of the template but rather commit it along with some other "untracked" files. At least, that's how I would use it. However, if it is part of the template, we would not need this extra check.

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.

4 participants