login
Header Space

 
 

Re: Separating "add path to index" from "update content in index"

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Junio C Hamano <junkio@...>
Cc: Carl Worth <cworth@...>, Peter Baumann <Peter.B.Baumann@...>, <git@...>
Date: Friday, December 22, 2006 - 10:56 pm

On Thu, 21 Dec 2006, Junio C Hamano wrote:


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.


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@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: GIT - error: no such remote ref refs/heads/TestBranch, Junio C Hamano, (Thu Dec 21, 8:52 pm)
Re: Separating "add path to index" from "update content in i..., Daniel Barkalow, (Fri Dec 22, 10:56 pm)
speck-geostationary