Thread (69 messages) flat view 69 messages, 5 authors, 2022-01-20

Re: [PATCH v5 1/2] branch: accept multiple upstream branches for tracking

From: Josh Steadmon <hidden>
Date: 2021-12-09 22:49:20

On 2021.12.08 16:08, Glen Choo wrote:
Glen Choo [off-list ref] writes:
quoted
We print ref_string, which is a strbuf. This causes t/t3200-branch.sh to
segfault on my mac + clang, but inconsistently! With -O2, it doesn't
always segfault, but the wrong memory is read:

  Branch 'my3' set up to track remote branch local from 'Branch '%s' set up to track remote branch %s from '%s'.'.
I forgot to mention this earlier but in this example, the test *passes*
even though the stderr message is obviously wrong. I don't see any
coverage of the help message in t3200, which is a bit worrying to me.

After this series is done, is it worth adding test coverage of the help
message?
Yeah, I caught this earlier while reworking this section based on Ævar's
review, but thank you for pointing it out. I'm unsure about checking
formatting of message strings in tests; it would certainly have caught
this bug but it seems that more often they're just "change detectors"
rather than good tests. But I could be swayed if you or others feel it's
important.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help