* How can I force git to recognize a change change in file modes?
@ 2009-02-28 1:17 Brent Goodrick
2009-02-28 1:25 ` Lars Noschinski
2009-02-28 3:55 ` Jan Krüger
0 siblings, 2 replies; 8+ messages in thread
From: Brent Goodrick @ 2009-02-28 1:17 UTC (permalink / raw)
To: git
Hi,
I checked in a slew of scripts, only to realize that the file
permissions were too open (I want them to be chmod 700, not chmod
755). Somehow I thought that git was tracking those permission bits,
but simply using "chmod 700 <fileset>; git add <fileset>" did not add
the change of file modes, well, at least git status output doesn't
show it. Is there a way to do this?
Thanks,
Brent
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: How can I force git to recognize a change change in file modes?
2009-02-28 1:17 How can I force git to recognize a change change in file modes? Brent Goodrick
@ 2009-02-28 1:25 ` Lars Noschinski
2009-02-28 3:55 ` Jan Krüger
1 sibling, 0 replies; 8+ messages in thread
From: Lars Noschinski @ 2009-02-28 1:25 UTC (permalink / raw)
To: git
* Brent Goodrick <bgoodr@gmail.com> [09-02-28 02:17]:
> I checked in a slew of scripts, only to realize that the file
> permissions were too open (I want them to be chmod 700, not chmod
> 755). Somehow I thought that git was tracking those permission bits,
> but simply using "chmod 700 <fileset>; git add <fileset>" did not add
> the change of file modes, well, at least git status output doesn't
> show it. Is there a way to do this?
Git does only track the executable bit.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: How can I force git to recognize a change change in file modes?
2009-02-28 1:17 How can I force git to recognize a change change in file modes? Brent Goodrick
2009-02-28 1:25 ` Lars Noschinski
@ 2009-02-28 3:55 ` Jan Krüger
2009-02-28 16:24 ` Brent Goodrick
1 sibling, 1 reply; 8+ messages in thread
From: Jan Krüger @ 2009-02-28 3:55 UTC (permalink / raw)
To: Brent Goodrick; +Cc: git
Hi,
> I checked in a slew of scripts, only to realize that the file
> permissions were too open (I want them to be chmod 700, not chmod
> 755). Somehow I thought that git was tracking those permission bits,
> but simply using "chmod 700 <fileset>; git add <fileset>" did not add
> the change of file modes, well, at least git status output doesn't
> show it. Is there a way to do this?
git doesn't track permissions quite that closely; all it remembers is
whether the file should be executable or not.
-Jan
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: How can I force git to recognize a change change in file modes?
2009-02-28 3:55 ` Jan Krüger
@ 2009-02-28 16:24 ` Brent Goodrick
2009-02-28 16:52 ` Jay Soffian
0 siblings, 1 reply; 8+ messages in thread
From: Brent Goodrick @ 2009-02-28 16:24 UTC (permalink / raw)
To: Jan Krüger; +Cc: git
> git doesn't track permissions quite that closely; all it remembers is
> whether the file should be executable or not.
Thanks Jan. Was this choice made due to the conditional coding
required to track the permission bits content between *NIX and
non-*NIX platform(s)?
bg
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: How can I force git to recognize a change change in file modes?
2009-02-28 16:24 ` Brent Goodrick
@ 2009-02-28 16:52 ` Jay Soffian
2009-02-28 17:34 ` Brent Goodrick
0 siblings, 1 reply; 8+ messages in thread
From: Jay Soffian @ 2009-02-28 16:52 UTC (permalink / raw)
To: Brent Goodrick; +Cc: Jan Krüger, git
On Sat, Feb 28, 2009 at 11:24 AM, Brent Goodrick <bgoodr@gmail.com> wrote:
> Thanks Jan. Was this choice made due to the conditional coding
> required to track the permission bits content between *NIX and
> non-*NIX platform(s)?
The short answer is: because Git was designed to track content. The
long answer is more complicated. Here's one of the more useful past
discussions:
http://thread.gmane.org/gmane.comp.version-control.git/91783
I'm sure you can find others by searching the git list for "metadata".
j.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: How can I force git to recognize a change change in file modes?
2009-02-28 16:52 ` Jay Soffian
@ 2009-02-28 17:34 ` Brent Goodrick
2009-02-28 18:34 ` Todd Zullinger
0 siblings, 1 reply; 8+ messages in thread
From: Brent Goodrick @ 2009-02-28 17:34 UTC (permalink / raw)
To: Jay Soffian; +Cc: Jan Krüger, git
> The short answer is: because Git was designed to track content. The
> long answer is more complicated. Here's one of the more useful past
> discussions:
>
> http://thread.gmane.org/gmane.comp.version-control.git/91783
>
> I'm sure you can find others by searching the git list for "metadata".
I read that thread you showed above. Sounds like a big squirmy
can-o-worms, and I see that thread died on the vine because of it. :)
All I want to do in my case is just chmod 700 a bunch of scripts after
they are checked out or updated. I'll need to re-read the git-hooks
man page more closely.
Thanks for your help!
bg
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: How can I force git to recognize a change change in file modes?
2009-02-28 17:34 ` Brent Goodrick
@ 2009-02-28 18:34 ` Todd Zullinger
2009-02-28 22:43 ` Brent Goodrick
0 siblings, 1 reply; 8+ messages in thread
From: Todd Zullinger @ 2009-02-28 18:34 UTC (permalink / raw)
To: Brent Goodrick; +Cc: Jay Soffian, Jan Krüger, git
[-- Attachment #1: Type: text/plain, Size: 489 bytes --]
Brent Goodrick wrote:
> All I want to do in my case is just chmod 700 a bunch of scripts
> after they are checked out or updated. I'll need to re-read the
> git-hooks man page more closely.
You may want to check contrib/hooks/setgitperms.perl as well, if you
haven't seen it already.
--
Todd OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Problems are opportunity in work clothes.
[-- Attachment #2: Type: application/pgp-signature, Size: 542 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: How can I force git to recognize a change change in file modes?
2009-02-28 18:34 ` Todd Zullinger
@ 2009-02-28 22:43 ` Brent Goodrick
0 siblings, 0 replies; 8+ messages in thread
From: Brent Goodrick @ 2009-02-28 22:43 UTC (permalink / raw)
To: Todd Zullinger; +Cc: Jay Soffian, Jan Krüger, git
On Sat, Feb 28, 2009 at 10:34 AM, Todd Zullinger <tmz@pobox.com> wrote:
> You may want to check contrib/hooks/setgitperms.perl as well, if you
> haven't seen it already.
Yes I did see that. I'll be varying that approach a bit since I won't
need to preserve perm bits before and after the git operation, but
just force them to be a specific value all the time after checkout and
update.
bg
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2009-02-28 22:45 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-28 1:17 How can I force git to recognize a change change in file modes? Brent Goodrick
2009-02-28 1:25 ` Lars Noschinski
2009-02-28 3:55 ` Jan Krüger
2009-02-28 16:24 ` Brent Goodrick
2009-02-28 16:52 ` Jay Soffian
2009-02-28 17:34 ` Brent Goodrick
2009-02-28 18:34 ` Todd Zullinger
2009-02-28 22:43 ` Brent Goodrick
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).