Merge branch 'bw/config-h'

This backports f31d23a399 (Merge branch 'bw/config-h', 2017-06-24) from
upstream Git's `master` branch, plus a patch that seems to be required
to let the test suite pass.

This topic branch fixes problems when looking up aliases in worktrees.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
Johannes Schindelin
2017-09-11 17:41:13 +02:00
2 changed files with 3 additions and 0 deletions

View File

@@ -7,6 +7,7 @@
#include "../run-command.h"
#include "../cache.h"
#include "win32/exit-process.h"
#include "../config.h"
#define HCAST(type, handle) ((type)(intptr_t)handle)

View File

@@ -1536,6 +1536,8 @@ static int do_git_config_sequence(const struct config_options *opts,
if (opts->commondir)
repo_config = mkpathdup("%s/config", opts->commondir);
else if (opts->git_dir)
repo_config = mkpathdup("%s/config", opts->git_dir);
else
repo_config = NULL;