Skip to content

Provide a way to "fix" unspecified timestamps #4

@andreabedini

Description

@andreabedini
Member

In a workflow where a repository is updated by multiple people who submit PR or patches, a contributer is forced to specify a timestamp ahead of the time of merge. This implies the possbilty that patch A with timestamp t_A ends up being merged before patch B with timestamp t_B < t_A. In this case the repository, as built from the main branch, will experience a jump, breaking incremental updates and index-state semantics.

One possible way out is to defer fixing a timestamp to merge time. One could add timestamp where it's missing, just before the merge commit, e.g.

awk -i inplace '/timestamp = / { hasTimestamp = 1 }; !hasTimestamp { printf("timestamp = %s\n", strftime("%Y-%m-%dT%H:%M:%S", systime(), 1)) }; { print }' _sources/*/*/meta.toml

It would be nice if foliage could do this itself. At build time, meta.toml files missing the timestamp could optionally get a timestamp added. The user could then commit the amended source files to git.

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

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @andreabedini

        Issue actions

          Provide a way to "fix" unspecified timestamps · Issue #4 · input-output-hk/foliage