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

Re: [PATCH 2/2] config: clear the executable bits (if any) on $GIT_DIR/config

From
Michael Haggerty <mhagger@alum.mit.edu>
Date
Nov 15, 2014, 07:42 UTC
Message-ID
<546703FD.9070507@alum.mit.edu>
In-Reply-To
<5467018D.7000103@gmail.com>
On 11/15/2014 08:32 AM, Stefan Beller wrote:
Show 23 quoted lines
> On 14.11.2014 23:26, Michael Haggerty wrote:
>> There is no reason for $GIT_DIR/config to be executable, plus this
>> change will help clean up repositories affected by the bug that was
>> fixed by the previous commit.
>>
>> Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
>> ---
>>  config.c | 12 ++++++++++--
>>  1 file changed, 10 insertions(+), 2 deletions(-)
>>
>> diff --git a/config.c b/config.c
>> index 9e42d38..0942e5f 100644
>> --- a/config.c
>> +++ b/config.c
>> @@ -1653,7 +1653,15 @@ int git_config_set_multivar_in_file(const char *config_filename,
>>  			MAP_PRIVATE, in_fd, 0);
>>  		close(in_fd);
>>  
>> -		if (chmod(lock->filename, st.st_mode & 07777) < 0) {
>> +		/*
>> +		 * We make of the executable bits because (a) it
> 
> We make *use* of
Thanks for catching this. But it's even worse. I meant to type "mask off".

Junio, would you mind fixing this if there is no other reason for a re-roll? Thanks.

Michael
-- 
Michael Haggerty
mhagger@alum.mit.edu
Previous: Stefan BellerNext: Junio C Hamano
Message 7 of 13 in “Don't make $GIT_DIR executable”
  1. 0/2 Don't make $GIT_DIR executableMichael Haggerty, Nov 15, 2014
  2. 1/2 create_default_files(): don't set u+x bit on $GIT_DIR/configMichael Haggerty, Nov 15, 2014
  3. Torsten BögershausenNov 15, 2014
  4. Michael HaggertyNov 16, 2014
  5. 2/2 config: clear the executable bits (if any) on $GIT_DIR/configMichael Haggerty, Nov 15, 2014
  6. Stefan BellerNov 15, 2014
  7. Michael HaggertyNov 15, 2014
  8. Junio C HamanoNov 16, 2014
  9. Michael HaggertyNov 17, 2014
  10. Junio C HamanoNov 17, 2014
  11. Michael HaggertyNov 17, 2014
  12. Eric WongNov 15, 2014
  13. Michael HaggertyNov 16, 2014

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.