On Thu, 2010-10-21 at 16:06 +0200, Thore Husfeldt wrote: > On 21 Oct 2010, at 14:56, Drew Northup wrote: > > > That's not what I asked. > > [... good, concrete example omitted...] > > > > $ vim A.txt > > $ git stage A.txt > > $ git commit > > $ vim C.txt > > $ vim A.txt > > $ git stage A.txt > > $ git stage C.txt > > > > Should the last two commands fail? > > No, not for me. (Is this in reaction to Jakubâs suggestion that an > âuntracked fileâ, like C.txt, cannot be staged before explicitly > tracked?) I hadn't read any of his comments to mean that, but I could be missing something... More than anything else I was trying to feel out possible workflow issues. A lot of people are going to (continue? to) confuse "git add" and "svn add" if we don't make very explicit what we are up to. As you are not suggesting we outright replace "git add" I wanted to be very sure as to what you mean to do. > Maybe this is what should happen: > > $ git stage C.txt > git stage: Contents of previously untracked file C.txt staged for next commit This is reasonable. I would probably say "...untracked file C.txt added to index and staged for next commit" to emphasize the existing "git add" idiom, but that may be superfluous. > > Now, if "git stage" were an outright replacement for "git add" > > there might be more use (but I'd still not be happy about the corruption > > of the idiom). > > I tend to agree. But look at, e.g., Figure 2.1 in the Pro Git book > http://progit.org/book/ch2-2.html . That view strongly enforces that > something special happens to the new âpinkâ file, different from what > happens to a âyellowâ file. After this helpful discussion, I donât > like figure 2.1 so much anymore. A red arrow should go from âpinkâ to > âblueâ with text âstage the fileâ. I can see why this would get your attention. I have to admit I ignored it because it didn't match-up with the bulk of documentation in any way I had yet made sense of. Once I had made sense of the idiom and looked back at the graphic I shrugged and wondered why the author had chosen to illustrate it that way. -- -Drew Northup N1XIM AKA RvnPhnx on OPN ________________________________________________ "As opposed to vegetable or mineral error?" -John Pescatore, SANS NewsBites Vol. 12 Num. 59 -- 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