[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: C-x v u for added files in vc-git
From: |
Miles Bader |
Subject: |
Re: C-x v u for added files in vc-git |
Date: |
Fri, 04 Dec 2009 14:24:30 +0900 |
Dan Nicolaescu <address@hidden> writes:
> > > git checkout HEAD <file>
> > > git rm --cached <file>
> > >
> > > that take care of all situations.
> >
> > I don't know _what_ people expect "C-x v u" to do for files that were
> > never committed, .... but the above sequence (specifically, the "git co")
> > seems to reset the file's contents to the contents it had at the time it
> > was added with "git add", in addition to removing it from the list of
> > added files.
>
> That's not good, we need something that just removes it from the index
> and keeps the current contents.
Hmm, that sequence also seems wrong in that the "git rm --cached" will
make previously committed files become "deleted" in the tree.
It seems like it's necessary to test whether a file has already been
committed, and use "git co" if so, and otherwise use "git rm --cached".
Since VC already appears to know whether the file's in the repo or just
"added" (in the mode-line, it shows "@" for newly added files, but ":"
or "-" for already-in-the-repo files), that should be possible, right?
-Miles
--
o The existentialist, not having a pillow, goes everywhere with the book by
Sullivan, _I am going to spit on your graves_.
- C-x v u for added files in vc-git, Dan Nicolaescu, 2009/12/03
- Re: C-x v u for added files in vc-git, mathias, 2009/12/03
- Re: C-x v u for added files in vc-git, Dan Nicolaescu, 2009/12/03
- Re: C-x v u for added files in vc-git, mathias, 2009/12/03
- Re: C-x v u for added files in vc-git, Dan Nicolaescu, 2009/12/03
- Re: C-x v u for added files in vc-git, Miles Bader, 2009/12/03
- Re: C-x v u for added files in vc-git, Dan Nicolaescu, 2009/12/03
- Re: C-x v u for added files in vc-git,
Miles Bader <=
- Re: C-x v u for added files in vc-git, Dan Nicolaescu, 2009/12/04
- Re: C-x v u for added files in vc-git, Miles Bader, 2009/12/04
- Re: C-x v u for added files in vc-git, Dan Nicolaescu, 2009/12/04