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

Re: [RESEND PATCH] fast-import: Cleanup mode setting.

From
Shawn O. Pearce <spearce@spearce.org>
Date
Jan 14, 2009, 02:16 UTC
Message-ID
<20090114021648.GV10179@spearce.org>
In-Reply-To
<1231897027-16197-1-git-send-email-felipe.contreras@gmail.com>
Felipe Contreras <felipe.contreras@gmail.com> wrote:
> "S_IFREG | mode" probably is only required for 0644 and 0755.
> 
> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Acked-by: Shawn O. Pearce <spearce@spearce.org>
Show 36 quoted lines
> ---
>  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
> 
-- 
Shawn.
Previous: Shawn O. Pearce
Message 8 of 8 in “fast-import: Cleanup mode setting.”
  1. fast-import: Cleanup mode setting.Felipe Contreras, Jan 14, 2009
  2. Johannes SchindelinJan 14, 2009
  3. Shawn O. PearceJan 14, 2009
  4. Johannes SchindelinJan 14, 2009
  5. Shawn O. PearceJan 14, 2009
  6. Felipe ContrerasJan 14, 2009
  7. Shawn O. PearceJan 14, 2009
  8. Shawn O. PearceJan 14, 2009

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.