From 4a4cf9e821f604b79817bc37b475828f3fb8b0a4 Mon Sep 17 00:00:00 2001 From: Paul Tan Date: Thu, 18 Jun 2015 18:54:04 +0800 Subject: pull: check if in unresolved merge state Since d38a30d (Be more user-friendly when refusing to do something because of conflict., 2010-01-12), git-pull will error out with user-friendly advices if the user is in the middle of a merge or has unmerged files. Re-implement this behavior. While the "has unmerged files" case can be handled by die_resolve_conflict(), we introduce a new function die_conclude_merge() for printing a different error message for when there are no unmerged files but the merge has not been finished. Signed-off-by: Paul Tan Signed-off-by: Junio C Hamano --- advice.h | 1 + 1 file changed, 1 insertion(+) (limited to 'advice.h') diff --git a/advice.h b/advice.h index 5ecc6c154..b341a55ce 100644 --- a/advice.h +++ b/advice.h @@ -24,6 +24,7 @@ __attribute__((format (printf, 1, 2))) void advise(const char *advice, ...); int error_resolve_conflict(const char *me); extern void NORETURN die_resolve_conflict(const char *me); +void NORETURN die_conclude_merge(void); void detach_advice(const char *new_name); #endif /* ADVICE_H */ -- cgit v1.2.1