]> git.ipfire.org Git - thirdparty/git.git/blobdiff - repository.c
send-email: restore --in-reply-to superseding behavior
[thirdparty/git.git] / repository.c
index 65e6f8b8fdfcf89e5c86cbee9590aa555f7b0b47..a4174ddb0629cdd690142fb42c5d4182492485c4 100644 (file)
@@ -126,6 +126,8 @@ out:
 void repo_set_worktree(struct repository *repo, const char *path)
 {
        repo->worktree = real_pathdup(path, 1);
+
+       trace2_def_repo(repo);
 }
 
 static int read_and_verify_repository_format(struct repository_format *format,
@@ -155,7 +157,7 @@ int repo_init(struct repository *repo,
              const char *gitdir,
              const char *worktree)
 {
-       struct repository_format format;
+       struct repository_format format = REPOSITORY_FORMAT_INIT;
        memset(repo, 0, sizeof(*repo));
 
        repo->objects = raw_object_store_new();
@@ -172,6 +174,7 @@ int repo_init(struct repository *repo,
        if (worktree)
                repo_set_worktree(repo, worktree);
 
+       clear_repository_format(&format);
        return 0;
 
 error:
@@ -197,9 +200,9 @@ int repo_submodule_init(struct repository *subrepo,
 
        if (repo_init(subrepo, gitdir.buf, worktree.buf)) {
                /*
-                * If initilization fails then it may be due to the submodule
+                * If initialization fails then it may be due to the submodule
                 * not being populated in the superproject's worktree.  Instead
-                * we can try to initilize the submodule by finding it's gitdir
+                * we can try to initialize the submodule by finding it's gitdir
                 * in the superproject's 'modules' directory.  In this case the
                 * submodule would not have a worktree.
                 */