init_tree_desc(&trees[0], &tree->object.oid,
tree->buffer, tree->size);
if (parse_tree(new_tree) < 0)
- exit(128);
+ die(NULL);
tree = new_tree;
init_tree_desc(&trees[1], &tree->object.oid,
tree->buffer, tree->size);
work,
old_tree);
if (ret < 0)
- exit(128);
+ die(NULL);
ret = reset_tree(new_tree,
opts, 0,
writeout_error, new_branch_info);
char *displaypath;
if (validate_submodule_path(path) < 0)
- exit(128);
+ die(NULL);
displaypath = get_submodule_displaypath(path, info->prefix,
info->super_prefix);
};
if (validate_submodule_path(path) < 0)
- exit(128);
+ die(NULL);
if (!submodule_from_path(the_repository, null_oid(the_hash_algo), path))
die(_("no submodule mapping found in .gitmodules for path '%s'"),
return;
if (validate_submodule_path(path) < 0)
- exit(128);
+ die(NULL);
sub = submodule_from_path(the_repository, null_oid(the_hash_algo), path);
char *sub_git_dir = xstrfmt("%s/.git", path);
if (validate_submodule_path(path) < 0)
- exit(128);
+ die(NULL);
sub = submodule_from_path(the_repository, null_oid(the_hash_algo), path);
char *to_free = NULL;
if (validate_submodule_path(clone_data_path) < 0)
- exit(128);
+ die(NULL);
if (!is_absolute_path(clone_data->path))
clone_data_path = to_free = xstrfmt("%s/%s", repo_get_work_tree(the_repository),
strip_dir_trailing_slashes(add_data.sm_path);
if (validate_submodule_path(add_data.sm_path) < 0)
- exit(128);
+ die(NULL);
die_on_index_match(add_data.sm_path, force);
die_on_repo_without_commits(add_data.sm_path);
static void die_message_builtin(const char *err, va_list params)
{
+ if (!err)
+ return;
trace2_cmd_error_va(err, params);
vreportf(_("fatal: "), err, params);
}