git-push: fix an advice message so it goes to stderr
[gitweb.git] / builtin-push.c
index 5633f0ade49f7c845665b7aab202be18a8cc9d8d..0a270726982c73538cc72b5c3e6e072b379f00fb 100644 (file)
@@ -124,9 +124,9 @@ static int push_with_options(struct transport *transport, int flags)
                return 0;
 
        if (nonfastforward && advice_push_nonfastforward) {
-               printf("To prevent you from losing history, non-fast-forward updates were rejected\n"
-                      "Merge the remote changes before pushing again.  See the 'Note about\n"
-                      "fast-forwards' section of 'git push --help' for details.\n");
+               fprintf(stderr, "To prevent you from losing history, non-fast-forward updates were rejected\n"
+                               "Merge the remote changes before pushing again.  See the 'Note about\n"
+                               "fast-forwards' section of 'git push --help' for details.\n");
        }
 
        return 1;