Code

Fix bogus linked-list management for user defined merge drivers.
authorJunio C Hamano <junkio@cox.net>
Sat, 21 Apr 2007 07:05:31 +0000 (00:05 -0700)
committerJunio C Hamano <junkio@cox.net>
Sat, 21 Apr 2007 07:05:31 +0000 (00:05 -0700)
ll_user_merge_tail is supposed to point at the pointer to be
updated to point at a newly created item.

Signed-off-by: Junio C Hamano <junkio@cox.net>
merge-recursive.c

index 96e461c73724b2fdb54aa3638b2a6dbcf390ccd7..3d395895fc8fe10fbaa778ad52e97d883b848cb7 100644 (file)
@@ -902,8 +902,9 @@ static int read_merge_config(const char *var, const char *value)
                namebuf[namelen] = 0;
                fn->name = namebuf;
                fn->fn = ll_ext_merge;
-               fn->next = *ll_user_merge_tail;
+               fn->next = NULL;
                *ll_user_merge_tail = fn;
+               ll_user_merge_tail = &(fn->next);
        }
 
        ep++;