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:
parent
b7fcb582e5
commit
bd757c1859
4
bisect.c
4
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 *bad_hex = sha1_to_hex(current_bad_sha1);
|
||||||
char *good_hex = join_sha1_array_hex(&good_revs, ' ');
|
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"
|
"must be skipped.\n"
|
||||||
"So we cannot be sure the first bad commit is "
|
"So we cannot be sure the first bad commit is "
|
||||||
"between %s and %s.\n"
|
"between %s and %s.\n"
|
||||||
"We continue anyway.\n",
|
"We continue anyway.",
|
||||||
bad_hex, good_hex, mb_hex, bad_hex);
|
bad_hex, good_hex, mb_hex, bad_hex);
|
||||||
free(good_hex);
|
free(good_hex);
|
||||||
}
|
}
|
||||||
|
@ -169,9 +169,7 @@ int cmd_mv(int argc, const char **argv, const char *prefix)
|
|||||||
* check both source and destination
|
* check both source and destination
|
||||||
*/
|
*/
|
||||||
if (S_ISREG(st.st_mode) || S_ISLNK(st.st_mode)) {
|
if (S_ISREG(st.st_mode) || S_ISLNK(st.st_mode)) {
|
||||||
fprintf(stderr, "Warning: %s;"
|
warning("%s; will overwrite!", bad);
|
||||||
" will overwrite!\n",
|
|
||||||
bad);
|
|
||||||
bad = NULL;
|
bad = NULL;
|
||||||
} else
|
} else
|
||||||
bad = "Cannot overwrite";
|
bad = "Cannot overwrite";
|
||||||
|
2
http.c
2
http.c
@ -1244,7 +1244,7 @@ int finish_http_object_request(struct http_object_request *freq)
|
|||||||
process_http_object_request(freq);
|
process_http_object_request(freq);
|
||||||
|
|
||||||
if (freq->http_code == 416) {
|
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) {
|
} else if (freq->curl_result != CURLE_OK) {
|
||||||
if (stat(freq->tmpfile, &st) == 0)
|
if (stat(freq->tmpfile, &st) == 0)
|
||||||
if (st.st_size == 0)
|
if (st.st_size == 0)
|
||||||
|
@ -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 "merge base must be tested" my_bisect_log.txt &&
|
||||||
grep $HASH4 my_bisect_log.txt &&
|
grep $HASH4 my_bisect_log.txt &&
|
||||||
git bisect skip > my_bisect_log.txt 2>&1 &&
|
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 &&
|
grep $SIDE_HASH6 my_bisect_log.txt &&
|
||||||
git bisect reset
|
git bisect reset
|
||||||
'
|
'
|
||||||
|
Loading…
Reference in New Issue
Block a user