Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #71927
| Path | csiph.com!usenet.pasdenom.info!dedibox.gegeweb.org!gegeweb.eu!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <fomcl@yahoo.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.006 |
| X-Spam-Evidence | '*H*': 0.99; '*S*': 0.00; 'url:bitbucket': 0.05; 'linux,': 0.07; 'reject': 0.07; 'users,': 0.07; '22,': 0.09; 'exist,': 0.09; 'git': 0.09; 'used.': 0.09; 'python': 0.11; 'wrote': 0.14; 'windows': 0.15; '(should': 0.16; '*must*': 0.16; '.py': 0.16; 'as-is': 0.16; 'subject:skip:e 10': 0.16; 'subject:windows': 0.16; 'url:peps': 0.16; 'windows:': 0.16; 'thursday,': 0.16; 'url:)': 0.16; 'url:dev': 0.24; '(or': 0.24; 'script': 0.25; 'header:In-Reply-To:1': 0.27; 'to:2**1': 0.27; 'tried': 0.27; "skip:' 10": 0.31; 'supposed': 0.32; 'url:python': 0.33; '(e.g.': 0.33; '-----': 0.33; 'knows': 0.35; 'case,': 0.35; 'but': 0.35; 'add': 0.35; 'version': 0.36; 'hi,': 0.36; 'url:org': 0.36; 'should': 0.36; 'to:addr:python-list': 0.38; 'files': 0.38; 'does': 0.39; 'subject:': 0.39; 'to:addr:python.org': 0.39; 'how': 0.40; 'read': 0.60; 'received:98.137': 0.60; 'save': 0.62; 'name': 0.63; 'header:Reply-To:1': 0.67; 'received:gq1.yahoo.com': 0.68; 'received:mail.gq1.yahoo.com': 0.68; 'subject: & ': 0.68; 'received:98.136': 0.69; 'below.': 0.71; 'risk': 0.72; 'to:addr:yahoo.com': 0.81; 'received:bullet.mail.gq1.yahoo.com': 0.84 |
| X-Yahoo-Newman-Property | ymail-3 |
| X-Yahoo-Newman-Id | 805784.12578.bm@omp1005.mail.gq1.yahoo.com |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1400853223; bh=HWtMP7RaKupsH0py/MnohwsKxjJr1y06JOiFwKbCDEs=; h=References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=SDvtv1QN63CVyLVEm+Sns64kpUaofCM9VYq61d2D94qSb4knXl3NSbitycpuTDEeM7+4PYWlBDvxulV/BB2QzkjRCizQW9sOyd/5f8efgELgeQaakBWT9cylTMDUcYBzxMSpu3gqJ0BCliIJazukfrj65k8QmylWFNjwbp8RQ7o= |
| X-YMail-OSG | 6fp3ax0VM1nm3JP_mKhV50rV3VOKEXOjeDdRZv3Uv8s81jS D30dmrKFf0sIXsxsfaTuYUPKoL9n9T26XgLqaxBTpSzCIRLo4kqKm3UVnSMD pFiA7Oh5W2Oy4G7YuvbQxrTH4rNqdOgazY6XCc33WYYRsjbuR48d9XMtkLmb gnO.vDnMD3IhBPF_prATBzM8zQOOyBqZY7HmNtipLOuNpNEdXpYFzJwcDcIf 8PotCf4m1xc2S1Zj.nrLE1rhXE5uO5VCaKWHS6vC2i9NLWppFafYlg3H95pb phKpkso9aPNkK_vYuF2iW_V_Lx2pDjDCtm0zIuTa73wURn86JTzWQFGgPAUv xRC86zTK8dEShFM96pNMxMHPLjhX23tOdrPdGqGNGKXzmVLdKyIlCpKtSTk. bmIK5gotSKIZatmz075WHL4CyaqoASJpykEli8NsKSumNHM7IQyVS8Pz5fjw imdw2gXUmnXtqJy8kMihazF8.V3ZTwF.cEAB32dXgJ28sLCqWGO5VLA_hPJB _4QVTqGPye80K.8T7Ekm_HpRhtUGvy_JDpJ6OxlfSKZpxG83TtZJlvDx.hFy 0yQMF1RkCF8rQjTL.nq0mO2wRyBMC9kGrstDEQLMOPQxur.UFkzmY_dbJ3mj sh19O6rXRLLiUHraI8D7TYLYPKvk15HrZ35wcrYWwB0oMcslACWGKh5i7dhL IdIg8Jgw- |
| X-Rocket-MIMEInfo | 002.001, LS0tLS0gT3JpZ2luYWwgTWVzc2FnZSAtLS0tLQo.IEZyb206IEFsYmVydC1KYW4gUm9za2FtIDxmb21jbEB5YWhvby5jb20uZG1hcmMuaW52YWxpZD4KPiBUbzogUHl0aG9uIDxweXRob24tbGlzdEBweXRob24ub3JnPgo.IENjOiAKPiBTZW50OiBUaHVyc2RheSwgTWF5IDIyLCAyMDE0IDY6NTggUE0KPiBTdWJqZWN0OiBzaGViYW5nICYgd2luZG93czogY2FsbCBhbiBleHRlbnNpb25sZXNzIGdpdCBob29rCj4gCj4gSGksCj4gCj4gSSB3cm90ZSB0aGUgZ2l0IHByZS1jb21taXQgaG9vayBiZWxvdy4gSXQgaXMBMAEBAQE- |
| X-Mailer | YahooMailWebService/0.8.188.663 |
| References | <1400777937.43633.YahooMailNeo@web163802.mail.gq1.yahoo.com> |
| Date | Fri, 23 May 2014 06:53:43 -0700 (PDT) |
| From | Albert-Jan Roskam <fomcl@yahoo.com> |
| Subject | Re: shebang & windows: call an extensionless git hook |
| To | Albert-Jan Roskam <fomcl@yahoo.com>, Python <python-list@python.org> |
| In-Reply-To | <1400777937.43633.YahooMailNeo@web163802.mail.gq1.yahoo.com> |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=iso-8859-1 |
| Content-Transfer-Encoding | quoted-printable |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| Reply-To | Albert-Jan Roskam <fomcl@yahoo.com> |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.10244.1400853350.18130.python-list@python.org> (permalink) |
| Lines | 19 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1400853350 news.xs4all.nl 2895 [2001:888:2000:d::a6]:37295 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:71927 |
Show key headers only | View raw
----- Original Message ----- > From: Albert-Jan Roskam <fomcl@yahoo.com.dmarc.invalid> > To: Python <python-list@python.org> > Cc: > Sent: Thursday, May 22, 2014 6:58 PM > Subject: shebang & windows: call an extensionless git hook > > Hi, > > I wrote the git pre-commit hook below. It is supposed to reject commits that > contain large files (e.g. accidental commits by inexperienced users, think of > "git add .") > > > Anyway, I tried this under Linux, but the target platform is Windows. As per Git > design the hook name *must* be "pre-commit" (no .py extension). How > will Windows know that Python should be run? And (should it be relevant): how > does Windows know which Python version to invoke? I read about custom shebangs > with Pylauncher. Is that my only option? (see: > https://bitbucket.org/vinay.sajip/pylauncher, > http://legacy.python.org/dev/peps/pep-0397/) Ok, I just found out that the script works as-is under Windows (I need to save it as 'pre-commit', not as 'pre-commit.py'. That's great, though I still don't understand how Windows (or Git) knows how to do with it. And under Windows chmod +x does not exist, which means the hook is always ready to be used. This is exactly what I want in this case, but in general this poses a security risk regards, Albert-Jan
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: shebang & windows: call an extensionless git hook Albert-Jan Roskam <fomcl@yahoo.com> - 2014-05-23 06:53 -0700
csiph-web