From: Han-Wen Nienhuys Date: Tue, 24 Oct 2006 09:50:45 GMT Subject: Re: updating only changed files source directory? Message-ID: <453DE1F5.5010803@xs4all.nl> In-Reply-To: Jakub Narebski escreveu: > Han-Wen Nienhuys wrote: > >> I have some questions and remarks > > I see that you are using fairly low level commands (plumbing commands) > >> git-http-fetch -a >> wget /refs/head/ ## dump to /refs/head/ > > instead of setting $GIT_DIR/remotes/origin file and using "git fetch". > BTW. "git fetch" will not update branch you are on, unless --update-head-ok > option is used. I tried fetch, but was put off by the warnings because I didn't have --update-head-ok. Using lowlevel commands is my way of making sure that Git doesn't assume it needs to do anything intelligent. >> git --git-dir read-tree >> >> cd >> git --git-dir checkout-index -a -f > > instead of > git --git-dir= checkout > (-f is Force a re-read of everything) Yes, however, checkout changes the state of the repository, which is something I want to prevent. >> * As far as I can see, there is no reason to have only one index in a >> git repository. Why isn't it possible to specify an alternate >> index-file with an option similar to --git-dir ? > > --git-dir is alternative to setting GIT_DIR. You can use GIT_INDEX_FILE > to specify alternate index file. Documented in git(7), section > "ENVIRONMENT VARIABLES". Silly me, I overlooked in the manpage. Note that it is standard to put the environment section at the end of the manpage. Right now it's somewhere in the middle. -- Han-Wen Nienhuys - hanwen@xs4all.nl - http://www.xs4all.nl/~hanwen