Skip to content

Commit 70def2c

Browse files
committed
Merge branch 'rj/add-chmod-error-message' into maint
Message fix. * rj/add-chmod-error-message: builtin/add: add detail to a 'cannot chmod' error message
2 parents 822a4d4 + 1e22a99 commit 70def2c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

builtin/add.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ struct update_callback_data {
3232
int add_errors;
3333
};
3434

35-
static void chmod_pathspec(struct pathspec *pathspec, int force_mode)
35+
static void chmod_pathspec(struct pathspec *pathspec, char flip)
3636
{
3737
int i;
3838

@@ -42,8 +42,8 @@ static void chmod_pathspec(struct pathspec *pathspec, int force_mode)
4242
if (pathspec && !ce_path_match(ce, pathspec, NULL))
4343
continue;
4444

45-
if (chmod_cache_entry(ce, force_mode) < 0)
46-
fprintf(stderr, "cannot chmod '%s'", ce->name);
45+
if (chmod_cache_entry(ce, flip) < 0)
46+
fprintf(stderr, "cannot chmod %cx '%s'\n", flip, ce->name);
4747
}
4848
}
4949

0 commit comments

Comments
 (0)