diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-06-24 14:28:39 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-06-24 14:28:40 -0700 |
commit | 1c3d87cf5594cc7e57d71c7b2d99dd4982285951 (patch) | |
tree | 9a461af87a2e6c7191cd158093b37f0eea6f0c2a /config.c | |
parent | 9bca0e5513579386384c064c5cdc45980b6774df (diff) | |
parent | a9bcf6586d1a4888aea91553d73cda20494b8335 (diff) | |
download | git-1c3d87cf5594cc7e57d71c7b2d99dd4982285951.tar.gz |
Merge branch 'js/alias-early-config'
The code to pick up and execute command alias definition from the
configuration used to switch to the top of the working tree and
then come back when the expanded alias was executed, which was
unnecessarilyl complex. Attempt to simplify the logic by using the
early-config mechanism that does not chdir around.
* js/alias-early-config:
alias: use the early config machinery to expand aliases
t7006: demonstrate a problem with aliases in subdirectories
t1308: relax the test verifying that empty alias values are disallowed
help: use early config when autocorrecting aliases
config: report correct line number upon error
discover_git_directory(): avoid setting invalid git_dir
Diffstat (limited to 'config.c')
-rw-r--r-- | config.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -604,7 +604,8 @@ static int get_value(config_fn_t fn, void *data, struct strbuf *name) */ cf->linenr--; ret = fn(name->buf, value, data); - cf->linenr++; + if (ret >= 0) + cf->linenr++; return ret; } |