mirror of
https://git.proxmox.com/git/libgit2
synced 2025-12-26 19:42:35 +00:00
Convert status assert to skip file
When status encounters a submodule, right now it is asserting. This changes it to just skip the file that it can't deal with.
This commit is contained in:
parent
279afd2a51
commit
5d3cd4e309
14
src/status.c
14
src/status.c
@ -321,8 +321,18 @@ static int determine_status(
|
||||
}
|
||||
|
||||
/* Last option, we're dealing with a leftover folder tree entry */
|
||||
assert(in_head && !in_index && !in_workdir && (tree_entry_type == GIT_OBJ_TREE));
|
||||
return process_folder(st, tree_entry, full_path, path_type);
|
||||
if (tree_entry_type == GIT_OBJ_TREE) {
|
||||
assert(in_head && !in_index && !in_workdir);
|
||||
return process_folder(st, tree_entry, full_path, path_type);
|
||||
}
|
||||
else {
|
||||
/* skip anything else we found (such as a submodule) */
|
||||
if (in_head)
|
||||
st->tree_position++;
|
||||
if (in_index)
|
||||
st->index_position++;
|
||||
return GIT_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
static int path_type_from(git_buf *full_path, int is_dir)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user