From: Christian Couder Date: Sat, 09 Nov 2013 07:06:55 GMT Subject: [PATCH 62/86] builtin/init-db: replace prefixcmd() with has_prefix() Message-ID: <20131109070720.18178.93850.chriscool@tuxfamily.org> In-Reply-To: <20131109070358.18178.40248.chriscool@tuxfamily.org> Signed-off-by: Christian Couder --- builtin/init-db.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/init-db.c b/builtin/init-db.c index 78aa387..7fe9d8c 100644 --- a/builtin/init-db.c +++ b/builtin/init-db.c @@ -266,7 +266,7 @@ static int create_default_files(const char *template_path) /* allow template config file to override the default */ if (log_all_ref_updates == -1) git_config_set("core.logallrefupdates", "true"); - if (prefixcmp(git_dir, work_tree) || + if (!has_prefix(git_dir, work_tree) || strcmp(git_dir + strlen(work_tree), "/.git")) { git_config_set("core.worktree", work_tree); } -- 1.8.4.1.566.geca833c