Skip to content

Commit

Permalink
Merge branch 'hv/submodule-update-nuke-submodules' into maint
Browse files Browse the repository at this point in the history
"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
  • Loading branch information
Junio C Hamano committed Jul 11, 2012
2 parents 95c9eb8 + 242f55f commit a101eb4
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions builtin/update-index.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit a101eb4

Please sign in to comment.