Re: git-add fails after file type change

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



A Large Angry SCM wrote:
Did you try "git-update-index --replace dir"?

Turns out that doesn't work. It gives me the same error I get without the --replace option:

error: dir: cannot add to the index - missing --add option?
fatal: Unable to process file dir

However, "git rm" followed by "git add" does seem to work. So for now it looks like that'll be the best bet when I run into this problem (should be possible to automate it, even.) The better error message from Junio's patch will at least make the failure less mysterious.

IMO it'd still be nice if the porcelain could provide a "make the index look like the working directory" operation that worked even in the face of changes like this, adding and/or removing files as needed. But it's possible that my crazy git-as-backup-device setup is the only place where this is even an issue; typical git users can use "git mv" and never run into the problem.

-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

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]