Merge branch 'hv/submodule-update-nuke-submodules'
authorJunio C Hamano <gitster@pobox.com>
Thu, 28 Jun 2012 22:20:08 +0000 (15:20 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 28 Jun 2012 22:20:08 +0000 (15:20 -0700)
"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.

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);
 }