{"thread":{"id":"25737","subject":"Using a different index and HEAD","startedAt":"2010-11-13T15:29:06Z","lastAt":"2010-11-21T15:16:15Z","messageCount":5,"participants":["Enrico Weigelt","Jakub Narebski","Jonathan Nieder","Tomas Carnecky"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"155824","messageId":"20101113152906.GA24903@nibiru.local","threadId":"25737","inReplyTo":null,"subject":"Using a different index and HEAD","fromName":"Enrico Weigelt","fromEmail":"weigelt@metux.de","sentAt":"2010-11-13T15:29:06Z","receivedAt":"2010-11-13T15:29:06Z","isPatch":false,"sender":{"key":"weigelt@metux.de","avatar":null},"body":"\nHi folks,\n\n\nI'm currently thinking about an IDE toolkit entirely based on git,\nwhich eg. versions every single file save operation (so, IOW: an\nseparately versioned workdir) automatically and later allows to\nrebase/rework this to tell what really gets committed to the\nactual working branch. For this multiple indices and refs/HEAD\npointers would be very helpful.\n\nIs there already a way to tell other locations for index file\nand current HEAD symref on command line (just like we have w/\n--work-dir etc) ?\n\n\ncu\n-- \n----------------------------------------------------------------------\n Enrico Weigelt, metux IT service -- http://www.metux.de/\n\n phone:  +49 36207 519931  email: weigelt@metux.de\n mobile: +49 151 27565287  icq:   210169427         skype: nekrad666\n----------------------------------------------------------------------\n Embedded-Linux / Portierung / Opensource-QM / Verteilte Systeme\n----------------------------------------------------------------------\n"},{"id":"155827","messageId":"m3aaldf863.fsf@localhost.localdomain","threadId":"25737","inReplyTo":"20101113152906.GA24903@nibiru.local","subject":"Re: Using a different index and HEAD","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2010-11-13T17:25:46Z","receivedAt":"2010-11-13T17:25:46Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Enrico Weigelt <weigelt@metux.de> writes:\n\n> I'm currently thinking about an IDE toolkit entirely based on git,\n> which eg. versions every single file save operation (so, IOW: an\n> separately versioned workdir) automatically and later allows to\n> rebase/rework this to tell what really gets committed to the\n> actual working branch. For this multiple indices and refs/HEAD\n> pointers would be very helpful.\n\nUGFWIWNI (Using Git For What It Was Not Intended) ;-) ?\n\n> \n> Is there already a way to tell other locations for index file\n> and current HEAD symref on command line (just like we have w/\n> --work-dir etc) ?\n\nThere is GIT_INDEX_FILE environment variable (see git(1) manpage);\nyou can maniplate symrefs such as HEAD directly using git-symbolic-ref\n(and git-show-ref, git-rev-parse, etc.).\n\nYou can also check 'contrib/workdir/git-new-workdir' script.\n\n-- \nJakub Narebski\nPoland\nShadeHawk on #git\n"},{"id":"155831","messageId":"20101113194128.GA8878@nibiru.local","threadId":"25737","inReplyTo":"20101113160546.GA5535@burratino","subject":"Re: Using a different index and HEAD","fromName":"Enrico Weigelt","fromEmail":"weigelt@metux.de","sentAt":"2010-11-13T19:41:29Z","receivedAt":"2010-11-13T19:41:29Z","isPatch":false,"sender":{"key":"weigelt@metux.de","avatar":null},"body":"* Jonathan Nieder <jrnieder@gmail.com> schrieb:\n\nHi,\n\n> > Is there already a way to tell other locations for index file\n> > and current HEAD symref on command line (just like we have w/\n> > --work-dir etc) ?\n> \n> You might like the git-new-workdir script, available from\n> contrib/workdir.\n\nI didnt have time for a deeper look yet, but I'll try to explain\nmy ideas a bit more:\n\nSuppose I choose to work on an branch \"one\" (which probably is\nsynced to some remote). That will create some temporary (local)\nWIP branch, where each file change from the IDE (working in a\nseparate workdir or maybe completely w/o one) gets committed\nimmediately. Now I click some \"commit\" button and it asks me what\nexactly to commit - I now can interactively selected changes to\nbe committed (maybe even on single changelets within a file),\nthey'll be squashed together (maybe involving some rebase magic)\nand an commit final commit object is created on the \"one\" branch.\nAfter this, the local WIP branch gets rebased to latest \"one\".\n\n\ncu\n-- \n----------------------------------------------------------------------\n Enrico Weigelt, metux IT service -- http://www.metux.de/\n\n phone:  +49 36207 519931  email: weigelt@metux.de\n mobile: +49 151 27565287  icq:   210169427         skype: nekrad666\n----------------------------------------------------------------------\n Embedded-Linux / Portierung / Opensource-QM / Verteilte Systeme\n----------------------------------------------------------------------\n"},{"id":"155832","messageId":"20101113202146.GA16920@burratino","threadId":"25737","inReplyTo":"20101113194128.GA8878@nibiru.local","subject":"Re: Using a different index and HEAD","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2010-11-13T20:21:46Z","receivedAt":"2010-11-13T20:21:46Z","isPatch":false,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Enrico Weigelt wrote:\n\n> I didnt have time for a deeper look yet, but I'll try to explain\n> my ideas a bit more:\n>\n> Suppose I choose to work on an branch \"one\" (which probably is\n> synced to some remote). That will create some temporary (local)\n> WIP branch, where\n[...]\n>              Now I click some \"commit\" button and it asks me what\n> exactly to commit - I now can interactively selected changes to\n> be committed (maybe even on single changelets within a file),\n> they'll be squashed together (maybe involving some rebase magic)\n> and an commit final commit object is created on the \"one\" branch.\n\nAh, that is completely different. :)  Your tools would be\n\n\tGIT_INDEX_FILE=$GIT_DIR/wip-index; export GIT_INDEX_FILE\n\tgit update-index ...\n\tgit write-tree\n\tgit commit-tree ...\n\tgit update-ref ...\n\tgit read-tree ...\n\nnone of which touch HEAD except the second to last one.\n\nSee the list of \"low-level commands (plumbing)\" and examples in\ncontrib/examples for more details.\n"},{"id":"156287","messageId":"4CE937BF.9010606@dbservice.com","threadId":"25737","inReplyTo":"m3aaldf863.fsf@localhost.localdomain","subject":"Re: Using a different index and HEAD","fromName":"Tomas Carnecky","fromEmail":"tom@dbservice.com","sentAt":"2010-11-21T15:16:15Z","receivedAt":"2010-11-21T15:16:15Z","isPatch":false,"sender":{"key":"tom@dbservice.com","avatar":"https://gravatar.com/avatar/900a300bdd1a8bbe086008ad78210bbee2ad2803b7d50a5cba04c1e9404bd6d2?d=mp&s=160"},"body":"On 11/13/10 6:25 PM, Jakub Narebski wrote:\n> Enrico Weigelt<weigelt@metux.de>  writes:\n>\n>> I'm currently thinking about an IDE toolkit entirely based on git,\n>> which eg. versions every single file save operation (so, IOW: an\n>> separately versioned workdir) automatically and later allows to\n>> rebase/rework this to tell what really gets committed to the\n>> actual working branch. For this multiple indices and refs/HEAD\n>> pointers would be very helpful.\n> UGFWIWNI (Using Git For What It Was Not Intended) ;-) ?\n\nI haven't seen anyone UGFWIINI for in a long time. Either that or my \nperception of 'not intended for' has changed. Maybe we should make a \nsecond round of the contest and see what use cases people came up with \nsince the first UGFWIINI round (it's been almost two years). I'd \ncertainly be interested :)\n\ntom\n"}]}