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

Re: [PATCH 1/2] fast-import: add special mode; copy from parent.

From: Shawn O. Pearce <hidden>
Date: 2016-06-15 22:45:48

Felipe Contreras [off-list ref] wrote:
+	if (!prefixcmp(p, "- ")) {
+		mode = 0;
+		p += 2;
This part made me wonder, why are we always doing "S_IFREG | mode"
further down?
+	} else {
+		p = get_mode(p, &mode);
+		if (!p)
+			die("Corrupt mode: %s", command_buf.buf);
+		switch (mode) {
+		case S_IFREG | 0644:
+		case S_IFREG | 0755:
+		case S_IFLNK:
+		case S_IFGITLINK:
+		case 0644:
+		case 0755:
+			/* ok */
+			break;
+		default:
+			die("Corrupt mode: %s", command_buf.buf);
+		}
-- 
Shawn.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help