From: Junio C Hamano <gitster@pobox•com>
To: Michael Haggerty <mhagger@alum•mit.edu>
Cc: "Eric Sunshine" <sunshine@sunshineco•com>,
"Eric Wong" <normalperson@yhbt•net>,
"Karsten Blees" <karsten.blees@gmail•com>,
"Stefan Beller" <stefanbeller@gmail•com>,
"Torsten Bögershausen" <tboegi@web•de>,
"Matthieu Moy" <Matthieu.Moy@imag•fr>,
"Git List" <git@vger•kernel.org>
Subject: Re: [PATCH v2 1/2] create_default_files(): don't set u+x bit on $GIT_DIR/config
Date: Mon, 17 Nov 2014 07:42:29 -0800 [thread overview]
Message-ID: <xmqqbno5zvdm.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <5469C40B.4080601@alum.mit.edu> (Michael Haggerty's message of "Mon, 17 Nov 2014 10:46:51 +0100")
Michael Haggerty <mhagger@alum•mit.edu> writes:
> This seems like a one-off bug caused by a specific instance of odd code.
> It could only recur if somebody were to remove the line that I added,
> which would be a *very* odd mistake to make given that its purpose is
> pretty obvious.
Or some other code that comes _after_ your new code touches the
file.
You cannot anticipate what mistake others make.
Shouldn't something like this be sufficient?
t/t0001-init.sh | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/t/t0001-init.sh b/t/t0001-init.sh
index e62c0ff..acdc1df 100755
--- a/t/t0001-init.sh
+++ b/t/t0001-init.sh
@@ -12,6 +12,13 @@ check_config () {
echo "expected a directory $1, a file $1/config and $1/refs"
return 1
fi
+
+ if ! test_have_prereq POSIXPERM || test -x "$1/config"
+ then
+ echo "$1/config is executable?"
+ return 1
+ fi
+
bare=$(cd "$1" && git config --bool core.bare)
worktree=$(cd "$1" && git config core.worktree) ||
worktree=unset
next prev parent reply other threads:[~2014-11-17 15:42 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-16 7:21 [PATCH v2 0/2] Don't make $GIT_DIR executable Michael Haggerty
2014-11-16 7:21 ` [PATCH v2 1/2] create_default_files(): don't set u+x bit on $GIT_DIR/config Michael Haggerty
2014-11-16 19:08 ` Junio C Hamano
2014-11-17 9:35 ` Michael Haggerty
2014-11-17 1:40 ` Eric Sunshine
2014-11-17 9:08 ` Torsten Bögershausen
2014-11-17 11:32 ` Michael Haggerty
2014-11-17 9:46 ` Michael Haggerty
2014-11-17 15:42 ` Junio C Hamano [this message]
2014-11-17 16:19 ` Michael Haggerty
2014-11-17 16:43 ` Junio C Hamano
2014-11-16 7:21 ` [PATCH v2 2/2] config: clear the executable bits (if any) " Michael Haggerty
2014-11-16 8:06 ` Johannes Sixt
2014-11-17 9:03 ` Michael Haggerty
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=xmqqbno5zvdm.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox$(echo .)com \
--cc=Matthieu.Moy@imag$(echo .)fr \
--cc=git@vger$(echo .)kernel.org \
--cc=karsten.blees@gmail$(echo .)com \
--cc=mhagger@alum$(echo .)mit.edu \
--cc=normalperson@yhbt$(echo .)net \
--cc=stefanbeller@gmail$(echo .)com \
--cc=sunshine@sunshineco$(echo .)com \
--cc=tboegi@web$(echo .)de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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