Using a different index and HEAD
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
Signature · 8 lines
---------------------------------------------------------------------- Enrico Weigelt, metux IT service -- http://www.metux.de/ phone: +49 36207 519931 email: [email protected] mobile: +49 151 27565287 icq: 210169427 skype: nekrad666 ---------------------------------------------------------------------- Embedded-Linux / Portierung / Opensource-QM / Verteilte Systeme ----------------------------------------------------------------------
* Jonathan Nieder <[email protected]> schrieb:
Hi,
Quoted 6 lines
Quoted 3 lines
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
Signature · 8 lines
---------------------------------------------------------------------- Enrico Weigelt, metux IT service -- http://www.metux.de/ phone: +49 36207 519931 email: [email protected] mobile: +49 151 27565287 icq: 210169427 skype: nekrad666 ---------------------------------------------------------------------- Embedded-Linux / Portierung / Opensource-QM / Verteilte Systeme ----------------------------------------------------------------------
Quoted 6 lines · Enrico Weigelt
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
[...]
Quoted 5 lines
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.
Quoted 6 lines · Enrico Weigelt
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) ;-) ?
Quoted 4 lines
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.
Signature · 3 lines
Jakub Narebski Poland ShadeHawk on #git
Quoted 9 lines · Jakub Narebski
Quoted 6 lines · Enrico Weigelt
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