git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: updating only changed files source directory?

From
Jakub Narebski <jnareb@gmail.com>
Date
Oct 24, 2006, 07:48 UTC
Message-ID
<ehkgfs$af6$1@sea.gmane.org>
In-Reply-To
<ehjqgf$ggb$1@sea.gmane.org>
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 <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.

>    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)
 
> * 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".

-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
Previous: Shawn PearceNext: Han-Wen Nienhuys
Message 3 of 8 in “updating only changed files source directory?”
  1. Han-Wen NienhuysOct 24, 2006
  2. Shawn PearceOct 24, 2006
  3. Jakub NarebskiOct 24, 2006
  4. Han-Wen NienhuysOct 24, 2006
  5. Jakub NarebskiOct 24, 2006
  6. Daniel BarkalowOct 24, 2006
  7. Han-Wen NienhuysOct 25, 2006
  8. Daniel BarkalowOct 25, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.