Junio C Hamano wrote:
Maybe "git add" should internally use ADD_CACHE_OK_TO_REPLACE (or error out and have an option to enable it)?
That sounds right to me. Maybe there are cases where this isn't true, but -- especially given the recent move toward making "git add" the suggested porcelain command for updating the index -- I want "git add foo" to stick the current contents of "foo" into the index, regardless of what might have been there under that name previously. I'll grant that it's not a super-common use case to rename or delete a directory and put a file in its place, but it's IMO not an unreasonable thing to want git to track without undue hassle, given that it claims to support renames. I'm fine with having to supply an extra option to get that automatic behavior.
But barring that, the patch would at least have saved me a lot of head-scratching.
-Steve - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html