]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin/worktree.c
Merge branch 'ja/worktree-orphan'
[thirdparty/git.git] / builtin / worktree.c
index 5f620843341a9cc26d0c99f35080ad2bd2b68e41..2931cd0230a4bbc0179f0a8093b1e535c3a99c57 100644 (file)
@@ -3,16 +3,20 @@
 #include "advice.h"
 #include "checkout.h"
 #include "config.h"
+#include "copy.h"
 #include "builtin.h"
 #include "dir.h"
 #include "environment.h"
 #include "gettext.h"
 #include "hex.h"
+#include "object-file.h"
+#include "object-name.h"
 #include "parse-options.h"
 #include "strvec.h"
 #include "branch.h"
 #include "refs.h"
 #include "remote.h"
+#include "repository.h"
 #include "run-command.h"
 #include "hook.h"
 #include "sigchain.h"
@@ -516,7 +520,7 @@ static int add_worktree(const char *path, const char *refname,
         * values from the current worktree into the new one, that way the
         * new worktree behaves the same as this one.
         */
-       if (repository_format_worktree_config)
+       if (the_repository->repository_format_worktree_config)
                copy_filtered_worktree_config(sb_repo.buf);
 
        strvec_pushf(&child_env, "%s=%s", GIT_DIR_ENVIRONMENT, sb_git.buf);