On Thu, 21 Dec 2006, Junio C Hamano wrote: > Sure, what you want is "git add --no-add newfile", and I can > understand that mode of operation if you are always going to > commit with "git commit -a". Maybe we can have a config > variable that makes "commit -a" and "add --no-add" the default > for these two commands, and we do not have to change anything > else. I think there's value to a command to add an empty space with a given name to the staging area. If you commit without -a, I don't see any reason to think that you couldn't want the sequence "add-empty-space <new-file>", "modify <old-file>", "update-index <old-file>", "commit", "update-index <new-file>", "commit". It can be useful to make sure the file isn't going to be forgotten, but also not get it into the next commit. > One minor detail I wonder about is what mode bits would you give > to that placeholder entry. I looked into this at one point. It should probably use 000000 for the mode, because it shouldn't read the working directory at all (you might actually want to add the space before creating a file at all, for instance, and then make a symlink when you provide anything, surprising any reasonable guess at a mode). Also, this is going to show up in the diff listing, and all-zero SHA1 with a mode is used there for "read the working directory". -Daniel *This .sig left intentionally blank* - 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