|
From: Daniel J S. <dan...@ie...> - 2017-10-21 23:11:20
|
On 10/21/2017 05:41 PM, Eric S. Raymond wrote: > 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. Oh, you are trying to add Author information that coincides with the ChangeLog date. I was just thinking that CVS doesn't have an Author and Committer date/time so whatever the CVS checkin time is becomes both those date/times in git. If the date/time is the same, just add an hour (or tick), but of course if there are more than two such date/times then one has to be careful to continue checking. That is, we can't do Assume: dt25 == dt26 == dt27 First comparison: dt25 == dt26 > dt26++ Second comparison: dt25 == dt27 > dt27++ because then dt26 and dt27 end up equal. Is there a situation if the commit time on a given day is 9:00 am and the assigned author date is the same day 12:00 pm that the author date/time ends up ahead of committer date/time? That would be odd. Ethan, et al. Would you be fine with the committer time and author time always being the same? The ChangeLog entry date probably isn't real accurate in itself, is it? Dan |