{"thread":{"id":"18055","subject":"How can I force git to recognize a change change in file modes?","startedAt":"2009-02-28T01:17:14Z","lastAt":"2009-02-28T22:43:33Z","messageCount":8,"participants":["Brent Goodrick","Jan Krüger","Lars Noschinski","Jay Soffian","Todd Zullinger"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"106497","messageId":"e38bce640902271717s46cf47f9i7c6bf5aac0d5f273@mail.gmail.com","threadId":"18055","inReplyTo":null,"subject":"How can I force git to recognize a change change in file modes?","fromName":"Brent Goodrick","fromEmail":"bgoodr@gmail.com","sentAt":"2009-02-28T01:17:14Z","receivedAt":"2009-02-28T01:17:14Z","isPatch":false,"sender":{"key":"bgoodr@gmail.com","avatar":"https://gravatar.com/avatar/2399bf5a3468b3516a892183edfd43a7fa0300a2e9d5072189020186961150bc?d=mp&s=160"},"body":"Hi,\n\nI checked in a slew of scripts, only to realize that the file\npermissions were too open (I want them to be chmod 700, not chmod\n755).  Somehow I thought that git was tracking those permission bits,\nbut simply using \"chmod 700 <fileset>; git add <fileset>\" did not add\nthe change of file modes, well, at least git status output doesn't\nshow it. Is there a way to do this?\n\nThanks,\nBrent\n"},{"id":"106530","messageId":"20090228012524.GB17106@lars.home.noschinski.de","threadId":"18055","inReplyTo":"e38bce640902271717s46cf47f9i7c6bf5aac0d5f273@mail.gmail.com","subject":"Re: How can I force git to recognize a change change in file modes?","fromName":"Lars Noschinski","fromEmail":"lars-2008-2@usenet.noschinski.de","sentAt":"2009-02-28T01:25:24Z","receivedAt":"2009-02-28T01:25:24Z","isPatch":false,"sender":{"key":"lars-2008-2@usenet.noschinski.de","avatar":null},"body":"* Brent Goodrick <bgoodr@gmail.com> [09-02-28 02:17]:\n> I checked in a slew of scripts, only to realize that the file\n> permissions were too open (I want them to be chmod 700, not chmod\n> 755).  Somehow I thought that git was tracking those permission bits,\n> but simply using \"chmod 700 <fileset>; git add <fileset>\" did not add\n> the change of file modes, well, at least git status output doesn't\n> show it. Is there a way to do this?\n\nGit does only track the executable bit.\n"},{"id":"106509","messageId":"20090228045531.14399ebf@perceptron","threadId":"18055","inReplyTo":"e38bce640902271717s46cf47f9i7c6bf5aac0d5f273@mail.gmail.com","subject":"Re: How can I force git to recognize a change change in file modes?","fromName":"Jan Krüger","fromEmail":"jk@jk.gs","sentAt":"2009-02-28T03:55:31Z","receivedAt":"2009-02-28T03:55:31Z","isPatch":false,"sender":{"key":"jk@jk.gs","avatar":"https://avatars.githubusercontent.com/u/1774?v=4"},"body":"Hi,\n\n> I checked in a slew of scripts, only to realize that the file\n> permissions were too open (I want them to be chmod 700, not chmod\n> 755).  Somehow I thought that git was tracking those permission bits,\n> but simply using \"chmod 700 <fileset>; git add <fileset>\" did not add\n> the change of file modes, well, at least git status output doesn't\n> show it. Is there a way to do this?\n\ngit doesn't track permissions quite that closely; all it remembers is\nwhether the file should be executable or not.\n\n-Jan\n"},{"id":"106534","messageId":"e38bce640902280824x3ae41d95qab1f1a450235e096@mail.gmail.com","threadId":"18055","inReplyTo":"20090228045531.14399ebf@perceptron","subject":"Re: How can I force git to recognize a change change in file modes?","fromName":"Brent Goodrick","fromEmail":"bgoodr@gmail.com","sentAt":"2009-02-28T16:24:43Z","receivedAt":"2009-02-28T16:24:43Z","isPatch":false,"sender":{"key":"bgoodr@gmail.com","avatar":"https://gravatar.com/avatar/2399bf5a3468b3516a892183edfd43a7fa0300a2e9d5072189020186961150bc?d=mp&s=160"},"body":"> git doesn't track permissions quite that closely; all it remembers is\n> whether the file should be executable or not.\n\nThanks Jan.  Was this choice made due to the conditional coding\nrequired to track the permission bits content between *NIX and\nnon-*NIX platform(s)?\n\nbg\n"},{"id":"106538","messageId":"76718490902280852y2f2657ck7459c138205bb874@mail.gmail.com","threadId":"18055","inReplyTo":"e38bce640902280824x3ae41d95qab1f1a450235e096@mail.gmail.com","subject":"Re: How can I force git to recognize a change change in file modes?","fromName":"Jay Soffian","fromEmail":"jaysoffian@gmail.com","sentAt":"2009-02-28T16:52:44Z","receivedAt":"2009-02-28T16:52:44Z","isPatch":false,"sender":{"key":"jaysoffian@gmail.com","avatar":"https://avatars.githubusercontent.com/u/155970?v=4"},"body":"On Sat, Feb 28, 2009 at 11:24 AM, Brent Goodrick <bgoodr@gmail.com> wrote:\n> Thanks Jan.  Was this choice made due to the conditional coding\n> required to track the permission bits content between *NIX and\n> non-*NIX platform(s)?\n\nThe short answer is: because Git was designed to track content. The\nlong answer is more complicated. Here's one of the more useful past\ndiscussions:\n\nhttp://thread.gmane.org/gmane.comp.version-control.git/91783\n\nI'm sure you can find others by searching the git list for \"metadata\".\n\nj.\n"},{"id":"106542","messageId":"e38bce640902280934u3d9da650ke64865d7149b3c66@mail.gmail.com","threadId":"18055","inReplyTo":"76718490902280852y2f2657ck7459c138205bb874@mail.gmail.com","subject":"Re: How can I force git to recognize a change change in file modes?","fromName":"Brent Goodrick","fromEmail":"bgoodr@gmail.com","sentAt":"2009-02-28T17:34:15Z","receivedAt":"2009-02-28T17:34:15Z","isPatch":false,"sender":{"key":"bgoodr@gmail.com","avatar":"https://gravatar.com/avatar/2399bf5a3468b3516a892183edfd43a7fa0300a2e9d5072189020186961150bc?d=mp&s=160"},"body":"> The short answer is: because Git was designed to track content. The\n> long answer is more complicated. Here's one of the more useful past\n> discussions:\n>\n> http://thread.gmane.org/gmane.comp.version-control.git/91783\n>\n> I'm sure you can find others by searching the git list for \"metadata\".\n\nI read that thread you showed above. Sounds like a big squirmy\ncan-o-worms, and I see that thread died on the vine because of it. :)\n\nAll I want to do in my case is just chmod 700 a bunch of scripts after\nthey are checked out or updated.  I'll need to re-read the git-hooks\nman page more closely.\n\nThanks for your help!\nbg\n"},{"id":"106547","messageId":"20090228183427.GN4505@inocybe.teonanacatl.org","threadId":"18055","inReplyTo":"e38bce640902280934u3d9da650ke64865d7149b3c66@mail.gmail.com","subject":"Re: How can I force git to recognize a change change in file modes?","fromName":"Todd Zullinger","fromEmail":"tmz@pobox.com","sentAt":"2009-02-28T18:34:27Z","receivedAt":"2009-02-28T18:34:27Z","isPatch":false,"sender":{"key":"tmz@pobox.com","avatar":"https://avatars.githubusercontent.com/u/806319?v=4"},"body":"Brent Goodrick wrote:\n> All I want to do in my case is just chmod 700 a bunch of scripts\n> after they are checked out or updated.  I'll need to re-read the\n> git-hooks man page more closely.\n\nYou may want to check contrib/hooks/setgitperms.perl as well, if you\nhaven't seen it already.\n\n-- \nTodd        OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nProblems are opportunity in work clothes.\n\n"},{"id":"106560","messageId":"e38bce640902281443x69bd64ebuf4aa784be220b6bb@mail.gmail.com","threadId":"18055","inReplyTo":"20090228183427.GN4505@inocybe.teonanacatl.org","subject":"Re: How can I force git to recognize a change change in file modes?","fromName":"Brent Goodrick","fromEmail":"bgoodr@gmail.com","sentAt":"2009-02-28T22:43:33Z","receivedAt":"2009-02-28T22:43:33Z","isPatch":false,"sender":{"key":"bgoodr@gmail.com","avatar":"https://gravatar.com/avatar/2399bf5a3468b3516a892183edfd43a7fa0300a2e9d5072189020186961150bc?d=mp&s=160"},"body":"On Sat, Feb 28, 2009 at 10:34 AM, Todd Zullinger <tmz@pobox.com> wrote:\n> You may want to check contrib/hooks/setgitperms.perl as well, if you\n> haven't seen it already.\n\nYes I did see that. I'll be varying that approach a bit since I won't\nneed to preserve perm bits before and after the git operation, but\njust force them to be a specific value all the time after checkout and\nupdate.\n\nbg\n"}]}