interplane.Get Omega
Read in your language

git

[Ported from github.com/git/git] Sync with Git 2.56.1

Brought by drakestapleton

branch master Branches Tags History

git / line-log.h

53 lines · 1605 bytes Raw Blame History
1#ifndef LINE_LOG_H
2#define LINE_LOG_H
3
4#include "diffcore.h" /* struct range, struct range_set */
5
6struct rev_info;
7struct commit;
8struct string_list;
9
10/* A diff, encoded as the set of pre- and post-image ranges where the
11 * files differ. A pair of ranges corresponds to a hunk. */
12struct diff_ranges {
13 struct range_set parent;
14 struct range_set target;
15};
16
17void range_set_init(struct range_set *, size_t prealloc);
18void range_set_release(struct range_set *);
19/* Range includes start; excludes end */
20void range_set_append_unsafe(struct range_set *, long start, long end);
21/* New range must begin at or after end of last added range */
22void range_set_append(struct range_set *, long start, long end);
23/*
24 * In-place pass of sorting and merging the ranges in the range set,
25 * to sort and make the ranges disjoint.
26 */
27void sort_and_merge_range_set(struct range_set *);
28
29/* Linked list of interesting files and their associated ranges. The
30 * list must be kept sorted by path.
31 *
32 * For simplicity, even though this is highly redundant, each
33 * line_log_data owns its 'path'.
34 */
35struct line_log_data {
36 struct line_log_data *next;
37 char *path;
38 struct range_set ranges;
39 struct diff_filepair *pair;
40 struct diff_ranges diff;
41};
42
43void line_log_init(struct rev_info *rev, const char *prefix, struct string_list *args);
44
45int line_log_filter(struct rev_info *rev);
46int line_log_process_ranges_arbitrary_commit(struct rev_info *rev,
47 struct commit *commit);
48
49void line_log_queue_pairs(struct rev_info *rev, struct commit *commit);
50
51void line_log_free(struct rev_info *rev);
52
53#endif /* LINE_LOG_H */