Re: [PATCH/RFC] remove #!interpreter line from shell libraries

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH/RFC] remove #!interpreter line from shell libraries

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:53:17

Marc Branchaud [off-list ref] writes:
On 12-03-09 02:58 AM, Clemens Buchacher wrote:
quoted
Hi Jonathan,

On Thu, Mar 08, 2012 at 06:14:04AM -0600, Jonathan Nieder wrote:
quoted
--- a/git-mergetool--lib.sh
+++ b/git-mergetool--lib.sh
@@ -1,5 +1,4 @@
-#!/bin/sh
-# git-mergetool--lib is a library for common merge tool functions
+# git-mergetool--lib is a shell library for common merge tool functions
This breaks vim's filetype detection. It can still guess the file type
from the .sh extension, but we strip the extension during the build.
Then that _is_ a feature to make it more obvious that the file is
not something you should be editing, no?
How about a modeline ...
(Now I'll wince and duck as people "calmly" discuss the merits of putting
editor-specific modelines in the source code, and especially which editors
deserve such treatment...)
Please, no "Local Variables:" or "# vim:".  Just don't impose
personal taste in editor settings to others.

Re: [PATCH/RFC] remove #!interpreter line from shell libraries

From: Clemens Buchacher <hidden>
Date: 2016-06-15 22:53:17

On Mon, Mar 12, 2012 at 12:50:15PM -0700, Junio C Hamano wrote:
quoted
On 12-03-09 02:58 AM, Clemens Buchacher wrote:
quoted
On Thu, Mar 08, 2012 at 06:14:04AM -0600, Jonathan Nieder wrote:
quoted
-#!/bin/sh
-# git-mergetool--lib is a library for common merge tool functions
+# git-mergetool--lib is a shell library for common merge tool functions
This breaks vim's filetype detection. It can still guess the file type
from the .sh extension, but we strip the extension during the build.
Then that _is_ a feature to make it more obvious that the file is
not something you should be editing, no?
If that really is an issue, then we should make it write-protected.
Syntax highlighting is primarily useful for reading.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help