builtin-checkout: use warning() instead of fprintf(stderr, "warning: ")
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
eca2a8f023
commit
f198e21849
@ -558,8 +558,8 @@ static int switch_branches(struct checkout_opts *opts, struct branch_info *new)
|
|||||||
|
|
||||||
if (!old.commit && !opts->force) {
|
if (!old.commit && !opts->force) {
|
||||||
if (!opts->quiet) {
|
if (!opts->quiet) {
|
||||||
fprintf(stderr, "warning: You appear to be on a branch yet to be born.\n");
|
warning("You appear to be on a branch yet to be born.");
|
||||||
fprintf(stderr, "warning: Forcing checkout of %s.\n", new->name);
|
warning("Forcing checkout of %s.", new->name);
|
||||||
}
|
}
|
||||||
opts->force = 1;
|
opts->force = 1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user