unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] autogen.sh slightly broken for separate worktrees
@ 2016-05-01 20:52 Noam Postavsky
  0 siblings, 0 replies; only message in thread
From: Noam Postavsky @ 2016-05-01 20:52 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 190 bytes --]

I got

     chmod: cannot access '.git/hooks/applypatch-msg': Not a directory

It seems like the tailored_hooks loop was fixed, but the sample_hooks
loop was left behind. Patch is attached.

[-- Attachment #2: 0001-Fix-autogen.sh-for-separate-worktrees.patch --]
[-- Type: text/x-patch, Size: 844 bytes --]

From 5071c8caf2a1897c7b376a66aa09b04ea562c1da Mon Sep 17 00:00:00 2001
From: Noam Postavsky <npostavs@gmail.com>
Date: Sun, 1 May 2016 16:41:54 -0400
Subject: [PATCH] Fix autogen.sh for separate worktrees

* autogen.sh: Use the $hooks variable in the $sample_hooks loop, instead
of assuming .git/hooks is a directory.
---
 autogen.sh | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/autogen.sh b/autogen.sh
index cd0accd..3809942 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -327,8 +327,9 @@ sample_hooks=
 
 	if test -n "$sample_hooks"; then
 	    for hook in $sample_hooks; do
-		cp $cp_options -- "$hooks/$hook.sample" "$hooks/$hook" || exit
-		chmod a-w .git/hooks/$hook || exit
+		dst=$hooks/$hook
+		cp $cp_options -- "$dst.sample" "$dst" || exit
+		chmod -- a-w "$dst" || exit
 	    done
 	fi
     else
-- 
2.8.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-05-01 20:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-01 20:52 [PATCH] autogen.sh slightly broken for separate worktrees Noam Postavsky

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).