all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Miles Bader <miles@gnu.org>
To: Dan Nicolaescu <dann@ics.uci.edu>
Cc: mathias@mnet-mail.de, emacs-devel@gnu.org
Subject: Re: C-x v u for added files in vc-git
Date: Fri, 04 Dec 2009 16:58:29 +0900	[thread overview]
Message-ID: <buo1vjbqifu.fsf@dhlpc061.dev.necel.com> (raw)
In-Reply-To: <200912040544.nB45iVB3002714@godzilla.ics.uci.edu> (Dan Nicolaescu's message of "Thu, 3 Dec 2009 21:44:31 -0800 (PST)")

Dan Nicolaescu <dann@ics.uci.edu> 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	other threads:[~2009-12-04  7:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-03  6:06 C-x v u for added files in vc-git Dan Nicolaescu
2009-12-03  8:02 ` mathias
2009-12-03  9:09   ` Dan Nicolaescu
2009-12-03 12:15     ` mathias
2009-12-03 18:22       ` Dan Nicolaescu
2009-12-04  3:39         ` Miles Bader
2009-12-04  4:49           ` Dan Nicolaescu
2009-12-04  5:24             ` Miles Bader
2009-12-04  5:44               ` Dan Nicolaescu
2009-12-04  7:58                 ` Miles Bader [this message]
2009-12-04 18:55                   ` Dan Nicolaescu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=buo1vjbqifu.fsf@dhlpc061.dev.necel.com \
    --to=miles@gnu.org \
    --cc=dann@ics.uci.edu \
    --cc=emacs-devel@gnu.org \
    --cc=mathias@mnet-mail.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.