git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Using a different index and HEAD
@ 2010-11-13 15:29 Enrico Weigelt
  2010-11-13 17:25 ` Jakub Narebski
       [not found] ` <20101113160546.GA5535@burratino>
  0 siblings, 2 replies; 5+ messages in thread
From: Enrico Weigelt @ 2010-11-13 15:29 UTC (permalink / raw)
  To: git


Hi folks,


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.

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) ?


cu
-- 
----------------------------------------------------------------------
 Enrico Weigelt, metux IT service -- http://www.metux.de/

 phone:  +49 36207 519931  email: weigelt@metux.de
 mobile: +49 151 27565287  icq:   210169427         skype: nekrad666
----------------------------------------------------------------------
 Embedded-Linux / Portierung / Opensource-QM / Verteilte Systeme
----------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Using a different index and HEAD
  2010-11-13 15:29 Using a different index and HEAD Enrico Weigelt
@ 2010-11-13 17:25 ` Jakub Narebski
  2010-11-21 15:16   ` Tomas Carnecky
       [not found] ` <20101113160546.GA5535@burratino>
  1 sibling, 1 reply; 5+ messages in thread
From: Jakub Narebski @ 2010-11-13 17:25 UTC (permalink / raw)
  To: Enrico Weigelt; +Cc: git

Enrico Weigelt <weigelt@metux.de> writes:

> 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Using a different index and HEAD
       [not found] ` <20101113160546.GA5535@burratino>
@ 2010-11-13 19:41   ` Enrico Weigelt
  2010-11-13 20:21     ` Jonathan Nieder
  0 siblings, 1 reply; 5+ messages in thread
From: Enrico Weigelt @ 2010-11-13 19:41 UTC (permalink / raw)
  To: Jonathan Nieder, git

* Jonathan Nieder <jrnieder@gmail.com> schrieb:

Hi,

> > 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) ?
> 
> You might like the git-new-workdir script, available from
> contrib/workdir.

I didnt have time for a deeper look yet, but I'll try to explain
my ideas a bit more:

Suppose I choose to work on an branch "one" (which probably is
synced to some remote). That will create some temporary (local)
WIP branch, where each file change from the IDE (working in a
separate workdir or maybe completely w/o one) gets committed
immediately. Now I click some "commit" button and it asks me what
exactly to commit - I now can interactively selected changes to
be committed (maybe even on single changelets within a file),
they'll be squashed together (maybe involving some rebase magic)
and an commit final commit object is created on the "one" branch.
After this, the local WIP branch gets rebased to latest "one".


cu
-- 
----------------------------------------------------------------------
 Enrico Weigelt, metux IT service -- http://www.metux.de/

 phone:  +49 36207 519931  email: weigelt@metux.de
 mobile: +49 151 27565287  icq:   210169427         skype: nekrad666
----------------------------------------------------------------------
 Embedded-Linux / Portierung / Opensource-QM / Verteilte Systeme
----------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Using a different index and HEAD
  2010-11-13 19:41   ` Enrico Weigelt
@ 2010-11-13 20:21     ` Jonathan Nieder
  0 siblings, 0 replies; 5+ messages in thread
From: Jonathan Nieder @ 2010-11-13 20:21 UTC (permalink / raw)
  To: git; +Cc: Enrico Weigelt, Jakub Narebski

Enrico Weigelt wrote:

> I didnt have time for a deeper look yet, but I'll try to explain
> my ideas a bit more:
>
> Suppose I choose to work on an branch "one" (which probably is
> synced to some remote). That will create some temporary (local)
> WIP branch, where
[...]
>              Now I click some "commit" button and it asks me what
> exactly to commit - I now can interactively selected changes to
> be committed (maybe even on single changelets within a file),
> they'll be squashed together (maybe involving some rebase magic)
> and an commit final commit object is created on the "one" branch.

Ah, that is completely different. :)  Your tools would be

	GIT_INDEX_FILE=$GIT_DIR/wip-index; export GIT_INDEX_FILE
	git update-index ...
	git write-tree
	git commit-tree ...
	git update-ref ...
	git read-tree ...

none of which touch HEAD except the second to last one.

See the list of "low-level commands (plumbing)" and examples in
contrib/examples for more details.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Using a different index and HEAD
  2010-11-13 17:25 ` Jakub Narebski
@ 2010-11-21 15:16   ` Tomas Carnecky
  0 siblings, 0 replies; 5+ messages in thread
From: Tomas Carnecky @ 2010-11-21 15:16 UTC (permalink / raw)
  To: Jakub Narebski; +Cc: Enrico Weigelt, git

On 11/13/10 6:25 PM, Jakub Narebski wrote:
> Enrico Weigelt<weigelt@metux.de>  writes:
>
>> 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) ;-) ?

I haven't seen anyone UGFWIINI for in a long time. Either that or my 
perception of 'not intended for' has changed. Maybe we should make a 
second round of the contest and see what use cases people came up with 
since the first UGFWIINI round (it's been almost two years). I'd 
certainly be interested :)

tom

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-11-21 15:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-13 15:29 Using a different index and HEAD Enrico Weigelt
2010-11-13 17:25 ` Jakub Narebski
2010-11-21 15:16   ` Tomas Carnecky
     [not found] ` <20101113160546.GA5535@burratino>
2010-11-13 19:41   ` Enrico Weigelt
2010-11-13 20:21     ` Jonathan Nieder

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