Commit Diff


commit - 1dce05e8f99e9ab3e9229bf59e061ad0201a08e8
commit + f26db7cd2804ebc6a3f81e7e00e008450eb42228
blob - e2f352bf17421cfdc1dd349b9740f53d91599b2e
blob + d2568c5a2b50315f0fc86e4ba7317ee47738985a
--- include/diff_output.h
+++ include/diff_output.h
@@ -74,6 +74,8 @@ int diff_chunk_get_right_start(const struct diff_chunk
 int diff_chunk_get_right_end(const struct diff_chunk *c,
 			     const struct diff_result *r,
 			     int context_lines);
+off_t diff_chunk_get_left_start_pos(const struct diff_chunk *c);
+off_t diff_chunk_get_right_start_pos(const struct diff_chunk *c);
 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);
blob - b20dabf6658691770d21bfe3c1227ae815223474
blob + 4757099644a9c1eec21e1af9102ba13ba417d609
--- lib/diff_output_unidiff.c
+++ lib/diff_output_unidiff.c
@@ -29,6 +29,18 @@
 
 #include "diff_internal.h"
 #include "diff_debug.h"
+
+off_t
+diff_chunk_get_left_start_pos(const struct diff_chunk *c)
+{
+	return c->left_start->pos;
+}
+
+off_t
+diff_chunk_get_right_start_pos(const struct diff_chunk *c)
+{
+	return c->right_start->pos;
+}
 
 bool
 diff_chunk_context_empty(const struct diff_chunk_context *cc)