Re: git: Tralining whitespace error during commit

2007-09-04 Thread Larry Hall (Cygwin)

Eric Blake wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

According to Eric Blake on 8/9/2007 11:07 AM:
And yet another, which I have been considering doing the next time I package 
git (right now, I'm kind of waiting for git 1.5.3 to come out),


1.5.3 is out, so I'm in the middle of packaging it.

is to override 
the upstream git's decision that on cygwin, the templates installed 
in /usr/share/git-core/templates are installed with executable permissions; 
whereas on Linux, they are installed without.  In other words, _somebody_ (not 
me) thought that because windows permissions can't be relied on, that ALL git 
hooks should be enabled by default;


And that somebody is setup.exe.  The tar file has the correct
non-executable permissions, but setup.exe insists on giving the files full
executable permissions, perhaps because they start with #!.  So I'm adding
a postinstall that undoes the damage.



snip

I thought that this was just a Windows-ism.  Windows likes files to be
executable so that you can invoke the application that is associated with
a file just by typing the name at a command line (or other method for
invoking CreateProcess()).  'setup.exe' uses the Windows permission model
to untar files.  Until/if 'setup.exe' gains support for Cygwin's ntsec
abilities, resetting the permissions after the fact makes sense.

--
Larry Hall  http://www.rfk.com
RFK Partners, Inc.  (508) 893-9779 - RFK Office
216 Dalton Rd.  (508) 893-9889 - FAX
Holliston, MA 01746

_

A: Yes.
 Q: Are you sure?
 A: Because it reverses the logical flow of conversation.
 Q: Why is top posting annoying in email?

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: git: Tralining whitespace error during commit

2007-09-03 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

According to Eric Blake on 8/9/2007 11:07 AM:
 And yet another, which I have been considering doing the next time I package 
 git (right now, I'm kind of waiting for git 1.5.3 to come out),

1.5.3 is out, so I'm in the middle of packaging it.

 is to override 
 the upstream git's decision that on cygwin, the templates installed 
 in /usr/share/git-core/templates are installed with executable permissions; 
 whereas on Linux, they are installed without.  In other words, _somebody_ 
 (not 
 me) thought that because windows permissions can't be relied on, that ALL git 
 hooks should be enabled by default;

And that somebody is setup.exe.  The tar file has the correct
non-executable permissions, but setup.exe insists on giving the files full
executable permissions, perhaps because they start with #!.  So I'm adding
a postinstall that undoes the damage.

 whereas on Linux, where permissions are 
 reliable, ALL git hooks are disabled by default and you must chmod +x them to 
 turn them on.  This seems inconsistent to me, but not to the point that I 
 have 
 complained upstream on the git mailing list; perhaps you'd like to raise the 
 point there?

Not an upstream bug after all.

- --
Don't work too hard, make some time for fun as well!

Eric Blake [EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFG3MpU84KuGfSFAYARAl+5AKCASnJtpF1NyLOZk6BRKlOMgHgAugCggB56
2KmMFb7BTPR6yNVOYFXjBJE=
=JSN2
-END PGP SIGNATURE-

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



git: Tralining whitespace error during commit

2007-08-09 Thread Matt Seitz \(matseitz\)
When I run git commit to check in changes to my
/cygdrive/c/windows/system32/drivers/etc/hosts file, I receive the
following error messages like the following (Note:  I've changed the
host name and IP addresses to protect its identity):

[EMAIL PROTECTED] /cygdrive/c/windows/system32/drivers/etc
$ git commit
*
* You have some suspicious patch lines:
*
* In hosts
* trailing whitespace (line 20)
hosts:20:10.10.10.10 host1.example.com

[EMAIL PROTECTED] /cygdrive/c/windows/system32/drivers/etc
$

I found one suggested fix at
http://www.dont-panic.cc/capi/2007/07/13/git-on-windows-you-have-some-s
uspicious-patch-lines/:

To solve the problem, you need to edit .git/hooks/pre-commit and
comment out the following lines:

if (/\s$/) {
bad_line(trailing whitespace, $_);
}

Is this the best solution?







--
Matt Seitz
Manager, File System Virtualization
Cisco Systems, Inc.
.:|:.:|:. 


cygcheck.out
Description: cygcheck.out
--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/

Re: git: Tralining whitespace error during commit

2007-08-09 Thread Eric Blake
Matt Seitz (matseitz matseitz at cisco.com writes:

 To solve the problem, you need to edit .git/hooks/pre-commit and
 comment out the following lines:
 
 if (/\s$/) {
 bad_line(trailing whitespace, $_);
 }
 
 Is this the best solution?

It's one approach.

Another is disabling the pre-commit hook in your repository altogether, by 
chmod a-x .git/hooks/pre-commit.

And yet another, which I have been considering doing the next time I package 
git (right now, I'm kind of waiting for git 1.5.3 to come out), is to override 
the upstream git's decision that on cygwin, the templates installed 
in /usr/share/git-core/templates are installed with executable permissions; 
whereas on Linux, they are installed without.  In other words, _somebody_ (not 
me) thought that because windows permissions can't be relied on, that ALL git 
hooks should be enabled by default; whereas on Linux, where permissions are 
reliable, ALL git hooks are disabled by default and you must chmod +x them to 
turn them on.  This seems inconsistent to me, but not to the point that I have 
complained upstream on the git mailing list; perhaps you'd like to raise the 
point there?

 
 Attachment (cygcheck.out): application/octet-stream, 11 KiB
 
 When I run git commit to check in changes to my

Attaching the contents of your email was rather redundant.  You may want to 
revisit how your mailer is set up.

-- 
Eric Blake
volunteer cygwin git maintainer




--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/