Merge branch 'hv/submodule-update-nuke-submodules' into maint
authorJunio C Hamano <gitster@pobox.com>
Wed, 11 Jul 2012 19:46:31 +0000 (12:46 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 11 Jul 2012 19:46:31 +0000 (12:46 -0700)
"git add" allows adding a regular file to the path where a submodule
used to exist, but "git update-index" did not allow an equivalent
operation to Porcelain writers.

* hv/submodule-update-nuke-submodules:
update-index: allow overwriting existing submodule index entries

builtin/update-index.c
index 5f038d64da38820ebaa73ff73d1082e17c3c80d2..5a4e9ea55a10afe2eb0f6e138cb7fce1ef74393f 100644 (file)
@@ -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);
 }