Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide a way to "fix" unspecified timestamps #4

Open
andreabedini opened this issue Mar 30, 2022 · 0 comments
Open

Provide a way to "fix" unspecified timestamps #4

andreabedini opened this issue Mar 30, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@andreabedini
Copy link
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.

@andreabedini andreabedini added the enhancement New feature or request label Mar 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant