From: Shawn O. Pearce Date: Sun, 21 Dec 2008 22:07:57 GMT Subject: Re: [PATCH 1/2] fast-import: add special mode; copy from parent. Message-ID: <20081221220757.GA17355@spearce.org> In-Reply-To: <1229825502-963-1-git-send-email-felipe.contreras@gmail.com> Felipe Contreras 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.