Skip to content

Commit 38cadf9

Browse files
Martin Ågrengitster
authored andcommitted
git-receive-pack.txt: wrap shell [script] listing in "----"
The indented lines in the example shell script listing are indented differently by AsciiDoc and Asciidoctor. Fix this by marking the example shell script as a code listing by wrapping it in "----". Because this gives us some extra indentation, we can remove the one that we have been carrying explicitly. That is, drop the first tab of indentation on each line. For consistency, make the same change to the short example shell session further down. With AsciiDoc, this results in identical rendering before and after this commit. Asciidoctor now renders this the same as AsciiDoc does. Signed-off-by: Martin Ågren <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 5371813 commit 38cadf9

File tree

1 file changed

+28
-24
lines changed

1 file changed

+28
-24
lines changed

Documentation/git-receive-pack.txt

Lines changed: 28 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -165,29 +165,31 @@ ref listing the commits pushed to the repository, and logs the push
165165
certificates of signed pushes with good signatures to a logger
166166
service:
167167

168-
#!/bin/sh
169-
# mail out commit update information.
170-
while read oval nval ref
171-
do
172-
if expr "$oval" : '0*$' >/dev/null
173-
then
174-
echo "Created a new ref, with the following commits:"
175-
git rev-list --pretty "$nval"
176-
else
177-
echo "New commits:"
178-
git rev-list --pretty "$nval" "^$oval"
179-
fi |
180-
mail -s "Changes to ref $ref" commit-list@mydomain
181-
done
182-
# log signed push certificate, if any
183-
if test -n "${GIT_PUSH_CERT-}" && test ${GIT_PUSH_CERT_STATUS} = G
168+
----
169+
#!/bin/sh
170+
# mail out commit update information.
171+
while read oval nval ref
172+
do
173+
if expr "$oval" : '0*$' >/dev/null
184174
then
185-
(
186-
echo expected nonce is ${GIT_PUSH_NONCE}
187-
git cat-file blob ${GIT_PUSH_CERT}
188-
) | mail -s "push certificate from $GIT_PUSH_CERT_SIGNER" push-log@mydomain
189-
fi
190-
exit 0
175+
echo "Created a new ref, with the following commits:"
176+
git rev-list --pretty "$nval"
177+
else
178+
echo "New commits:"
179+
git rev-list --pretty "$nval" "^$oval"
180+
fi |
181+
mail -s "Changes to ref $ref" commit-list@mydomain
182+
done
183+
# log signed push certificate, if any
184+
if test -n "${GIT_PUSH_CERT-}" && test ${GIT_PUSH_CERT_STATUS} = G
185+
then
186+
(
187+
echo expected nonce is ${GIT_PUSH_NONCE}
188+
git cat-file blob ${GIT_PUSH_CERT}
189+
) | mail -s "push certificate from $GIT_PUSH_CERT_SIGNER" push-log@mydomain
190+
fi
191+
exit 0
192+
----
191193

192194
The exit code from this hook invocation is ignored, however a
193195
non-zero exit code will generate an error message.
@@ -212,8 +214,10 @@ anyway.
212214
This hook can be used, for example, to run `git update-server-info`
213215
if the repository is packed and is served via a dumb transport.
214216

215-
#!/bin/sh
216-
exec git update-server-info
217+
----
218+
#!/bin/sh
219+
exec git update-server-info
220+
----
217221

218222

219223
QUARANTINE ENVIRONMENT

0 commit comments

Comments
 (0)