Thread (1 message) 1 message, 1 author, 2021-02-07

Re: [PATCH v3 0/3] Unify trailers formatting logic for pretty.c and ref-filter.c

From: Junio C Hamano <hidden>
Date: 2021-02-07 03:34:52

"Hariom Verma via GitGitGadget" [off-list ref] writes:
     @@ t/t6300-for-each-ref.sh: test_expect_success '%(trailers:only) and %(trailers:un
      +	option="$2"
      +	expect="$3"
      +	test_expect_success "$title" '
     -+		echo $expect >expect &&
     ++		printf "$expect\n" >expect &&
Are we sure that "$expect" would not ever have any '%' in it, to
confuse printf?  To be future-proof and safe, it would be prudent to
instead use

	printf "%s\n" "$expect"

to make sure that whatever is passed in $3 gets output LITERALLY.

The callers need to adopt the change I gave you in the review of the
previous round so that they do not assume backslash-en will by
changed to LF by somebody---instead if they mean LF, they just say
LF.

Thanks.





	
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help