Code

diff --no-index -q: fix endless loop
[git.git] / merge-recursive.c
index 6bc3eac85c46700b1ed7ab93bce6ecf859fa13f9..245232a4083bbd8cdadf3b32a0a20db559941f8a 100644 (file)
@@ -498,8 +498,7 @@ static void update_file_flags(struct merge_options *o,
                if (type != OBJ_BLOB)
                        die("blob expected for %s '%s'", sha1_to_hex(sha), path);
                if (S_ISREG(mode)) {
-                       struct strbuf strbuf;
-                       strbuf_init(&strbuf, 0);
+                       struct strbuf strbuf = STRBUF_INIT;
                        if (convert_to_working_tree(path, buf, size, &strbuf)) {
                                free(buf);
                                size = strbuf.len;