On Tue, 9 Jan 2007, Shawn O. Pearce wrote: > Andy Whitcroft <apw@xxxxxxxxxxxx> wrote: > > How likely are we ever to be in the right place here? Seems vanishingly > > small putting us firmly in the four syscalls per call space. I wonder > > if git ever actually cares about the seek location. ie if we could stop > > reading and resetting it. Probabally not worth working it out I guess > > as any _sane_ system has one. > > Andy's right actually. If we are using pread() we aren't relying > on the current file pointer. Which means its unnecessary to get > the current pointer before seeking to the requested offset, and its > unnecessary to restore it before the git_pread() function returns. No this is wrong. The original offset _has_ to be preserved. index-pack counts on it. Nicolas - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html