提交 dda26650 编写于 作者: J Junio C Hamano

Merge branch 'sb/diff-color-move-more'

Bugfix.

* sb/diff-color-move-more:
  diff: fix --color-moved-ws=allow-indentation-change
...@@ -980,9 +980,14 @@ static void pmb_advance_or_null_multi_match(struct diff_options *o, ...@@ -980,9 +980,14 @@ static void pmb_advance_or_null_multi_match(struct diff_options *o,
/* Carry the white space delta forward */ /* Carry the white space delta forward */
pmb[i]->next_line->wsd = pmb[i]->wsd; pmb[i]->next_line->wsd = pmb[i]->wsd;
pmb[i] = pmb[i]->next_line; pmb[i] = pmb[i]->next_line;
} else } else {
if (pmb[i]->wsd) {
free(pmb[i]->wsd->string);
FREE_AND_NULL(pmb[i]->wsd);
}
pmb[i] = NULL; pmb[i] = NULL;
} }
}
} }
static int shrink_potential_moved_blocks(struct moved_entry **pmb, static int shrink_potential_moved_blocks(struct moved_entry **pmb,
...@@ -1002,10 +1007,6 @@ static int shrink_potential_moved_blocks(struct moved_entry **pmb, ...@@ -1002,10 +1007,6 @@ static int shrink_potential_moved_blocks(struct moved_entry **pmb,
if (lp < pmb_nr && rp > -1 && lp < rp) { if (lp < pmb_nr && rp > -1 && lp < rp) {
pmb[lp] = pmb[rp]; pmb[lp] = pmb[rp];
if (pmb[rp]->wsd) {
free(pmb[rp]->wsd->string);
FREE_AND_NULL(pmb[rp]->wsd);
}
pmb[rp] = NULL; pmb[rp] = NULL;
rp--; rp--;
lp++; lp++;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册