Re: [PATCH] [RFD] Add repoid identifier to commit
- From
Junio C Hamano <junkio@cox.net>
- Date
- May 12, 2005, 19:24 UTC
- Message-ID
- <7vy8akfdss.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <1234.10.10.10.24.1115921886.squirrel@linux1>
>>>>> "S" == Sean <seanlkml@sympatico.ca> writes:
S> On Thu, May 12, 2005 1:35 pm, Junio C Hamano said:
Show 6 quoted lines
>> If that is not needed, then you can record in an auxiliary file >> that is local to each tree the timestamp of when merge happened >> in that tree along with set of foreign commit objects, and teach >> rev-tree or rev-list to read from that auxiliary file and use >> that timestamp for foreign commit objects instead of commit time >> recorded in them when sorting by time is needed.
S> The time is already recorded. Ie. the commit object is a S> separate file with a modification time which can be used as a S> "local commit timestamp". If you want to protect those time S> stamps by also recording them in a separate file, that's a S> bonus I guess but shouldn't really be needed.
That would not work if (1) you are using SHA1_FILE_DIRECTORY mechanism to share object pool for multiple trees, or (2) you git-*-pull'ed but did not merge for some time. The file timestamps are the time of download but we want the time of merge for this applicaton. Also, that approach captures only half the information necessary. The other half you missed is "which ones are foreign commits from this tree's point of view", and as you described that is something you cannot tell just by looking at the order of parents in commit objects.
S> So it seems, that rather than a repository identifier, we S> need each repository to record the time of each local commit. S> Either in a separate file or just using the object file S> timestamps directly.
I think we are in agreement here, except that object file timestamps is not something you can use.