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

Re: Using a different index and HEAD

From
Jakub Narebski <jnareb@gmail.com>
Date
Nov 13, 2010, 17:25 UTC
Message-ID
<m3aaldf863.fsf@localhost.localdomain>
In-Reply-To
<20101113152906.GA24903@nibiru.local>
Enrico Weigelt <weigelt@metux.de> writes:
Show 6 quoted lines
> I'm currently thinking about an IDE toolkit entirely based on git,
> which eg. versions every single file save operation (so, IOW: an
> separately versioned workdir) automatically and later allows to
> rebase/rework this to tell what really gets committed to the
> actual working branch. For this multiple indices and refs/HEAD
> pointers would be very helpful.
UGFWIWNI (Using Git For What It Was Not Intended) ;-) ?
> 
> Is there already a way to tell other locations for index file
> and current HEAD symref on command line (just like we have w/
> --work-dir etc) ?

There is GIT_INDEX_FILE environment variable (see git(1) manpage); you can maniplate symrefs such as HEAD directly using git-symbolic-ref (and git-show-ref, git-rev-parse, etc.).

You can also check 'contrib/workdir/git-new-workdir' script.
-- 
Jakub Narebski
Poland
ShadeHawk on #git
Previous: Enrico WeigeltNext: Tomas Carnecky
Message 2 of 5 in “Using a different index and HEAD”
  1. Enrico WeigeltNov 13, 2010
  2. Jakub NarebskiNov 13, 2010
  3. Tomas CarneckyNov 21, 2010
  4. Enrico WeigeltNov 13, 2010
  5. Jonathan NiederNov 13, 2010

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.