Merge branch 'sb/submodule-helper-list-signal-unmatch-via-exit-status'
The way how "submodule--helper list" signals unmatch error to its callers has been updated. * sb/submodule-helper-list-signal-unmatch-via-exit-status: submodule--helper: offer a consistent API
This commit is contained in:
commit
f6136f3c39
@ -287,10 +287,8 @@ static int module_list(int argc, const char **argv, const char *prefix)
|
|||||||
argc = parse_options(argc, argv, prefix, module_list_options,
|
argc = parse_options(argc, argv, prefix, module_list_options,
|
||||||
git_submodule_helper_usage, 0);
|
git_submodule_helper_usage, 0);
|
||||||
|
|
||||||
if (module_list_compute(argc, argv, prefix, &pathspec, &list) < 0) {
|
if (module_list_compute(argc, argv, prefix, &pathspec, &list) < 0)
|
||||||
printf("#unmatched\n");
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
|
||||||
|
|
||||||
for (i = 0; i < list.nr; i++) {
|
for (i = 0; i < list.nr; i++) {
|
||||||
const struct cache_entry *ce = list.entries[i];
|
const struct cache_entry *ce = list.entries[i];
|
||||||
|
@ -345,7 +345,10 @@ cmd_foreach()
|
|||||||
# command in the subshell (and a recursive call to this function)
|
# command in the subshell (and a recursive call to this function)
|
||||||
exec 3<&0
|
exec 3<&0
|
||||||
|
|
||||||
git submodule--helper list --prefix "$wt_prefix"|
|
{
|
||||||
|
git submodule--helper list --prefix "$wt_prefix" ||
|
||||||
|
echo "#unmatched"
|
||||||
|
} |
|
||||||
while read mode sha1 stage sm_path
|
while read mode sha1 stage sm_path
|
||||||
do
|
do
|
||||||
die_if_unmatched "$mode"
|
die_if_unmatched "$mode"
|
||||||
@ -453,7 +456,10 @@ cmd_deinit()
|
|||||||
die "$(eval_gettext "Use '--all' if you really want to deinitialize all submodules")"
|
die "$(eval_gettext "Use '--all' if you really want to deinitialize all submodules")"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
git submodule--helper list --prefix "$wt_prefix" "$@" |
|
{
|
||||||
|
git submodule--helper list --prefix "$wt_prefix" "$@" ||
|
||||||
|
echo "#unmatched"
|
||||||
|
} |
|
||||||
while read mode sha1 stage sm_path
|
while read mode sha1 stage sm_path
|
||||||
do
|
do
|
||||||
die_if_unmatched "$mode"
|
die_if_unmatched "$mode"
|
||||||
@ -1013,7 +1019,10 @@ cmd_status()
|
|||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
git submodule--helper list --prefix "$wt_prefix" "$@" |
|
{
|
||||||
|
git submodule--helper list --prefix "$wt_prefix" "$@" ||
|
||||||
|
echo "#unmatched"
|
||||||
|
} |
|
||||||
while read mode sha1 stage sm_path
|
while read mode sha1 stage sm_path
|
||||||
do
|
do
|
||||||
die_if_unmatched "$mode"
|
die_if_unmatched "$mode"
|
||||||
@ -1091,7 +1100,10 @@ cmd_sync()
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
cd_to_toplevel
|
cd_to_toplevel
|
||||||
git submodule--helper list --prefix "$wt_prefix" "$@" |
|
{
|
||||||
|
git submodule--helper list --prefix "$wt_prefix" "$@" ||
|
||||||
|
echo "#unmatched"
|
||||||
|
} |
|
||||||
while read mode sha1 stage sm_path
|
while read mode sha1 stage sm_path
|
||||||
do
|
do
|
||||||
die_if_unmatched "$mode"
|
die_if_unmatched "$mode"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user