summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2012-06-28 15:20:08 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2012-06-28 15:20:08 -0700
commit72fd7d82d7ff84343f8958f8450e35b6aa6ea80b (patch)
tree55b30051eb9f480f81e40ff6d5e119bfe87b1f48
parentMerge branch 'nd/exclude-workaround-top-heavy' (diff)
parentupdate-index: allow overwriting existing submodule index entries (diff)
downloadtgif-72fd7d82d7ff84343f8958f8450e35b6aa6ea80b.tar.xz
Merge branch 'hv/submodule-update-nuke-submodules'
"git add" allows adding a regular file to the path where a submodule used to exist, but "git update-index" does not allow an equivalent operation to Porcelain writers.
-rw-r--r--builtin/update-index.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/builtin/update-index.c b/builtin/update-index.c
index 5f038d64da..5a4e9ea55a 100644
--- a/builtin/update-index.c
+++ b/builtin/update-index.c
@@ -211,12 +211,6 @@ static int process_path(const char *path)
if (S_ISDIR(st.st_mode))
return process_directory(path, len, &st);
- /*
- * Process a regular file
- */
- if (ce && S_ISGITLINK(ce->ce_mode))
- return error("%s is already a gitlink, not replacing", path);
-
return add_one_path(ce, path, len, &st);
}