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 <martin.agren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Martin Ågren committed
Sep 7, 2019 at 16:12 UTC
38cadf9e4733e9b5df92c580a25492b3c1081b80
1 file changed
+28
-24
Documentation/git-receive-pack.txt
+28
-24
@@ -165,29 +165,31 @@ ref listing the commits pushed to the repository, and logs the push
165
certificates of signed pushes with good signatures to a logger
166
service:
167
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
174
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
+----
193
194
The exit code from this hook invocation is ignored, however a
195
non-zero exit code will generate an error message.
@@ -212,8 +214,10 @@ anyway.
214
This hook can be used, for example, to run `git update-server-info`
215
if the repository is packed and is served via a dumb transport.
216
215
- #!/bin/sh
216
- exec git update-server-info
217
+----
218
+#!/bin/sh
219
+exec git update-server-info
220
+----
221
222
223
QUARANTINE ENVIRONMENT