-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdiff.h
More file actions
21 lines (17 loc) · 701 Bytes
/
diff.h
File metadata and controls
21 lines (17 loc) · 701 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#ifndef DIFF_H
#define DIFF_H
// Diff statistics for a single file
typedef struct {
char* filepath; // File path relative to repo root
int added; // Lines added
int removed; // Lines removed
const char* lang; // Language name (from language detection)
} DiffFileStats;
// Get list of changed files between two commits
// Returns array of DiffFileStats, sets n_files count
// Caller must free returned array with diff_free_files()
DiffFileStats* diff_get_files(const char* repo_path, const char* commit1, const char* commit2,
int* n_files);
// Free diff file stats array
void diff_free_files(DiffFileStats* files, int n_files);
#endif