Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed1.swip.net!uio.no!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: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.024 X-Spam-Evidence: '*H*': 0.95; '*S*': 0.00; 'git': 0.09; 'parsing': 0.09; 'cc:addr:python-list': 0.11; 'mostly': 0.14; 'windows': 0.15; '23,': 0.16; 'as-is': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'operation.': 0.16; 'subject:skip:e 10': 0.16; 'subject:windows': 0.16; 'work"': 0.16; 'wrote:': 0.18; 'cc:addr:python.org': 0.22; '(or': 0.24; 'cc:2**0': 0.24; 'script': 0.25; 'header:In-Reply-To:1': 0.27; 'unix': 0.29; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; "skip:' 10": 0.31; 'probably': 0.32; 'stuff': 0.32; 'running': 0.33; 'fri,': 0.33; 'knows': 0.35; 'received:google.com': 0.35; 'so,': 0.37; 'pm,': 0.38; 'how': 0.40; 'letters': 0.60; 'save': 0.62; 'policy.': 0.68; 'subject: & ': 0.68; 'amazed': 0.84; 'differences,': 0.84; "everything's": 0.84; 'to:none': 0.92 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=ow7/e+cPIDFmyikXyxiIyfX+eTlCDq2rvS9vC/H5RHM=; b=RALxzpZKFTVtIaqGlSsvxApdnrlhrFOCp6tizACx1xQVr6AqQGAPui2EH7LCjkhgqy ta0IZ5PUdrOVp9PWBsklYNT/GtrGKL1uDjAdFtFB7tHm8wqV4ZKq38u2oB1TiQIMEjwZ MmoNuh9kcw6kRnBJ5lsGuC6Pk8teuKb3ie7f5T6ertj4JDwE7AFAVWAtDvP+2o2Z4QbU u/DPv0a7wmUNjjOwUXO2blndH+6F6HhmEv7uHHFbOj0Y/IZHj+H7yeGnFcuQyAM91xAE +gpMVs41pXDp8cE8sAdDk16HUScoLHADuCh6feH+XerHIemWDXkA6POXcKGUwOHVV/WS BDcg== MIME-Version: 1.0 X-Received: by 10.53.12.229 with SMTP id et5mr3636990vdd.32.1400853698961; Fri, 23 May 2014 07:01:38 -0700 (PDT) In-Reply-To: <1400853223.2019.YahooMailNeo@web163806.mail.gq1.yahoo.com> References: <1400777937.43633.YahooMailNeo@web163802.mail.gq1.yahoo.com> <1400853223.2019.YahooMailNeo@web163806.mail.gq1.yahoo.com> Date: Sat, 24 May 2014 00:01:38 +1000 Subject: Re: shebang & windows: call an extensionless git hook From: Chris Angelico Cc: Python Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 12 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1400853707 news.xs4all.nl 2978 [2001:888:2000:d::a6]:40145 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:71928 On Fri, May 23, 2014 at 11:53 PM, Albert-Jan Roskam wrote: > 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. > Are you running git from inside bash? If so, it's probably parsing the shebang and simulating a Unixesque environment, as part of the whole "let's try to make Unix stuff mostly work" policy. I'm amazed at how well it actually works; from drive letters to execution differences, everything's somehow finagled into operation. ChrisA