Skip to content

Commit

Permalink
pre-rebase hook: capture documentation in a <<here document
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
jrn authored and gitster committed Jul 11, 2017
1 parent 95d6787 commit 8db1ae5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions templates/hooks--pre-rebase.sample
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -167,3 +165,5 @@ To compute (2):
git rev-list master..topic
if this is empty, it is fully merged to "master".
DOC_END

0 comments on commit 8db1ae5

Please sign in to comment.