]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin-push.c
push: make non-fast-forward help message configurable
[thirdparty/git.git] / builtin-push.c
index 787011f928556972b287ca5621a5d462cd6e2543..6eda372a55ec72e1a26119ffdff0dd69456bdcf5 100644 (file)
@@ -157,7 +157,7 @@ static int do_push(const char *repo, int flags)
                        continue;
 
                error("failed to push some refs to '%s'", url[i]);
-               if (nonfastforward) {
+               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 'non-fast forward'\n"
                               "section of 'git push --help' for details.\n");