path: root/advice.h
diff options
authorRamkumar Ramachandra <>2011-08-04 10:38:59 (GMT)
committerJunio C Hamano <>2011-08-04 22:40:41 (GMT)
commit38ef61cfde8aea0864e898d37ce3213a5771c59e (patch)
tree154072130363764b1b02265ea54e48b485588a11 /advice.h
parent13b70d2ad96a79fb439c6b4fc0e8058b1762bae2 (diff)
advice: Introduce error_resolve_conflict
Enable future callers to report a conflict and not die immediately by introducing a new function called error_resolve_conflict. Re-implement die_resolve_conflict as a call to error_resolve_conflict followed by a call to die. Consequently, the message printed by die_resolve_conflict changes from fatal: 'commit' is not possible because you have unmerged files. Please, fix them up in the work tree ... ... to error: 'commit' is not possible because you have unmerged files. hint: Fix them up in the work tree ... hint: ... fatal: Exiting because of an unresolved conflict. Hints are printed using the same advise function introduced in v1.7.3-rc0~26^2~3 (Introduce advise() to print hints, 2010-08-11). Inspired-by: Christian Couder <> Helped-by: Jonathan Nieder <> Reviewed-by: Jonathan Nieder <> Signed-off-by: Ramkumar Ramachandra <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'advice.h')
1 files changed, 2 insertions, 1 deletions
diff --git a/advice.h b/advice.h
index 3244ebb..e5d0af7 100644
--- a/advice.h
+++ b/advice.h
@@ -11,7 +11,8 @@ extern int advice_implicit_identity;
extern int advice_detached_head;
int git_default_advice_config(const char *var, const char *value);
+void advise(const char *advice, ...);
+int error_resolve_conflict(const char *me);
extern void NORETURN die_resolve_conflict(const char *me);
#endif /* ADVICE_H */