jeremyBanks / save

Would you like to SAVE the change?
0 stars 0 forks source link

release a new version of save #1

Open jeremyBanks opened 2 years ago

jeremyBanks commented 2 years ago
jeremyBanks commented 2 years ago

If no message is specified, the default will be of the format

r$REVISION / g$GENERATION / n$NUMBER

a component will be omitted if it has the same value as the previous one. The initial commit's message will be

r0

$REVISION, $GENERATION, and $NUMBER are all 0 for an initial commit (no parents). A commit's $REVISION is one more than the $REVISION of its first parent. A commit's $GENERATION is one more than the maximum $GENERATION of its parents. A commit's $NUMBER is one the total number of commits in its ancestry graph (excluding the commit itself).

For repositories that maintain a linear history, these values will all be the same, and they'll only use a revision number. This should match the revision number of an imported subversion repository, for example.

jeremyBanks commented 2 years ago

The default behavior will remain to brute-force the commit ID so that the first four hex digits match those of the tree it contains.

COMMITTER_TIMESTAMP must be >= AUTHOR_TIMESTAMP COMMITTER_TIMESTAMP must be > the maximum of all parents' COMMITTER_TIMESTAMP AUTHOR_TIMESTAMP must be > the maximum of all parents' COMMITTER_TIMESTAMP

we prefer COMMITTER_TIMESTAMP to be as close to CURRENT_TIMESTAMP as possible, secondarily, we prefer AUTHOR_TIMESTAMP to be as close to CURRENT_TIMESTAMP as possible.

search outwards from CURRENT_TIMESTAMP until you get a hit

If we're in timeless mode we can only go forwards

jeremyBanks commented 2 years ago

the better brute-forcing logic is working nicely