summary refs log tree commit diff
path: root/src/funcs/dirs
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2010-07-06 17:40:53 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2010-07-06 17:40:53 +0800
commitcb20b2cd727c892756ff3f144ebf92feb5590562 (patch)
treea8d571fa9bb0867d055d32747d4d2f7656e8e48b /src/funcs/dirs
parent[EVAL] Don't clear eflag in evalbackcmd (diff)
downloaddash-cb20b2cd727c892756ff3f144ebf92feb5590562.tar.gz
dash-cb20b2cd727c892756ff3f144ebf92feb5590562.zip
[VAR] Fix loss of variables when hash collides
Brian Koropoff reported that the new var patches broke the following
script:

#!/bin/dash
GDM_LANG="bar"
OPTION="foo"
unset GDM_LANG
# OPTION has mysteriously become unset
echo "$OPTION"

He correctly diagnosed this as a result of removing all variables
in the hash chain preceding the one that should be removed in
setvareq.

He also provided a patch to fix this.

This patch is based on his but without keeping the original vpp.
As a result, we now store new variables at the end of the hash
chain instead of the beginning.

To make this work, setvareq/setvar now returns the vp pointer
modified.  In case they're used to unset a variable the pointer
returned is undefined.  This is because mklocal needs it and
used to get it by assuming that the new variable always appear
at the beginning of the chain.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'src/funcs/dirs')
0 files changed, 0 insertions, 0 deletions
: prefixJason A. Donenfeld 2013-05-25cgit.c: Do not reset HOME after unsetting it.Jason A. Donenfeld 2013-05-25cgit.c: sync repo config printing with struct cgit_repoJason A. Donenfeld 2013-05-25git: update to 1.8.3John Keeping 2013-05-22cache.c: cache ls_cache output properlyJohn Keeping 2013-05-22tests: introduce strip_header() helper functionJohn Keeping 2013-05-22shared.c: use die_errno() where appropriateJohn Keeping 2013-05-22html.c: die when write failsJohn Keeping 2013-05-22ui-log: add <span/> around commit decorationsJohn Keeping 2013-05-22Makefile: fix parallel "make test"John Keeping 2013-05-18cache.c: fix cache_lsJohn Keeping 2013-05-13t0109: "function" is a bash-ismJohn Keeping 2013-05-13New mailing list.Jason A. Donenfeld 2013-04-30ui-snapshot: do not access $HOMEJason A. Donenfeld 2013-04-27t0001: validate Git -rcN version numbers correctlyJohn Keeping 2013-04-27git: update to 1.8.2.2John Keeping 2013-04-17scan-tree: fix regression in section-from-path=-1John Keeping 2013-04-15t0001: ignore ".dirty" suffix on Git versionJohn Keeping 2013-04-15tests: set TEST_OUTPUT_DIRECTORY to the CGit test directoryJohn Keeping 2013-04-15t0109: test more URLsJohn Keeping 2013-04-10cgitrc.5.txt: Specify when scan-path must be defined before.Jason A. Donenfeld 2013-04-10ui-snapshot.c: Prepend "V" when guessing ref namesLukas Fleischer 2013-04-10t0107: Skip ZIP tests if unzip(1) isn't availableLukas Fleischer 2013-04-10tests/: Do not use `sed -i`Lukas Fleischer 2013-04-10Add branch-sort and repo.branch-sort options.Jason A. Donenfeld 2013-04-10t0109: chain operations with &&John Keeping 2013-04-10cgit.c: Do not restore unset environment variablesLukas Fleischer 2013-04-09t0107: Use `tar -z` for gzip'ed archivesLukas Fleischer