builtin/add: add detail to a 'cannot chmod' error message
In addition to adding the missing newline, add the x-ecutable bit 'mode change' character to the error message. This message now has the same form as similar messages output by 'update-index'. Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
610d55af0f
commit
1e22a9917b
@ -30,7 +30,7 @@ struct update_callback_data {
|
|||||||
int add_errors;
|
int add_errors;
|
||||||
};
|
};
|
||||||
|
|
||||||
static void chmod_pathspec(struct pathspec *pathspec, int force_mode)
|
static void chmod_pathspec(struct pathspec *pathspec, char flip)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
@ -40,8 +40,8 @@ static void chmod_pathspec(struct pathspec *pathspec, int force_mode)
|
|||||||
if (pathspec && !ce_path_match(ce, pathspec, NULL))
|
if (pathspec && !ce_path_match(ce, pathspec, NULL))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (chmod_cache_entry(ce, force_mode) < 0)
|
if (chmod_cache_entry(ce, flip) < 0)
|
||||||
fprintf(stderr, "cannot chmod '%s'", ce->name);
|
fprintf(stderr, "cannot chmod %cx '%s'\n", flip, ce->name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user