fetch and pull: learn --progress
[gitweb.git] / ident.c
diff --git a/ident.c b/ident.c
index d4f614543deddd12ed58fb1db98fe523fb4df6ce..9e2438826dfce158e04549933d5c588dd6abcf5c 100644 (file)
--- a/ident.c
+++ b/ident.c
@@ -203,7 +203,7 @@ const char *fmt_ident(const char *name, const char *email,
 
                if ((warn_on_no_name || error_on_no_name) &&
                    name == git_default_name && env_hint) {
-                       fprintf(stderr, env_hint);
+                       fputs(env_hint, stderr);
                        env_hint = NULL; /* warn only once */
                }
                if (error_on_no_name)
@@ -259,3 +259,12 @@ const char *git_committer_info(int flag)
                         getenv("GIT_COMMITTER_DATE"),
                         flag);
 }
+
+int user_ident_sufficiently_given(void)
+{
+#ifndef WINDOWS
+       return (user_ident_explicitly_given & IDENT_MAIL_GIVEN);
+#else
+       return (user_ident_explicitly_given == IDENT_ALL_GIVEN);
+#endif
+}