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

Re: Commit templates are not readable after 'make install'

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 10, 2008, 07:23 UTC
Message-ID
<7vsks8xy4q.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<48C76A88.2050109@viscovery.net>
Johannes Sixt <j.sixt@viscovery.net> writes:
Show 20 quoted lines
>> diff --git c/templates/Makefile w/templates/Makefile
>> index 0722a92..a12c6e2 100644
>> --- c/templates/Makefile
>> +++ w/templates/Makefile
>> @@ -31,9 +31,11 @@ boilerplates.made : $(bpsrc)
>>  		dir=`expr "$$dst" : '\(.*\)/'` && \
>>  		mkdir -p blt/$$dir && \
>>  		case "$$boilerplate" in \
>> -		*--) ;; \
>> -		*) cp -p $$boilerplate blt/$$dst ;; \
>> -		esac || exit; \
>> +		*--) continue;; \
>> +		esac && \
>> +		cp $$boilerplate blt/$$dst && \
>> +		if test -x "blt/$$dst"; then rx=rx; else rx=r; fi && \
>> +		chmod a+$$rx "blt/$$dst" || exit; \
>>  	done && \
>>  	date >$@
>
> Since only hooks need to be executable, how about this instead:

Hmm. I tried to avoid hardcoding "it so happens that currently the only executables are hooks".

Show 18 quoted lines
> diff --git a/templates/Makefile b/templates/Makefile
> index 0722a92..80cd000 100644
> --- a/templates/Makefile
> +++ b/templates/Makefile
> @@ -32,7 +32,12 @@ boilerplates.made : $(bpsrc)
>  		mkdir -p blt/$$dir && \
>  		case "$$boilerplate" in \
>  		*--) ;; \
> -		*) cp -p $$boilerplate blt/$$dst ;; \
> +		hooks--*) \
> +			cp -p "$$boilerplate" "blt/$$dst" && \
> +			chmod a+rx "blt/$$dst";; \
> +		*) \
> +			cp -p "$$boilerplate" "blt/$$dst" && \
> +			chmod a+r "blt/$$dst";; \
>  		esac || exit; \
>  	done && \
>  	date >$@
Previous: Johannes SixtNext: Anatol Pomozov
Message 5 of 6 in “Commit templates are not readable after 'make install'”
  1. Anatol PomozovSep 9, 2008
  2. Junio C HamanoSep 9, 2008
  3. Junio C HamanoSep 9, 2008
  4. Johannes SixtSep 10, 2008
  5. Junio C HamanoSep 10, 2008
  6. Anatol PomozovSep 11, 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.