Skip to content

Commit 8db1ae5

Browse files
jrngitster
authored andcommitted
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 <[email protected]> Signed-off-by: Stefan Beller <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 95d6787 commit 8db1ae5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

templates/hooks--pre-rebase.sample

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,7 @@ else
8888
exit 1
8989
fi
9090

91-
exit 0
92-
93-
################################################################
91+
<<\DOC_END
9492
9593
This sample hook safeguards topic branches that have been
9694
published from being rewound.
@@ -167,3 +165,5 @@ To compute (2):
167165
git rev-list master..topic
168166
169167
if this is empty, it is fully merged to "master".
168+
169+
DOC_END

0 commit comments

Comments
 (0)