}
if (minus_begin != minus_end) {
fn_out_diff_words_write_helper(diff_words->opt,
}
if (minus_begin != minus_end) {
fn_out_diff_words_write_helper(diff_words->opt,
minus_end - minus_begin, minus_begin);
}
if (plus_begin != plus_end) {
fn_out_diff_words_write_helper(diff_words->opt,
minus_end - minus_begin, minus_begin);
}
if (plus_begin != plus_end) {
fn_out_diff_words_write_helper(diff_words->opt,
emit_diff_symbol(diff_words->opt, DIFF_SYMBOL_WORD_DIFF,
line_prefix, strlen(line_prefix), 0);
fn_out_diff_words_write_helper(diff_words->opt,
emit_diff_symbol(diff_words->opt, DIFF_SYMBOL_WORD_DIFF,
line_prefix, strlen(line_prefix), 0);
fn_out_diff_words_write_helper(diff_words->opt,
diff_words->minus.text.size,
diff_words->minus.text.ptr);
diff_words->minus.text.size = 0;
diff_words->minus.text.size,
diff_words->minus.text.ptr);
diff_words->minus.text.size = 0;
- st->old.color = diff_get_color_opt(o, DIFF_FILE_OLD);
- st->new.color = diff_get_color_opt(o, DIFF_FILE_NEW);
+ st->old_word.color = diff_get_color_opt(o, DIFF_FILE_OLD);
+ st->new_word.color = diff_get_color_opt(o, DIFF_FILE_NEW);
struct strbuf name = STRBUF_INIT;
int pfx_length, sfx_length;
int pfx_adjust_for_slash;
struct strbuf name = STRBUF_INIT;
int pfx_length, sfx_length;
int pfx_adjust_for_slash;
- while (a + pfx_length - pfx_adjust_for_slash <= old &&
- b + pfx_length - pfx_adjust_for_slash <= new &&
- *old == *new) {
- if (*old == '/')
- sfx_length = len_a - (old - a);
- old--;
- new--;
+ while (a + pfx_length - pfx_adjust_for_slash <= old_name &&
+ b + pfx_length - pfx_adjust_for_slash <= new_name &&
+ *old_name == *new_name) {
+ if (*old_name == '/')
+ sfx_length = len_a - (old_name - a);
+ old_name--;
+ new_name--;