{"thread":{"id":"16827","subject":"[PATCH] fast-import: Cleanup mode setting.","startedAt":"2008-12-22T02:19:37Z","lastAt":"2008-12-22T02:19:37Z","messageCount":1,"participants":["Felipe Contreras"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"98527","messageId":"1229912377-3566-1-git-send-email-felipe.contreras@gmail.com","threadId":"16827","inReplyTo":null,"subject":"[PATCH] fast-import: Cleanup mode setting.","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2008-12-22T02:19:37Z","receivedAt":"2008-12-22T02:19:37Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"\"S_IFREG | mode\" probably is only required for 0644 and 0755.\n\nSigned-off-by: Felipe Contreras <felipe.contreras@gmail.com>\n---\n fast-import.c |    7 ++++---\n 1 files changed, 4 insertions(+), 3 deletions(-)\n\ndiff --git a/fast-import.c b/fast-import.c\nindex a6bce66..f0e08ac 100644\n--- a/fast-import.c\n+++ b/fast-import.c\n@@ -1872,12 +1872,13 @@ static void file_change_m(struct branch *b)\n \tif (!p)\n \t\tdie(\"Corrupt mode: %s\", command_buf.buf);\n \tswitch (mode) {\n+\tcase 0644:\n+\tcase 0755:\n+\t\tmode |= S_IFREG;\n \tcase S_IFREG | 0644:\n \tcase S_IFREG | 0755:\n \tcase S_IFLNK:\n \tcase S_IFGITLINK:\n-\tcase 0644:\n-\tcase 0755:\n \t\t/* ok */\n \t\tbreak;\n \tdefault:\n@@ -1944,7 +1945,7 @@ static void file_change_m(struct branch *b)\n \t\t\t    typename(type), command_buf.buf);\n \t}\n \n-\ttree_content_set(&b->branch_tree, p, sha1, S_IFREG | mode, NULL);\n+\ttree_content_set(&b->branch_tree, p, sha1, mode, NULL);\n }\n \n static void file_change_d(struct branch *b)\n-- \n1.6.0.6.5.ga66c\n"}]}