[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/2] maint: don't reset PATH in out commit-msg git hook
From: |
Stefano Lattarini |
Subject: |
[PATCH 1/2] maint: don't reset PATH in out commit-msg git hook |
Date: |
Fri, 15 Feb 2013 14:39:39 +0100 |
I have a custom 'editor' script in ~/bin, and a system-provided
'editor' program in /usr/bin (on Debian, this is a link set up the
"debian alternatives" subsystem). My '$EDITOR' and '$GIT_EDITOR'
variables are set simply to 'editor' (no absolute path), which I
expect should point to my 'editor' script, since ~/bin precedes
/usr/bin in my PATH definition. But the 'commit-msg' hook used in
coreutils unconditionally resets its PATH to '/bin:/usr/bin', which
causes it to call the "wrong" editor (the one in /usr/bin, not the
one in ~/bin) when it makes me update a botched commit message.
* scripts/git-hooks: Don't reset $ENV{PATH} to '/bin:/usr/bin'.
---
scripts/git-hooks/commit-msg | 1 -
1 file changed, 1 deletion(-)
diff --git a/scripts/git-hooks/commit-msg b/scripts/git-hooks/commit-msg
index 3e91e8e..7a11489 100755
--- a/scripts/git-hooks/commit-msg
+++ b/scripts/git-hooks/commit-msg
@@ -7,7 +7,6 @@ use warnings;
(my $ME = $0) =~ s|.*/||;
my $editor = $ENV{EDITOR} || 'vi';
-$ENV{PATH} = '/bin:/usr/bin';
# Keywords allowed before the colon on the first line of a commit message:
# program names and a few general category names.
--
1.8.1.1.662.gaa39828
- [PATCH 1/2] maint: don't reset PATH in out commit-msg git hook,
Stefano Lattarini <=
- [PATCH 2/2] maint: choose editor for our commit-msg git hook the same way git does, Stefano Lattarini, 2013/02/15
- Re: [PATCH 2/2] maint: choose editor for our commit-msg git hook the same way git does, Pádraig Brady, 2013/02/15
- Re: [PATCH 2/2] maint: choose editor for our commit-msg git hook the same way git does, Bernhard Voelker, 2013/02/15
- Re: [PATCH 2/2] maint: choose editor for our commit-msg git hook the same way git does, Stefano Lattarini, 2013/02/16
- Re: [PATCH 2/2] maint: choose editor for our commit-msg git hook the same way git does, Bernhard Voelker, 2013/02/16
- Re: [PATCH 2/2] maint: choose editor for our commit-msg git hook the same way git does, Stefano Lattarini, 2013/02/16
- Re: [PATCH 2/2] maint: choose editor for our commit-msg git hook the same way git does, Bernhard Voelker, 2013/02/17
- Re: [PATCH 2/2] maint: choose editor for our commit-msg git hook the same way git does, Pádraig Brady, 2013/02/16
Re: [PATCH 1/2] maint: don't reset PATH in out commit-msg git hook, Pádraig Brady, 2013/02/15