summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-08-22 17:29:10 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-08-22 17:29:10 (GMT)
commita75ef3ff99a5a916e5211f38134e3f5a78c08a5e (patch)
treebf899e1b710148633015b0fbec6697de2c7b9c9d /builtin
parente45bbfc584afbef6b8a00eddbe17dc99d4c6c426 (diff)
parent1e22a9917b48809a1825f79c66e58e9b1b1da08a (diff)
downloadgit-a75ef3ff99a5a916e5211f38134e3f5a78c08a5e.zip
git-a75ef3ff99a5a916e5211f38134e3f5a78c08a5e.tar.gz
git-a75ef3ff99a5a916e5211f38134e3f5a78c08a5e.tar.bz2
Merge branch 'rj/add-chmod-error-message'
Message fix. * rj/add-chmod-error-message: builtin/add: add detail to a 'cannot chmod' error message
Diffstat (limited to 'builtin')
-rw-r--r--builtin/add.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin/add.c b/builtin/add.c
index e888fb8..5d5773d 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);
}
}