git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RESEND PATCH] fast-import: Cleanup mode setting.
@ 2009-01-14  1:37 Felipe Contreras
  2009-01-14  2:08 ` Johannes Schindelin
  2009-01-14  2:16 ` Shawn O. Pearce
  0 siblings, 2 replies; 8+ messages in thread
From: Felipe Contreras @ 2009-01-14  1:37 UTC (permalink / raw)
  To: git; +Cc: Shawn O. Pearce, Johannes Schindelin, Miklos Vajna,
	Felipe Contreras

"S_IFREG | mode" probably is only required for 0644 and 0755.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 fast-import.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/fast-import.c b/fast-import.c
index a6bce66..f0e08ac 100644
--- a/fast-import.c
+++ b/fast-import.c
@@ -1872,12 +1872,13 @@ static void file_change_m(struct branch *b)
 	if (!p)
 		die("Corrupt mode: %s", command_buf.buf);
 	switch (mode) {
+	case 0644:
+	case 0755:
+		mode |= S_IFREG;
 	case S_IFREG | 0644:
 	case S_IFREG | 0755:
 	case S_IFLNK:
 	case S_IFGITLINK:
-	case 0644:
-	case 0755:
 		/* ok */
 		break;
 	default:
@@ -1944,7 +1945,7 @@ static void file_change_m(struct branch *b)
 			    typename(type), command_buf.buf);
 	}
 
-	tree_content_set(&b->branch_tree, p, sha1, S_IFREG | mode, NULL);
+	tree_content_set(&b->branch_tree, p, sha1, mode, NULL);
 }
 
 static void file_change_d(struct branch *b)
-- 
1.6.0.6.5.ga66c

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2009-01-14  2:52 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-14  1:37 [RESEND PATCH] fast-import: Cleanup mode setting Felipe Contreras
2009-01-14  2:08 ` Johannes Schindelin
2009-01-14  2:17   ` Shawn O. Pearce
2009-01-14  2:28     ` Johannes Schindelin
2009-01-14  2:29       ` Shawn O. Pearce
2009-01-14  2:46         ` Felipe Contreras
2009-01-14  2:51           ` Shawn O. Pearce
2009-01-14  2:16 ` Shawn O. Pearce

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).