Subject: git pull and GIT_DIR

From: bill lam <[email-masked]>
Date: Wed, 2 May 2012 22:25:36 +0800

It appeared that

a)
cd /path/to && git pull git/https://....

will fetch and checkout latest changes to working tree.  This is as
expected.  On the contrary

b)
GIT_DIR=/path/to/.git git pull git/https://....

will only update git repo, but leaving working tree untouched.
Subsequent git status and git diff will indicate unstaged changes, 
apparently a commit that will revert the updated git repo. I have to
do 'git reset --hard' to really update the working three.

I'm not sure if this is an intended behavior or I missed something. 

-- 
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3