]> git.ipfire.org Git - thirdparty/git.git/blobdiff - commit.c
Merge branch 'dl/subtree-docs'
[thirdparty/git.git] / commit.c
index 43d29a800d73f3df330fa61f5214ec5259025827..4ce8cb38d5efe01a51648b4187acc291f588c012 100644 (file)
--- a/commit.c
+++ b/commit.c
@@ -423,6 +423,8 @@ int parse_commit_buffer(struct repository *r, struct commit *item, const void *b
        pptr = &item->parents;
 
        graft = lookup_commit_graft(r, &item->object.oid);
+       if (graft)
+               r->parsed_objects->substituted_parent = 1;
        while (bufptr + parent_entry_len < tail && !memcmp(bufptr, "parent ", 7)) {
                struct commit *new_parent;
 
@@ -1628,22 +1630,22 @@ size_t ignore_non_trailer(const char *buf, size_t len)
 int run_commit_hook(int editor_is_used, const char *index_file,
                    const char *name, ...)
 {
-       struct argv_array hook_env = ARGV_ARRAY_INIT;
+       struct strvec hook_env = STRVEC_INIT;
        va_list args;
        int ret;
 
-       argv_array_pushf(&hook_env, "GIT_INDEX_FILE=%s", index_file);
+       strvec_pushf(&hook_env, "GIT_INDEX_FILE=%s", index_file);
 
        /*
         * Let the hook know that no editor will be launched.
         */
        if (!editor_is_used)
-               argv_array_push(&hook_env, "GIT_EDITOR=:");
+               strvec_push(&hook_env, "GIT_EDITOR=:");
 
        va_start(args, name);
-       ret = run_hook_ve(hook_env.argv,name, args);
+       ret = run_hook_ve(hook_env.v, name, args);
        va_end(args);
-       argv_array_clear(&hook_env);
+       strvec_clear(&hook_env);
 
        return ret;
 }