commit - 67157248154a23138c2b7ff2eebecbdf3d079ef7
commit + e8eedebc88e40698d3d763e6f00601484d8cabf3
blob - 0fa63c3ef700e304d4e3c5950765ea9afd5d8a58
blob + e507bbb93de1346023e265fcae281efe13dd2ed5
--- include/diff_output.h
+++ include/diff_output.h
int diff_chunk_get_right_end(const struct diff_chunk *c,
const struct diff_result *r,
int context_lines);
+struct diff_chunk *diff_chunk_get(const struct diff_result *r, int chunk_idx);
+int diff_chunk_get_left_count(struct diff_chunk *c);
+int diff_chunk_get_right_count(struct diff_chunk *c);
void diff_chunk_context_get(struct diff_chunk_context *cc,
const struct diff_result *r,
int chunk_idx, int context_lines);
blob - f932658fe28ad7b69bca4ca743858921c1a27138
blob + 96cecead506011705d8c2e6b3e6c4487fee709a2
--- lib/diff_output_unidiff.c
+++ lib/diff_output_unidiff.c
int right_start = diff_chunk_get_right_start(c, r, 0);
return MIN(r->right->atoms.len,
right_start + c->right_count + context_lines);
+}
+
+struct diff_chunk *
+diff_chunk_get(const struct diff_result *r, int chunk_idx)
+{
+ return &r->chunks.head[chunk_idx];
+}
+
+int
+diff_chunk_get_left_count(struct diff_chunk *c)
+{
+ return c->left_count;
+}
+
+int
+diff_chunk_get_right_count(struct diff_chunk *c)
+{
+ return c->right_count;
}
void