This error message is intended for humans, so mark it for translation.
Also use error() instead of fprintf(stderr, ...), to make the
corresponding line a bit cleaner, and to display the "error:" prefix,
which helps classifying the nature/severity of the message.
Signed-off-by: Matheus Tavares <matheus.bernardino@usp.br>
Reviewed-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
err = S_ISREG(ce->ce_mode) ? 0 : -1;
if (err < 0)
- fprintf(stderr, "cannot chmod %cx '%s'\n", flip, ce->name);
+ error(_("cannot chmod %cx '%s'"), flip, ce->name);
}
}
git reset --hard &&
test_ln_s_add foo foo4 &&
git add --chmod=+x --dry-run foo4 2>stderr &&
- grep "cannot chmod +x .foo4." stderr
+ test_i18ngrep "cannot chmod +x .foo4." stderr
'
test_expect_success 'git add --chmod --dry-run reports error for unmatched pathspec' '