emacs-devel
[Top][All Lists]
Advanced

[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 16:58:29 +0900

Dan Nicolaescu <address@hidden> writes:
>   > 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?
>
> It should be.  BTW, can't git reset FILE be used here?

Hmm, maybe the sequence:

   git reset -q FILE; git checkout -q FILE 2>/dev/null

could be used.

The "reset" removes any newly added files from the index (without
changing their contents), but seems to be ignored for files already in
the repo.

The "checkout" will revert the contents of files already in the repo,
but will be ignored (with an error message) for unknown files -- and any
newly added files should be unknown at this point because of the
previous "reset".

-Miles

-- 
Philosophy, n. A route of many roads leading from nowhere to nothing.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]