{"thread":{"id":"22729","subject":"[RFE] pre/post-stash hooks","startedAt":"2010-02-19T17:33:46Z","lastAt":"2010-02-25T01:34:35Z","messageCount":3,"participants":["Scott R. Godin","Chris Packham"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"135096","messageId":"hlmi1o$fk5$1@ger.gmane.org","threadId":"22729","inReplyTo":null,"subject":"[RFE] pre/post-stash hooks","fromName":"Scott R. Godin","fromEmail":"scottg.wp-hackers@mhg2.com","sentAt":"2010-02-19T17:33:46Z","receivedAt":"2010-02-19T17:33:46Z","isPatch":false,"sender":{"key":"scottg.wp-hackers@mhg2.com","avatar":"https://gravatar.com/avatar/766980733f46a32860153479ca94372e4fff5c4632e8586dbbfb143051d231ce?d=mp&s=160"},"body":"While I had known about git stash, and just never used it, I'd finally \ngotten to the point where it was needed, only to discover something that \nI found interesting.\n\nMy use case may a bit rare at the moment, I'll admit, but not at all \nfar-fetched, and probably growing in usage as time goes on.\n\nIn contrib/hooks is the script 'setgitperms.perl' which, when added to \npre-commit, post-merge, and post-checkout, makes sure to track the file \npermissions fully, not just +/-x. This can be vitally important for \nwebdevelopers who must keep certain permissions on certain directories, \nsuch as for e-commerce solutions like Magento, etc, so that the clients \nmay upload new product images through the interface rather than via ftp.\n\nHowever when I recently used stash to push some changes aside while I \ndid something else first, and then ran git stash pop, I realized that \nthere weren't any hooks that would enable setgitperms.perl to be \nensuring/tracking the file permissions are applied correctly after stash \nusage.\n\nGranted that full directory/file permissions may not be all that \nimportant to some of you coders, but I can assure you that web \ndevelopers may not see it that way.\n\nAgain granted, I could probably set up a Makefile, but not everyone \nknows how to do that (particularly those webdevelopers who aren't coders \nwho would typically be familiar with Makefiles.\n\nAlso granted I could probably find a way to work around this issue with \nan alias, but my thought is that I shouldn't have to.\n\nThere are some of us who exist who have this funny thought that \ncomputers should be able to do things for us without us having to \nexplicitly tell them to, specifically, every time. We'd prefer to set \nthings up generally \"just do this EVERY time for EVERYthing\" and forget \nabout it, and let the computer handle it. I'm sure you're familiar with \nus, since we are us. :-)\n\nSo, with this in mind, in addition to requesting pre/post-stash hooks \njust for this alone, I'd like to solicit some thought from the rest of \nyou as to potential possible usages/requirements for said hooks for \nreasons _other_ than running 'setgitperms.perl'\n\nAre there any reasons why pre/post-stash hooks _shouldn't_ exist?\n\nHow difficult would it be to implement?\n\n-- \n(please respond to the list as opposed to my email box directly,\nunless you are supplying private information you don't want public\non the list)\n"},{"id":"135607","messageId":"hm3urb$1nf$1@dough.gmane.org","threadId":"22729","inReplyTo":"hlmi1o$fk5$1@ger.gmane.org","subject":"Re: [RFE] pre/post-stash hooks","fromName":"Scott R. Godin","fromEmail":"scottg.wp-hackers@mhg2.com","sentAt":"2010-02-24T19:31:55Z","receivedAt":"2010-02-24T19:31:55Z","isPatch":false,"sender":{"key":"scottg.wp-hackers@mhg2.com","avatar":"https://gravatar.com/avatar/766980733f46a32860153479ca94372e4fff5c4632e8586dbbfb143051d231ce?d=mp&s=160"},"body":"giving this a bump since I haven't received any replies on it yet, and \nit's a valid question, IMHO.\n\nOn 02/19/2010 12:33 PM, Scott R. Godin wrote:\n> While I had known about git stash, and just never used it, I'd finally\n> gotten to the point where it was needed, only to discover something that\n> I found interesting.\n>\n> My use case may a bit rare at the moment, I'll admit, but not at all\n> far-fetched, and probably growing in usage as time goes on.\n>\n> In contrib/hooks is the script 'setgitperms.perl' which, when added to\n> pre-commit, post-merge, and post-checkout, makes sure to track the file\n> permissions fully, not just +/-x. This can be vitally important for\n> webdevelopers who must keep certain permissions on certain directories,\n> such as for e-commerce solutions like Magento, etc, so that the clients\n> may upload new product images through the interface rather than via ftp.\n>\n> However when I recently used stash to push some changes aside while I\n> did something else first, and then ran git stash pop, I realized that\n> there weren't any hooks that would enable setgitperms.perl to be\n> ensuring/tracking the file permissions are applied correctly after stash\n> usage.\n>\n> Granted that full directory/file permissions may not be all that\n> important to some of you coders, but I can assure you that web\n> developers may not see it that way.\n>\n> Again granted, I could probably set up a Makefile, but not everyone\n> knows how to do that (particularly those webdevelopers who aren't coders\n> who would typically be familiar with Makefiles.\n>\n> Also granted I could probably find a way to work around this issue with\n> an alias, but my thought is that I shouldn't have to.\n>\n> There are some of us who exist who have this funny thought that\n> computers should be able to do things for us without us having to\n> explicitly tell them to, specifically, every time. We'd prefer to set\n> things up generally \"just do this EVERY time for EVERYthing\" and forget\n> about it, and let the computer handle it. I'm sure you're familiar with\n> us, since we are us. :-)\n>\n> So, with this in mind, in addition to requesting pre/post-stash hooks\n> just for this alone, I'd like to solicit some thought from the rest of\n> you as to potential possible usages/requirements for said hooks for\n> reasons _other_ than running 'setgitperms.perl'\n>\n> Are there any reasons why pre/post-stash hooks _shouldn't_ exist?\n>\n> How difficult would it be to implement?\n>\n\n\n-- \n(please respond to the list as opposed to my email box directly,\nunless you are supplying private information you don't want public\non the list)\n"},{"id":"135644","messageId":"a038bef51002241734w127e9e9btd3f3dd73aca1336@mail.gmail.com","threadId":"22729","inReplyTo":"hm3urb$1nf$1@dough.gmane.org","subject":"Re: [RFE] pre/post-stash hooks","fromName":"Chris Packham","fromEmail":"judge.packham@gmail.com","sentAt":"2010-02-25T01:34:35Z","receivedAt":"2010-02-25T01:34:35Z","isPatch":false,"sender":{"key":"judge.packham@gmail.com","avatar":"https://avatars.githubusercontent.com/u/155667?v=4"},"body":"On Wed, Feb 24, 2010 at 11:31 AM, Scott R. Godin\n<scottg.wp-hackers@mhg2.com> wrote:\n> giving this a bump since I haven't received any replies on it yet, and it's\n> a valid question, IMHO.\n>\n> On 02/19/2010 12:33 PM, Scott R. Godin wrote:\n>>\n>> While I had known about git stash, and just never used it, I'd finally\n>> gotten to the point where it was needed, only to discover something that\n>> I found interesting.\n>>\n>> My use case may a bit rare at the moment, I'll admit, but not at all\n>> far-fetched, and probably growing in usage as time goes on.\n>>\n>> In contrib/hooks is the script 'setgitperms.perl' which, when added to\n>> pre-commit, post-merge, and post-checkout, makes sure to track the file\n>> permissions fully, not just +/-x. This can be vitally important for\n>> webdevelopers who must keep certain permissions on certain directories,\n>> such as for e-commerce solutions like Magento, etc, so that the clients\n>> may upload new product images through the interface rather than via ftp.\n>>\n>> However when I recently used stash to push some changes aside while I\n>> did something else first, and then ran git stash pop, I realized that\n>> there weren't any hooks that would enable setgitperms.perl to be\n>> ensuring/tracking the file permissions are applied correctly after stash\n>> usage.\n>>\n>> Granted that full directory/file permissions may not be all that\n>> important to some of you coders, but I can assure you that web\n>> developers may not see it that way.\n>>\n>> Again granted, I could probably set up a Makefile, but not everyone\n>> knows how to do that (particularly those webdevelopers who aren't coders\n>> who would typically be familiar with Makefiles.\n>>\n>> Also granted I could probably find a way to work around this issue with\n>> an alias, but my thought is that I shouldn't have to.\n>>\n>> There are some of us who exist who have this funny thought that\n>> computers should be able to do things for us without us having to\n>> explicitly tell them to, specifically, every time. We'd prefer to set\n>> things up generally \"just do this EVERY time for EVERYthing\" and forget\n>> about it, and let the computer handle it. I'm sure you're familiar with\n>> us, since we are us. :-)\n>>\n>> So, with this in mind, in addition to requesting pre/post-stash hooks\n>> just for this alone, I'd like to solicit some thought from the rest of\n>> you as to potential possible usages/requirements for said hooks for\n>> reasons _other_ than running 'setgitperms.perl'\n>>\n>> Are there any reasons why pre/post-stash hooks _shouldn't_ exist?\n>>\n>> How difficult would it be to implement?\n>>\n\nWell for my 2 cents I've always seen stash as a way to prevent me\nhaving to deal with a commit/merge right now when I get\ninterrupted/distracted. The things I stash usually don't work and\naren't complete, otherwise I would have committed them. Which really\nis my answer to your question, pre-commit hooks exist so anything that\nneeds to be guaranteed in an automated way can still be done when it\nreally matters. As a git user I wouldn't find pre/post stash hooks\nuseful because its not something I'd use in my work-flow. But if it's\nyour itch go for it, don't let me put you off from floating a patch on\nthe list.\n"}]}