Package: git / 1:2.11.0-3+deb9u4

0001-pre-rebase-hook-capture-documentation-in-a-here-docum.diff Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
From b5dd549c8057f732b32b14a6c4ced25f74ae8b40 Mon Sep 17 00:00:00 2001
From: Jonathan Nieder <jrnieder@gmail.com>
Date: Thu, 6 Jan 2011 22:43:05 -0600
Subject: pre-rebase hook: capture documentation in a <<here document

Without this change, the sample hook does not pass a syntax check
(sh -n):

  $ sh -n hooks--pre-rebase.sample
  hooks--pre-rebase.sample: line 101: syntax error near unexpected token `('
  hooks--pre-rebase.sample: line 101: `   merged into it again (either directly or indirectly).'

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Improved-by: Junio C Hamano <gitster@pobox.com>
---
 templates/hooks--pre-rebase.sample | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/templates/hooks--pre-rebase.sample b/templates/hooks--pre-rebase.sample
index 053f111..b7f81c1 100755
--- a/templates/hooks--pre-rebase.sample
+++ b/templates/hooks--pre-rebase.sample
@@ -88,9 +88,7 @@ else
 	exit 1
 fi
 
-exit 0
-
-################################################################
+<<\DOC_END
 
 This sample hook safeguards topic branches that have been
 published from being rewound.
@@ -167,3 +165,5 @@ To compute (2):
 	git rev-list master..topic
 
 	if this is empty, it is fully merged to "master".
+
+DOC_END
-- 
1.8.5.3