git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Shawn O. Pearce <spearce@spearce.org>
Date
Dec 21, 2008, 22:07 UTC
Message-ID
<20081221220757.GA17355@spearce.org>
In-Reply-To
<1229825502-963-1-git-send-email-felipe.contreras@gmail.com>
Felipe Contreras <felipe.contreras@gmail.com> wrote:
> +	if (!prefixcmp(p, "- ")) {
> +		mode = 0;
> +		p += 2;

This part made me wonder, why are we always doing "S_IFREG | mode" further down?

Show 16 quoted lines
> +	} 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.
Previous: Felipe ContrerasNext: Felipe Contreras
Message 8 of 10 in “fast-import: add special mode; copy from parent.”
  1. 1/2 fast-import: add special mode; copy from parent.Felipe Contreras, Dec 21, 2008
  2. 2/2 fast-import: add special '-' blob reference to use the previous one.Felipe Contreras, Dec 21, 2008
  3. Shawn O. PearceDec 21, 2008
  4. Junio C HamanoDec 21, 2008
  5. Shawn O. PearceDec 21, 2008
  6. Felipe ContrerasDec 22, 2008
  7. Felipe ContrerasDec 22, 2008
  8. Shawn O. PearceDec 21, 2008
  9. Felipe ContrerasDec 22, 2008
  10. Felipe ContrerasDec 22, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.