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

Re: Using local trees and cogito

From
Jan Harkes <jaharkes@cs.cmu.edu>
Date
Jun 16, 2005, 16:39 UTC
Message-ID
<20050616163907.GA26037@delft.aura.cs.cmu.edu>
In-Reply-To
<9e473391050615193719d81951@mail.gmail.com>
On Wed, Jun 15, 2005 at 10:37:59PM -0400, Jon Smirl wrote:
> One problem I did notice is that if you add file in a fork and jump to
> a fork without the file, it doesn't get removed. That's not a big
> problem but it can be confusing.
I noticed the same thing and 'solved' it the following way,
After pointing the head at the new branch, instead of using,
    git-read-tree -m HEAD && checkout-cache -q -f -u -a
I use,
    git-diff-cache -R -p HEAD | git-apply --index

This simple reverse applies the differences between the previously checked out tree and the branch we just switched to. Ofcourse the cache/index has to be up to date before we switch between branches.

Jan
Previous: Jon SmirlNext: Matthias Urlichs
Message 2 of 3 in “Using local trees and cogito”
  1. Jon SmirlJun 16, 2005
  2. Jan HarkesJun 16, 2005
  3. Matthias UrlichsJun 17, 2005

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.