Thread (1 message) 1 message, 1 author, 2021-08-30

Re: [PATCH] t5582: remove spurious 'cd "$D"' line

From: Junio C Hamano <hidden>
Date: 2021-08-30 19:52:04

Jeff King [off-list ref] writes:
Just throwing "set -u" at the top of test-lib.sh shows many issues:

  - we don't initialize some known variables, like say, verbose_only. It
    might be reasonable to have a big list of:

      verbose_only=
      verbose=

    etc. That would probably be an improvement, though a slight
    maintenance burden.

      : ${GIT_TEST_CMP:=}

    near the top of the script to pre-declare all such variables.
These two are sensible clean-up, I would think, whether we aim to
achieve "set -u" cleanness.  The original issue triggered this
thread was about $D that can be confused by a leaked environment
variable, but these "known variables" that are not assigned to in
the early part of the tests are inviting similar troubles.

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