Re: git bugs

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Junio C Hamano
Subject: Re: git bugs
Date: Tuesday, June 10, 2008 - 4:38 pm

"Ben Lynn" <benlynn@gmail.com> writes:


Hmm, sorry, could you elaborate how you would plan to use the return value
from time(2) per file?

The "index file timestamp" trick assumes that once we start reading from
and writing to the filesystem (in order to hash the current contents,
check if there is any modification), nobody else touches the paths we are
interested in (e.g., after "read-tree -m -u" checks out the new contents,
grabs the stat information from the newly deposited file and stuffs that
in the index, you do not go in and edit it further until our process
returns the control to you).  We also assume that the files (both work
tree and the index) live in the same filesystem and the file timestamp,
which could be skewed compared to the system clock if the filesystem is
over the network, are consistent among them and monotonicly increasing.

        You have to have some assumption --- if you allow anybody to touch
        anything behind your back, or if you allow timestamps of some
        files come from different time sources than the one for some other
        files, I do not think any lstat(2) based change detection scheme
        would work.

We do our writeout first and then the index is updated after all our
writeout is done, so by definition (more precisely, "by that assumption"),
anything older than the timestamp of the index file are up to date, if
their filesystem timestamp match the timestamp recorded in the index, and
anything that is the same or newer than the index timestamp is suspect.

And that is the reason the current code gets by only with a single
timestamp.  I'd have to go back and study your breakage scenario a bit
better (I'm still at work today).

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
git bugs, Ben Lynn, (Tue Jun 10, 1:41 am)
Re: git bugs, Daniel Barkalow, (Tue Jun 10, 9:58 am)
Re: git bugs, Linus Torvalds, (Tue Jun 10, 10:44 am)
Re: git bugs, Ben Lynn, (Tue Jun 10, 11:45 am)
Re: git bugs, Linus Torvalds, (Tue Jun 10, 1:06 pm)
Re: git bugs, Ben Lynn, (Tue Jun 10, 4:09 pm)
Re: git bugs, Junio C Hamano, (Tue Jun 10, 4:38 pm)
Re: git bugs, Ben Lynn, (Tue Jun 10, 5:02 pm)
Re: git bugs, Junio C Hamano, (Tue Jun 10, 5:20 pm)
Re: git bugs, Ben Lynn, (Tue Jun 10, 5:24 pm)
Re: git bugs, Ben Lynn, (Tue Jun 10, 5:53 pm)
Re: git bugs, Linus Torvalds, (Tue Jun 10, 6:36 pm)
Re: git bugs, Ben Lynn, (Tue Jun 10, 7:04 pm)
Re: git bugs, Linus Torvalds, (Tue Jun 10, 7:12 pm)
Re: git bugs, Ben Lynn, (Tue Jun 10, 7:31 pm)
Re: git bugs, Linus Torvalds, (Tue Jun 10, 7:39 pm)
Re: git bugs, Ben Lynn, (Tue Jun 10, 10:58 pm)
Re: git bugs, Ben Lynn, (Tue Jun 10, 11:18 pm)
Re: git bugs, Stephen R. van den Berg, (Wed Jun 11, 5:46 am)
Re: git bugs, Linus Torvalds, (Wed Jun 11, 7:52 am)
Re: git bugs, Linus Torvalds, (Wed Jun 11, 7:54 am)
Re: git bugs, Ben Lynn, (Wed Jun 11, 10:52 am)
Re: git bugs, Linus Torvalds, (Wed Jun 11, 11:10 am)
Re: git bugs, Ben Lynn, (Wed Jun 11, 11:48 am)
Re: git bugs, Linus Torvalds, (Wed Jun 11, 11:53 am)
Re: git bugs, Ben Lynn, (Wed Jun 11, 1:57 pm)
Re: git bugs, Junio C Hamano, (Wed Jun 11, 2:50 pm)
Re: git bugs, Shawn O. Pearce, (Wed Jun 11, 8:17 pm)
Re: git bugs, Ben Lynn, (Wed Jun 11, 11:46 pm)
Re: git bugs, Ben Lynn, (Wed Jun 11, 11:51 pm)
Re: git bugs, Johannes Schindelin, (Thu Jun 12, 12:12 am)
Re: git bugs, Junio C Hamano, (Thu Jun 12, 1:06 pm)
Re: git bugs, Jeff King, (Fri Jun 13, 3:10 am)
Re: git bugs, Junio C Hamano, (Fri Jun 13, 4:09 pm)
Re: git bugs, Jeff King, (Fri Jun 13, 11:25 pm)