aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThiago Farina <tfransosi@gmail.com>2010-01-03 11:20:30 -0500
committerJunio C Hamano <gitster@pobox.com>2010-01-03 16:17:03 -0800
commitbd757c18597789d4f01cbd2ffc7c1f55e90cfcd0 (patch)
tree45b5546f930e9f3836637f996bb3d4c39ca80e9f
parentb7fcb582e53cf2b3600263afa08cf4dce49a13f7 (diff)
downloadgit-bd757c18597789d4f01cbd2ffc7c1f55e90cfcd0.tar.gz
git-bd757c18597789d4f01cbd2ffc7c1f55e90cfcd0.tar.xz
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>
-rw-r--r--bisect.c4
-rw-r--r--builtin-mv.c4
-rw-r--r--http.c2
-rwxr-xr-xt/t6030-bisect-porcelain.sh2
4 files changed, 5 insertions, 7 deletions
diff --git a/bisect.c b/bisect.c
index dc18db8af..f1a1f84aa 100644
--- a/bisect.c
+++ b/bisect.c
@@ -813,11 +813,11 @@ static void handle_skipped_merge_base(const unsigned char *mb)
char *bad_hex = sha1_to_hex(current_bad_sha1);
char *good_hex = join_sha1_array_hex(&good_revs, ' ');
- fprintf(stderr, "Warning: the merge base between %s and [%s] "
+ warning("the merge base between %s and [%s] "
"must be skipped.\n"
"So we cannot be sure the first bad commit is "
"between %s and %s.\n"
- "We continue anyway.\n",
+ "We continue anyway.",
bad_hex, good_hex, mb_hex, bad_hex);
free(good_hex);
}
diff --git a/builtin-mv.c b/builtin-mv.c
index f633d8142..82471869a 100644
--- a/builtin-mv.c
+++ b/builtin-mv.c
@@ -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";
diff --git a/http.c b/http.c
index ed6414a2a..455732fb2 100644
--- a/http.c
+++ b/http.c
@@ -1244,7 +1244,7 @@ int finish_http_object_request(struct http_object_request *freq)
process_http_object_request(freq);
if (freq->http_code == 416) {
- fprintf(stderr, "Warning: requested range invalid; we may already have all the data.\n");
+ warning("requested range invalid; we may already have all the data.");
} else if (freq->curl_result != CURLE_OK) {
if (stat(freq->tmpfile, &st) == 0)
if (st.st_size == 0)
diff --git a/t/t6030-bisect-porcelain.sh b/t/t6030-bisect-porcelain.sh
index def397c53..c51865fdb 100755
--- a/t/t6030-bisect-porcelain.sh
+++ b/t/t6030-bisect-porcelain.sh
@@ -423,7 +423,7 @@ test_expect_success 'skipped merge base when good and bad are siblings' '
grep "merge base must be tested" my_bisect_log.txt &&
grep $HASH4 my_bisect_log.txt &&
git bisect skip > my_bisect_log.txt 2>&1 &&
- grep "Warning" my_bisect_log.txt &&
+ grep "warning" my_bisect_log.txt &&
grep $SIDE_HASH6 my_bisect_log.txt &&
git bisect reset
'