Commit Diff


commit - d0f874e072cfb4119033a71b9f162ae02eca44ab
commit + 3db5a0afedc4111bd9721c0e5229cd217202ac84
blob - e2f352bf17421cfdc1dd349b9740f53d91599b2e
blob + d2568c5a2b50315f0fc86e4ba7317ee47738985a
--- lib/diff_output.h
+++ lib/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)