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

Re: [PATCH 3/4] add a test case for git-merge-one-file

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jan 25, 2007, 08:34 UTC
Message-ID
<Pine.LNX.4.63.0701250932360.22628@wbgn013.biozentrum.uni-wuerzburg.de>
In-Reply-To
<7vy7nsc6f0.fsf@assigned-by-dhcp.cox.net>
Hi,
On Wed, 24 Jan 2007, Junio C Hamano wrote:
Show 10 quoted lines
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> 
> > +git-update-index --index-info << EOF
> > +10644 $hash_one 1	one
> > +10644 $hash_two 2	one
> > +10644 $hash_three 3	one
> > +EOF
> 
> How can this work with 10644 instead of 100644?  Did you spot a
> bug in update-index --index-info?

Actually, since !S_ISLNK(010644), it uses ce_permissions(010644), which basically only checks if (010644 & 0100) is set (i.e. if it is executable by the user), and depending on this returns 0755 or 0644.

That's why it works.

Ciao, Dscho

Previous: Junio C Hamano
Message 3 of 3 in “add a test case for git-merge-one-file”
  1. 3/4 add a test case for git-merge-one-fileJohannes Schindelin, Jan 24, 2007
  2. Junio C HamanoJan 25, 2007
  3. Johannes SchindelinJan 25, 2007

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.