From: Junio C Hamano Date: Tue, 22 Aug 2017 17:29:10 +0000 (-0700) Subject: Merge branch 'rj/add-chmod-error-message' X-Git-Tag: v2.15.0-rc0~166 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/a75ef3ff99a5a916e5211f38134e3f5a78c08a5e?hp=e45bbfc584afbef6b8a00eddbe17dc99d4c6c426 Merge branch 'rj/add-chmod-error-message' Message fix. * rj/add-chmod-error-message: builtin/add: add detail to a 'cannot chmod' error message --- diff --git a/builtin/add.c b/builtin/add.c index e888fb8c5f..5d5773d5cd 100644 --- a/builtin/add.c +++ b/builtin/add.c @@ -32,7 +32,7 @@ struct update_callback_data { int add_errors; }; -static void chmod_pathspec(struct pathspec *pathspec, int force_mode) +static void chmod_pathspec(struct pathspec *pathspec, char flip) { int i; @@ -42,8 +42,8 @@ static void chmod_pathspec(struct pathspec *pathspec, int force_mode) if (pathspec && !ce_path_match(ce, pathspec, NULL)) continue; - if (chmod_cache_entry(ce, force_mode) < 0) - fprintf(stderr, "cannot chmod '%s'", ce->name); + if (chmod_cache_entry(ce, flip) < 0) + fprintf(stderr, "cannot chmod %cx '%s'\n", flip, ce->name); } }