1 /* Copyright (c) 2006-2015 Jonas Fonseca <jonas.fonseca@gmail.com>
3 * This program is free software; you can redistribute it and/or
4 * modify it under the terms of the GNU General Public License as
5 * published by the Free Software Foundation; either version 2 of
6 * the License, or (at your option) any later version.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
19 typedef char repo_ref
[SIZEOF_REF
];
20 typedef char repo_rev
[SIZEOF_REV
];
21 typedef char repo_str
[SIZEOF_STR
];
23 #define REPO_INFO(_) \
25 _(repo_rev, head_id) \
29 _(repo_str, git_dir) \
30 _(bool, is_inside_work_tree)
32 #define REPO_INFO_FIELDS(type, name) type name;
35 REPO_INFO(REPO_INFO_FIELDS
)
38 extern struct repo_info repo
;
40 enum status_code
load_repo_info(void);
41 enum status_code
load_repo_head(void);
49 bool index_diff(struct index_diff
*diff
, bool untracked
, bool count_all
);
50 bool update_index(void);
53 /* vim: set ts=8 sw=8 noexpandtab: */