path: root/builtin/reset.c
diff options
authorJunio C Hamano <>2017-08-27 05:55:07 (GMT)
committerJunio C Hamano <>2017-08-27 05:55:08 (GMT)
commit614ea03a71e6b5281d7fce9f073c091772145047 (patch)
treedfe5f0632a92d2da1d0457dc8e5824ef8f065829 /builtin/reset.c
parent2adb614902ca4dbf085b880ee5bcfea8c2dafb08 (diff)
parent557a5998df19faf8641acfc5b6b1c3c2ba64dca9 (diff)
Merge branch 'bw/submodule-config-cleanup'
Code clean-up to avoid mixing values read from the .gitmodules file and values read from the .git/config file. * bw/submodule-config-cleanup: submodule: remove gitmodules_config unpack-trees: improve loading of .gitmodules submodule-config: lazy-load a repository's .gitmodules file submodule-config: move submodule-config functions to submodule-config.c submodule-config: remove support for overlaying repository config diff: stop allowing diff to have submodules configured in .git/config submodule: remove submodule_config callback routine unpack-trees: don't respect submodule.update submodule: don't rely on overlayed config when setting diffopts fetch: don't overlay config with submodule-config submodule--helper: don't overlay config in update-clone submodule--helper: don't overlay config in remote_submodule_branch add, reset: ensure submodules can be added or reset submodule: don't use submodule_from_name t7411: check configuration parsing errors
Diffstat (limited to 'builtin/reset.c')
1 files changed, 1 insertions, 2 deletions
diff --git a/builtin/reset.c b/builtin/reset.c
index 4a02d74..d72c7d1 100644
--- a/builtin/reset.c
+++ b/builtin/reset.c
@@ -156,6 +156,7 @@ static int read_from_tree(const struct pathspec *pathspec,
opt.output_format = DIFF_FORMAT_CALLBACK;
opt.format_callback = update_index_from_diff;
opt.format_callback_data = &intent_to_add;
if (do_diff_cache(tree_oid, &opt))
return 1;
@@ -308,8 +309,6 @@ int cmd_reset(int argc, const char **argv, const char *prefix)
parse_args(&pathspec, argv, prefix, patch_mode, &rev);
- load_submodule_cache();
unborn = !strcmp(rev, "HEAD") && get_oid("HEAD", &oid);
if (unborn) {
/* reset on unborn branch: treat as reset to empty tree */