Thread (22 messages) 22 messages, 2 authors, 2020-03-27

Re: [PATCH v2 2/8] t5512: stop losing git exit code in here-docs

From: Eric Sunshine <hidden>
Date: 2020-03-26 15:24:22

On Thu, Mar 26, 2020 at 4:28 AM Denton Liu [off-list ref] wrote:
quoted hunk ↗ jump to hunk
The expected references are generated using a here-doc with some inline
command substitutions. If one of the `git rev-parse` invocations within
the command substitutions fails, its return code is swallowed and we
won't know about it. Replace these command substitutions with
generate_references(), which actually reports when `git rev-parse`
fails.

Signed-off-by: Denton Liu <redacted>
---
diff --git a/t/t5512-ls-remote.sh b/t/t5512-ls-remote.sh
@@ -212,17 +217,18 @@ test_expect_success 'protocol v2 supports hiderefs' '
 test_expect_success 'ls-remote --symref' '
+       echo "$oid      refs/remotes/origin/HEAD" >>expect &&
+       generate_references \
+       refs/remotes/origin/master \
+               refs/tags/mark \
+               refs/tags/mark1.1 \
+               refs/tags/mark1.10 \
+               refs/tags/mark1.2 >>expect &&
Botched indentation of the "refs/remotes/origin/master" line.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help