Mercurial > hg > octave-lyh > gnulib-hg
changeset 9715:e87d8b41f0fe
Avoid generating no-op conflicts.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Mon, 18 Feb 2008 03:36:33 +0100 |
parents | 5122118a6300 |
children | 36b4016eb185 |
files | ChangeLog lib/git-merge-changelog.c |
diffstat | 2 files changed, 15 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-02-17 Bruno Haible <bruno@clisp.org> + + * lib/git-merge-changelog.c (main) [split_merged_entry]: Avoid + generating no-op conflicts. + 2008-02-17 Bruno Haible <bruno@clisp.org> Speed up by 10%.
--- a/lib/git-merge-changelog.c +++ b/lib/git-merge-changelog.c @@ -1257,7 +1257,8 @@ result_entries_pointers[k], changed_entry); } - else + else if (!entry_equals (ancestor_file.entries[i], + changed_entry)) { struct conflict *c = XMALLOC (struct conflict); c->num_old_entries = 1; @@ -1337,7 +1338,10 @@ } else { - struct conflict *c = XMALLOC (struct conflict); + struct conflict *c; + ASSERT (!entry_equals (ancestor_file.entries[i], + changed_entry)); + c = XMALLOC (struct conflict); c->num_old_entries = 1; c->old_entries = XNMALLOC (c->num_old_entries, struct entry *); @@ -1399,7 +1403,10 @@ } else { - struct conflict *c = XMALLOC (struct conflict); + struct conflict *c; + ASSERT (!entry_equals (ancestor_file.entries[i], + changed_entry)); + c = XMALLOC (struct conflict); c->num_old_entries = 1; c->old_entries = XNMALLOC (c->num_old_entries, struct entry *);