mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-29 18:38:58 +00:00
status: Document submodule TODOs
This commit is contained in:
parent
bf0107d1ec
commit
4ea79a9d6e
27
src/status.c
27
src/status.c
@ -226,8 +226,12 @@ static int process_folder(
|
|||||||
/* No op */
|
/* No op */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case GIT_OBJ_COMMIT:
|
||||||
|
/* TODO: proper submodule support */
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
error = git__throw(GIT_EINVALIDTYPE, "Unexpected tree entry type"); /* TODO: How should we deal with submodules? */
|
return git__throw(GIT_EINVALIDTYPE, "Unexpected tree entry type");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -246,8 +250,9 @@ static int process_folder(
|
|||||||
git_ignore__free(st->ignores);
|
git_ignore__free(st->ignores);
|
||||||
st->ignores = old_ignores;
|
st->ignores = old_ignores;
|
||||||
}
|
}
|
||||||
} else
|
} else {
|
||||||
error = dirent_cb(st, NULL);
|
error = dirent_cb(st, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
if (tree_entry_type == GIT_OBJ_TREE) {
|
if (tree_entry_type == GIT_OBJ_TREE) {
|
||||||
git_object_free(subtree);
|
git_object_free(subtree);
|
||||||
@ -320,19 +325,19 @@ static int determine_status(
|
|||||||
return store_if_changed(st, e);
|
return store_if_changed(st, e);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Last option, we're dealing with a leftover folder tree entry */
|
/* Are we dealing with a subtree? */
|
||||||
if (tree_entry_type == GIT_OBJ_TREE) {
|
if (tree_entry_type == GIT_OBJ_TREE) {
|
||||||
assert(in_head && !in_index && !in_workdir);
|
assert(in_head && !in_index && !in_workdir);
|
||||||
return process_folder(st, tree_entry, full_path, path_type);
|
return process_folder(st, tree_entry, full_path, path_type);
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
/* skip anything else we found (such as a submodule) */
|
/* We're dealing with something else -- most likely a submodule;
|
||||||
if (in_head)
|
* skip it for now */
|
||||||
st->tree_position++;
|
if (in_head)
|
||||||
if (in_index)
|
st->tree_position++;
|
||||||
st->index_position++;
|
if (in_index)
|
||||||
return GIT_SUCCESS;
|
st->index_position++;
|
||||||
}
|
return GIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int path_type_from(git_buf *full_path, int is_dir)
|
static int path_type_from(git_buf *full_path, int is_dir)
|
||||||
|
Loading…
Reference in New Issue
Block a user