0

I'm a bit confused when writing code using the VC interface. After executing the following commands in the shell (committing a dummy file ~/test/file in a fresh git repo ~/test):

cd
mkdir test
cd test
git init
touch file
git add file
git commit -am "test"

I end up in a situation in which Emacs (vc-state "~/test/file") evaluate to unregistered but (vc-registered "~/test/file") reports the converse as it evaluates to t. What's wrong?

0

Apparently, I'm supposed to be on the buffer. Hence, the following snippet

(with-current-buffer 
  (find-file-noselect "~/test/file") 
  (vc-state "~/test/file"))

is evaluated to up-to-date.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.