|
From: Eric S. R. <es...@th...> - 2017-10-21 22:42:08
|
Daniel J Sebald <dan...@ie...>: > However, I don't understand the requirement that the date be unique. The > only changes to be made for the changeset are Author and Email. The more > detailed information about the SHA, commiter, etc. remains the same. Why > the requirement? It's so each commit can be identified by a unique action stamp based on its author address and authorship time. Otherwise it's difficult for reposurgeon to have a unique way to refer to commits, which makes it difficult to write surgical commands. Why the athor date and not the committer date, which we always know to 1-second precision? Ah, but the author stamp doesn't change when author-attributed patches are replayed onto a repository with git am, while the commit date does. The author date is a property of the patch, the committer date an artifact Unfortunately, author attributions mined from ChangeLogs only have time specified as a a date. In an attempt to minimize the worst-case distance from the actual time of authorship, I add on a time part of 12:00:00Z. Kind of doomed since we don't know the submitter's time zone, but I had to pick something and noon UTC will work pretty well for Europe and the U.S. This gives rise to another problem - lots of noon timestamps colliding with each other (making for non-unique action stamps if one author has multiple commits on the same day). One thing I think I know is that order of attributions in a ChangeLog is usuall the time order, so I add a tick to the timetamps to separate them. Maybe it would be better to copy the committer time if it's on the same day as the ChangeLog entry. We still have to deal with the other case, though. -- <a href="http://www.catb.org/~esr/">Eric S. Raymond</a> My work is funded by the Internet Civil Engineering Institute: https://icei.org Please visit their site and donate: the civilization you save might be your own. |