git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Johannes Sixt <j.sixt@viscovery.net>
Cc: Anatol Pomozov <anatol.pomozov@gmail.com>, git@vger.kernel.org
Subject: Re: Commit templates are not readable after 'make install'
Date: Wed, 10 Sep 2008 00:23:33 -0700	[thread overview]
Message-ID: <7vsks8xy4q.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: 48C76A88.2050109@viscovery.net

Johannes Sixt <j.sixt@viscovery.net> writes:

>> 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".

> 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 >$@

  reply	other threads:[~2008-09-10  7:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-09 19:02 Commit templates are not readable after 'make install' Anatol Pomozov
2008-09-09 19:19 ` Junio C Hamano
2008-09-09 20:18   ` Junio C Hamano
2008-09-10  6:34     ` Johannes Sixt
2008-09-10  7:23       ` Junio C Hamano [this message]
2008-09-11 17:21     ` Anatol Pomozov
     [not found] <3665a1a00809090835g2a8ea4aas6cfa2ebc922f12b2@mail.gmail.com>
2008-09-09 15:41 ` Anatol Pomozov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vsks8xy4q.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=anatol.pomozov@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=j.sixt@viscovery.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).