X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Message-ID: <4EFCE87E.9030202@bopp.net> Date: Thu, 29 Dec 2011 16:23:58 -0600 From: Jeremy Bopp User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111124 Thunderbird/8.0 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: Distributed Git not compiled under Cygwin? References: <33047124 DOT post AT talk DOT nabble DOT com> <4EFB8FC1 DOT 7060307 AT bopp DOT net> <4EFB9714 DOT 2070103 AT bopp DOT net> <33049604 DOT post AT talk DOT nabble DOT com> <4EFC834D DOT 5090805 AT bopp DOT net> <33052021 DOT post AT talk DOT nabble DOT com> <4EFCD4A5 DOT 70206 AT bopp DOT net> <33052301 DOT post AT talk DOT nabble DOT com> In-Reply-To: <33052301.post@talk.nabble.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On 12/29/2011 03:44 PM, cxira wrote: > I moved away from msysgit because it wasn't displaying colors properly in > mintty. As for a vim script, I put together something that executes `chmod > 0644` when saving new files only: > > " Change permissions on new files to be 0644 in cygwin > augroup filePerms > autocmd! > autocmd BufWritePre * call NewFileTest() > augroup END > function! NewFileTest() > if !filereadable(expand('')) > " If the file cannot be found pre-write, add a post-write command > autocmd filePerms BufWritePost * call NewFileAlter() > endif > endfunction > function! NewFileAlter() > " Remove command after it is executed once > autocmd! filePerms BufWritePost > " Change permissions > silent execute "!C:\\cygwin\\bin\\bash.exe -c \"/usr/bin/chmod 0644 '" . > substitute(expand(""), "^\\(.\\):/", "/cygdrive/\\1/", "") . "'\"" > endfunction > > There's a very brief appearance of the command prompt when I save a new > file, but I think it's a suitable and portable solution. Thanks for the > help. Good stuff. You can avoid the window that pops up by using the run.exe program to kick off your chmod command rather than bash. It's available in the run package. -Jeremy -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple