Use warning function instead of fprintf(stderr, "Warning: ...").

Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Thiago Farina
2010-01-03 11:20:30 -05:00
committed by Junio C Hamano
parent b7fcb582e5
commit bd757c1859
4 changed files with 5 additions and 7 deletions

View File

@ -169,9 +169,7 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
* check both source and destination
*/
if (S_ISREG(st.st_mode) || S_ISLNK(st.st_mode)) {
fprintf(stderr, "Warning: %s;"
" will overwrite!\n",
bad);
warning("%s; will overwrite!", bad);
bad = NULL;
} else
bad = "Cannot overwrite";