-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbeargit.h
27 lines (22 loc) · 797 Bytes
/
beargit.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include "util.h"
int beargit_init(void);
int beargit_add(const char* filename);
int beargit_rm(const char* filename);
int beargit_commit(const char* message);
int beargit_status();
int beargit_log(int limit);
int beargit_branch();
int beargit_checkout(const char* arg, int new_branch);
int beargit_reset(const char* commit_id, const char* filename);
int beargit_merge(const char* arg);
// Helper functions
int get_branch_number(const char* branch_name);
void next_commit_id(char* commit_id);
// Number of bytes in a commit id
#define COMMIT_ID_BYTES SHA_HEX_BYTES
// Preprocessor macros capturing the maximum size of different structures
#define FILENAME_SIZE 512
#define COMMIT_ID_SIZE (COMMIT_ID_BYTES+1)
#define MSG_SIZE 512
#define BRANCHNAME_SIZE 128
#define COMMIT_ID_BRANCH_BYTES 10