git-push: fix an advice message so it goes to stderr
authorLarry D'Anna <larry@elder-gods.org>
Sat, 27 Feb 2010 04:52:13 +0000 (23:52 -0500)
committerJunio C Hamano <gitster@pobox.com>
Sun, 28 Feb 2010 18:39:27 +0000 (10:39 -0800)
These sort of messages typically go to the standard error.

Signed-off-by: Larry D'Anna <larry@elder-gods.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
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;