Thread (3 messages) flat view 3 messages, 2 authors, 2016-06-15

Re: [PATCH] preserve mtime of local clone

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:47:23

Possibly related (same subject, not in this thread)

Clemens Buchacher [off-list ref] writes:
+int copy_times(int ofd, int ifd)
+{
+	struct stat st;
+	struct timespec times[2];
+	if (fstat(ifd, &st))
+		return -1;
+	times[0].tv_nsec = UTIME_OMIT;
+	times[1].tv_sec = st.st_mtime;
+	times[1].tv_nsec = ST_MTIME_NSEC(st);
+	return futimens(ofd, times);
+}
Hmm, futimens() is relatively new.  Are minority platforms folks Ok with
this patch?

At least SunOS 5.11 (OpenSolaris 0811) seems to barf on UTIME_OMIT.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help