move index_has_changes() from builtin/am.c to merge.c for reuse
index_has_changes() is a function we want to reuse outside of just am, making it also available for merge-recursive and merge-ort. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
eab3f2850e
commit
b101793c43
9
cache.h
9
cache.h
@ -608,6 +608,15 @@ extern int write_locked_index(struct index_state *, struct lock_file *lock, unsi
|
||||
extern int discard_index(struct index_state *);
|
||||
extern void move_index_extensions(struct index_state *dst, struct index_state *src);
|
||||
extern int unmerged_index(const struct index_state *);
|
||||
|
||||
/**
|
||||
* Returns 1 if the index differs from HEAD, 0 otherwise. When on an unborn
|
||||
* branch, returns 1 if there are entries in the index, 0 otherwise. If an
|
||||
* strbuf is provided, the space-separated list of files that differ will be
|
||||
* appended to it.
|
||||
*/
|
||||
extern int index_has_changes(struct strbuf *sb);
|
||||
|
||||
extern int verify_path(const char *path);
|
||||
extern int strcmp_offset(const char *s1, const char *s2, size_t *first_change);
|
||||
extern int index_dir_exists(struct index_state *istate, const char *name, int namelen);
|
||||
|
||||
Reference in New Issue
Block a user