Skip to content

How to commit only if there are changes, without leaking inodes #643

@ytti

Description

@ytti

https://github.com/ytti/oxidized/blob/master/lib/oxidized/output/git.rb#L182

Intention here is to see if data has changed, if it has, create config. And it does work.

But it does also leak inodes, which can be GC'd later. I'd prefer not to GC them, unsure if rugged even can run GC.

Question is, is there any way to do this, without leaking inodes? Other than changing the logic so that I'll first fetch data from repo, then compare it to string I have, if they differ, then proceed with repo.write and commit.
Now the repo.write is done regardless, and if it's not actually used (data didn't change) we just don't use it in any commit.

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