git/resolve-undo.h
Junio C Hamano 4421a82357 resolve-undo: "checkout -m path" uses resolve-undo information
Once you resolved conflicts by "git add path", you cannot recreate the
conflicted state with "git checkout -m path", because you lost information
from higher stages in the index when you resolved them.

Since we record the necessary information in the resolve-undo index
extension these days, we can reproduce the unmerged state in the index and
check it out.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2009-12-25 17:10:10 -08:00

17 lines
540 B
C

#ifndef RESOLVE_UNDO_H
#define RESOLVE_UNDO_H
struct resolve_undo_info {
unsigned int mode[3];
unsigned char sha1[3][20];
};
extern void record_resolve_undo(struct index_state *, struct cache_entry *);
extern void resolve_undo_write(struct strbuf *, struct string_list *);
extern struct string_list *resolve_undo_read(void *, unsigned long);
extern void resolve_undo_clear_index(struct index_state *);
extern int unmerge_index_entry_at(struct index_state *, int);
extern void unmerge_index(struct index_state *, const char **);
#endif