From: Jakub Narebski <jnareb@gmail.com>
To: Han-Wen Nienhuys <hanwen@xs4all.nl>
Cc: git@vger.kernel.org
Subject: Re: updating only changed files source directory?
Date: Tue, 24 Oct 2006 12:13:38 +0200 [thread overview]
Message-ID: <200610241213.38558.jnareb@gmail.com> (raw)
In-Reply-To: <453DE1F5.5010803@xs4all.nl>
Han-Wen Nienhuys wrote:
> Jakub Narebski escreveu:
>> Han-Wen Nienhuys wrote:
>>
>> I see that you are using fairly low level commands (plumbing commands)
>>
>>> git-http-fetch -a <branch> <url>
>>> wget <url>/refs/head/<branch> ## dump to <myrepo>/refs/head/<branch>
>>
>> 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.
You can either have additional branch which is not tracking branch
(you don't fetch into this branch), and on which you are always on,
called for example 'check-out' (and which can be used for git-reset
solution to checking out files to external directory), and use
git-fetch without --update-head-ok, or (if the repository is bare
repository, without working area) use --update-head-ok.
>>> git --git-dir <myrepo> read-tree <committish>
>>>
>>> cd <srcdir>
>>> git --git-dir <myrepo> checkout-index -a -f
>>
>> instead of
>> git --git-dir=<myrepo> checkout <branch>
>> (-f is Force a re-read of everything)
git-checkout-index(1):
-f|--force
forces overwrite of existing files
So probably you would get what you want if you lose '-f'.
> Yes, however,
>
> git checkout
>
> changes the state of the repository, which is something I want to prevent.
Well, git-reset also changes state of repository, but it changes only
the branch we have created exactly for this purpose.
--
Jakub Narebski
Poland
next prev parent reply other threads:[~2006-10-24 10:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-24 1:33 updating only changed files source directory? Han-Wen Nienhuys
2006-10-24 5:55 ` Shawn Pearce
2006-10-24 7:48 ` Jakub Narebski
2006-10-24 9:50 ` Han-Wen Nienhuys
2006-10-24 10:13 ` Jakub Narebski [this message]
2006-10-24 19:12 ` Daniel Barkalow
2006-10-25 11:58 ` Han-Wen Nienhuys
2006-10-25 19:35 ` Daniel Barkalow
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=200610241213.38558.jnareb@gmail.com \
--to=jnareb@gmail.com \
--cc=git@vger.kernel.org \
--cc=hanwen@xs4all.nl \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).