{"thread":{"id":"35405","subject":"[PATCH 0/9] War on #! lines in shell libraries","startedAt":"2013-11-25T20:51:19Z","lastAt":"2013-11-26T21:39:51Z","messageCount":13,"participants":["Jonathan Nieder","Eric Sunshine","Pete Wyckoff"],"isPatch":true,"patchVersion":1,"patchTotal":9},"messages":[{"id":"231100","messageId":"20131125205119.GQ4212@google.com","threadId":"35405","inReplyTo":null,"subject":"[PATCH 0/9] War on #! lines in shell libraries","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2013-11-25T20:51:19Z","receivedAt":"2013-11-25T20:51:19Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Hi,\n\nThis is an old series that I just wanted to flush out of my working\ndirectory.  It does two things:\n\nOn one hand, it replaces the line\n\n\t#!/bin/sh\n\nat the start of shell libraries with a simple comment\n\n\t# Shell library for <etc, explaining how it is used>\n\nto avoid confusing readers into thinking the shell library is going to\nbe run directly with /bin/sh.  And on the other hand, it sets the\nexecutable bit on actual scripts that are run directly with /bin/sh.\n(Likewise for some perl scripts, too.)\n\nThe heart of the series has been well tested in the context of Debian\ngit for a couple of years.  Thanks to list denizens for the\nimprovements last time I brought it up[1].  Hopefully this version is\nmore sensible.\n\nAnyway, hopefully it can provide some amusement.\n\nThanks,\nJonathan Nieder (9):\n  mark Windows build scripts executable\n  mark perl test scripts executable\n  mark contributed hooks executable\n  contrib: remove git-p4import\n  gitk: chmod +x po2msg\n  git-gui: chmod +x po2msg, windows/git-gui.sh\n  test: make FILEMODE a lazy prereq\n  test: replace shebangs with descriptions in shell libraries\n  remove #!interpreter line from shell libraries\n\n[1] http://thread.gmane.org/gmane.comp.version-control.git/192582\n\n compat/vcbuild/scripts/clink.pl        |   0\n compat/vcbuild/scripts/lib.pl          |   0\n contrib/buildsystems/engine.pl         |   0\n contrib/buildsystems/generate          |   0\n contrib/buildsystems/parse.pl          |   0\n contrib/completion/git-completion.bash |   2 -\n contrib/completion/git-completion.tcsh |   2 -\n contrib/hooks/post-receive-email       |   1 -\n contrib/hooks/pre-auto-gc-battery      |   1 -\n contrib/hooks/setgitperms.perl         |   0\n contrib/hooks/update-paranoid          |   0\n contrib/p4import/README                |   1 -\n contrib/p4import/git-p4import.py       | 365 ---------------------------------\n contrib/p4import/git-p4import.txt      | 167 ---------------\n git-gui/po/po2msg.sh                   |   0\n git-gui/windows/git-gui.sh             |   0\n git-mergetool--lib.sh                  |   3 +-\n git-parse-remote.sh                    |   4 +-\n git-rebase--am.sh                      |   3 +-\n git-rebase--interactive.sh             |   9 +-\n git-rebase--merge.sh                   |   4 +-\n git-sh-i18n.sh                         |   5 +-\n git-sh-setup.sh                        |   9 +-\n gitk-git/po/po2msg.sh                  |   0\n t/Git-SVN/00compile.t                  |   0\n t/Git-SVN/Utils/add_path_to_url.t      |   0\n t/Git-SVN/Utils/can_compress.t         |   0\n t/Git-SVN/Utils/canonicalize_url.t     |   0\n t/Git-SVN/Utils/collapse_dotdot.t      |   0\n t/Git-SVN/Utils/fatal.t                |   0\n t/Git-SVN/Utils/join_paths.t           |   0\n t/gitweb-lib.sh                        |   3 +-\n t/lib-bash.sh                          |   7 +-\n t/lib-cvs.sh                           |   2 +-\n t/lib-diff-alternative.sh              |   3 +-\n t/lib-gettext.sh                       |   3 +-\n t/lib-git-daemon.sh                    |  18 +-\n t/lib-httpd.sh                         |  29 ++-\n t/lib-pack.sh                          |   2 -\n t/lib-pager.sh                         |   2 +-\n t/lib-prereq-FILEMODE.sh               |  11 -\n t/lib-read-tree.sh                     |   2 -\n t/lib-rebase.sh                        |   2 +-\n t/lib-terminal.sh                      |   2 +-\n t/perf/perf-lib.sh                     |   4 +-\n t/t0202/test.pl                        |   0\n t/t3701-add-interactive.sh             |   1 -\n t/t4102-apply-rename.sh                |   1 -\n t/t4120-apply-popt.sh                  |   1 -\n t/t4129-apply-samemode.sh              |   1 -\n t/t6031-merge-recursive.sh             |   1 -\n t/t9150/make-svk-dump                  |   0\n t/t9151/make-svnmerge-dump             |   0\n t/t9200-git-cvsexportcommit.sh         |   1 -\n t/test-lib-functions.sh                |   3 +-\n t/test-lib.sh                          |  12 +-\n 56 files changed, 87 insertions(+), 600 deletions(-)\n mode change 100644 => 100755 compat/vcbuild/scripts/clink.pl\n mode change 100644 => 100755 compat/vcbuild/scripts/lib.pl\n mode change 100644 => 100755 contrib/buildsystems/engine.pl\n mode change 100644 => 100755 contrib/buildsystems/generate\n mode change 100644 => 100755 contrib/buildsystems/parse.pl\n mode change 100644 => 100755 contrib/hooks/pre-auto-gc-battery\n mode change 100644 => 100755 contrib/hooks/setgitperms.perl\n mode change 100644 => 100755 contrib/hooks/update-paranoid\n delete mode 100644 contrib/p4import/README\n delete mode 100644 contrib/p4import/git-p4import.py\n delete mode 100644 contrib/p4import/git-p4import.txt\n mode change 100644 => 100755 git-gui/po/po2msg.sh\n mode change 100644 => 100755 git-gui/windows/git-gui.sh\n mode change 100644 => 100755 gitk-git/po/po2msg.sh\n mode change 100644 => 100755 t/Git-SVN/00compile.t\n mode change 100644 => 100755 t/Git-SVN/Utils/add_path_to_url.t\n mode change 100644 => 100755 t/Git-SVN/Utils/can_compress.t\n mode change 100644 => 100755 t/Git-SVN/Utils/canonicalize_url.t\n mode change 100644 => 100755 t/Git-SVN/Utils/collapse_dotdot.t\n mode change 100644 => 100755 t/Git-SVN/Utils/fatal.t\n mode change 100644 => 100755 t/Git-SVN/Utils/join_paths.t\n delete mode 100644 t/lib-prereq-FILEMODE.sh\n mode change 100644 => 100755 t/t0202/test.pl\n mode change 100644 => 100755 t/t9150/make-svk-dump\n mode change 100644 => 100755 t/t9151/make-svnmerge-dump\n\n-- \n1.8.4.1\n"},{"id":"231106","messageId":"20131125205244.GR4212@google.com","threadId":"35405","inReplyTo":"20131125205119.GQ4212@google.com","subject":"[PATCH 1/9] mark Windows build scripts executable","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2013-11-25T20:52:44Z","receivedAt":"2013-11-25T20:52:44Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"On Windows the convention is to rely on filename extensions to decide\nwhether a file is executable so Windows users are probably not relying\non the executable bit of these scripts, but on other platforms it can\nbe useful documentation.\n\nSigned-off-by: Jonathan Nieder <jrnieder@gmail.com>\n---\n compat/vcbuild/scripts/clink.pl | 0\n compat/vcbuild/scripts/lib.pl   | 0\n contrib/buildsystems/engine.pl  | 0\n contrib/buildsystems/generate   | 0\n contrib/buildsystems/parse.pl   | 0\n 5 files changed, 0 insertions(+), 0 deletions(-)\n mode change 100644 => 100755 compat/vcbuild/scripts/clink.pl\n mode change 100644 => 100755 compat/vcbuild/scripts/lib.pl\n mode change 100644 => 100755 contrib/buildsystems/engine.pl\n mode change 100644 => 100755 contrib/buildsystems/generate\n mode change 100644 => 100755 contrib/buildsystems/parse.pl\n\ndiff --git a/compat/vcbuild/scripts/clink.pl b/compat/vcbuild/scripts/clink.pl\nold mode 100644\nnew mode 100755\ndiff --git a/compat/vcbuild/scripts/lib.pl b/compat/vcbuild/scripts/lib.pl\nold mode 100644\nnew mode 100755\ndiff --git a/contrib/buildsystems/engine.pl b/contrib/buildsystems/engine.pl\nold mode 100644\nnew mode 100755\ndiff --git a/contrib/buildsystems/generate b/contrib/buildsystems/generate\nold mode 100644\nnew mode 100755\ndiff --git a/contrib/buildsystems/parse.pl b/contrib/buildsystems/parse.pl\nold mode 100644\nnew mode 100755\n-- \n1.8.4.1\n"},{"id":"231102","messageId":"20131125205354.GS4212@google.com","threadId":"35405","inReplyTo":"20131125205119.GQ4212@google.com","subject":"[PATCH 2/9] mark perl test scripts executable","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2013-11-25T20:53:54Z","receivedAt":"2013-11-25T20:53:54Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"These scripts are not run directly as part of a normal build, so no\none noticed that they did not have the +x bit.  Mark them executable\nto make it more obvious that they can be run directly (when debugging,\nfor example).\n\nSigned-off-by: Jonathan Nieder <jrnieder@gmail.com>\n---\n t/Git-SVN/00compile.t              | 0\n t/Git-SVN/Utils/add_path_to_url.t  | 0\n t/Git-SVN/Utils/can_compress.t     | 0\n t/Git-SVN/Utils/canonicalize_url.t | 0\n t/Git-SVN/Utils/collapse_dotdot.t  | 0\n t/Git-SVN/Utils/fatal.t            | 0\n t/Git-SVN/Utils/join_paths.t       | 0\n t/t0202/test.pl                    | 0\n t/t9150/make-svk-dump              | 0\n t/t9151/make-svnmerge-dump         | 0\n 10 files changed, 0 insertions(+), 0 deletions(-)\n mode change 100644 => 100755 t/Git-SVN/00compile.t\n mode change 100644 => 100755 t/Git-SVN/Utils/add_path_to_url.t\n mode change 100644 => 100755 t/Git-SVN/Utils/can_compress.t\n mode change 100644 => 100755 t/Git-SVN/Utils/canonicalize_url.t\n mode change 100644 => 100755 t/Git-SVN/Utils/collapse_dotdot.t\n mode change 100644 => 100755 t/Git-SVN/Utils/fatal.t\n mode change 100644 => 100755 t/Git-SVN/Utils/join_paths.t\n mode change 100644 => 100755 t/t0202/test.pl\n mode change 100644 => 100755 t/t9150/make-svk-dump\n mode change 100644 => 100755 t/t9151/make-svnmerge-dump\n\ndiff --git a/t/Git-SVN/00compile.t b/t/Git-SVN/00compile.t\nold mode 100644\nnew mode 100755\ndiff --git a/t/Git-SVN/Utils/add_path_to_url.t b/t/Git-SVN/Utils/add_path_to_url.t\nold mode 100644\nnew mode 100755\ndiff --git a/t/Git-SVN/Utils/can_compress.t b/t/Git-SVN/Utils/can_compress.t\nold mode 100644\nnew mode 100755\ndiff --git a/t/Git-SVN/Utils/canonicalize_url.t b/t/Git-SVN/Utils/canonicalize_url.t\nold mode 100644\nnew mode 100755\ndiff --git a/t/Git-SVN/Utils/collapse_dotdot.t b/t/Git-SVN/Utils/collapse_dotdot.t\nold mode 100644\nnew mode 100755\ndiff --git a/t/Git-SVN/Utils/fatal.t b/t/Git-SVN/Utils/fatal.t\nold mode 100644\nnew mode 100755\ndiff --git a/t/Git-SVN/Utils/join_paths.t b/t/Git-SVN/Utils/join_paths.t\nold mode 100644\nnew mode 100755\ndiff --git a/t/t0202/test.pl b/t/t0202/test.pl\nold mode 100644\nnew mode 100755\ndiff --git a/t/t9150/make-svk-dump b/t/t9150/make-svk-dump\nold mode 100644\nnew mode 100755\ndiff --git a/t/t9151/make-svnmerge-dump b/t/t9151/make-svnmerge-dump\nold mode 100644\nnew mode 100755\n-- \n1.8.4.1\n"},{"id":"231103","messageId":"20131125205530.GT4212@google.com","threadId":"35405","inReplyTo":"20131125205119.GQ4212@google.com","subject":"[PATCH 3/9] mark contributed hooks executable","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2013-11-25T20:55:30Z","receivedAt":"2013-11-25T20:55:30Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"The docs in contrib/hooks/pre-auto-gc-battery suggest:\n\n\tFor example, if the hook is stored in\n\t/usr/share/git-core/contrib/hooks/pre-auto-gc-battery:\n\n\tchmod a+x pre-auto-gc-battery\n\tcd /path/to/your/repository.git\n\tln -sf /usr/share/git-core/contrib/hooks/pre-auto-gc-battery \\\n\t     hooks/pre-auto-gc\n\nUnfortunately on multi-user systems most users do not have write\naccess to /usr.  Better to mark the sample hooks executable in\nthe first place so users do not have to tweak their permissions to\nuse them by symlinking into .git/hooks/.\n\nReported-by: Olivier Berger <olivier.berger@it-sudparis.eu>\nSigned-off-by: Jonathan Nieder <jrnieder@gmail.com>\n---\n contrib/hooks/post-receive-email  | 1 -\n contrib/hooks/pre-auto-gc-battery | 1 -\n contrib/hooks/setgitperms.perl    | 0\n contrib/hooks/update-paranoid     | 0\n 4 files changed, 2 deletions(-)\n mode change 100644 => 100755 contrib/hooks/pre-auto-gc-battery\n mode change 100644 => 100755 contrib/hooks/setgitperms.perl\n mode change 100644 => 100755 contrib/hooks/update-paranoid\n\ndiff --git a/contrib/hooks/post-receive-email b/contrib/hooks/post-receive-email\nindex 8ee410f..8747b84 100755\n--- a/contrib/hooks/post-receive-email\n+++ b/contrib/hooks/post-receive-email\n@@ -22,7 +22,6 @@\n # For example, on debian the hook is stored in\n # /usr/share/git-core/contrib/hooks/post-receive-email:\n #\n-#  chmod a+x post-receive-email\n #  cd /path/to/your/repository.git\n #  ln -sf /usr/share/git-core/contrib/hooks/post-receive-email hooks/post-receive\n #\ndiff --git a/contrib/hooks/pre-auto-gc-battery b/contrib/hooks/pre-auto-gc-battery\nold mode 100644\nnew mode 100755\nindex 1f914c9..9d0c2d1\n--- a/contrib/hooks/pre-auto-gc-battery\n+++ b/contrib/hooks/pre-auto-gc-battery\n@@ -13,7 +13,6 @@\n # For example, if the hook is stored in\n # /usr/share/git-core/contrib/hooks/pre-auto-gc-battery:\n #\n-# chmod a+x pre-auto-gc-battery\n # cd /path/to/your/repository.git\n # ln -sf /usr/share/git-core/contrib/hooks/pre-auto-gc-battery \\\n #\thooks/pre-auto-gc\ndiff --git a/contrib/hooks/setgitperms.perl b/contrib/hooks/setgitperms.perl\nold mode 100644\nnew mode 100755\ndiff --git a/contrib/hooks/update-paranoid b/contrib/hooks/update-paranoid\nold mode 100644\nnew mode 100755\n-- \n1.8.4.1\n"},{"id":"231104","messageId":"20131125205847.GU4212@google.com","threadId":"35405","inReplyTo":"20131125205119.GQ4212@google.com","subject":"[PATCH 4/9] contrib: remove git-p4import","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2013-11-25T20:58:48Z","receivedAt":"2013-11-25T20:58:48Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"The git p4import documentation has suggested git p4 as a better\nalternative for more than 6 years.  (According to the mailing list\ndiscussion when it was moved to contrib/, git-p4import has serious\nbugs --- e.g., its incremental mode just doesn't work.) Since then,\ngit p4 has been actively developed and was promoted to a standard git\ncommand alongside git svn.\n\nSearches on google.com/trends and stackoverflow suggest that no one is\nlooking for git-p4import any more.  Remove it.\n\nNoticed while considering marking the contrib/p4import/git-p4import.py\nscript executable as part of a wider sweep.\n\nSigned-off-by: Jonathan Nieder <jrnieder@gmail.com>\n---\nFollowing up on\nhttp://thread.gmane.org/gmane.comp.version-control.git/52580\n\n contrib/p4import/README           |   1 -\n contrib/p4import/git-p4import.py  | 365 --------------------------------------\n contrib/p4import/git-p4import.txt | 167 -----------------\n 3 files changed, 533 deletions(-)\n delete mode 100644 contrib/p4import/README\n delete mode 100644 contrib/p4import/git-p4import.py\n delete mode 100644 contrib/p4import/git-p4import.txt\n\ndiff --git a/contrib/p4import/README b/contrib/p4import/README\ndeleted file mode 100644\nindex b9892b6..0000000\n--- a/contrib/p4import/README\n+++ /dev/null\n@@ -1 +0,0 @@\n-Please see contrib/fast-import/git-p4 for a better Perforce importer.\ndiff --git a/contrib/p4import/git-p4import.py b/contrib/p4import/git-p4import.py\ndeleted file mode 100644\nindex 593d6a0..0000000\n--- a/contrib/p4import/git-p4import.py\n+++ /dev/null\n@@ -1,365 +0,0 @@\n-#!/usr/bin/env python\n-#\n-# This tool is copyright (c) 2006, Sean Estabrooks.\n-# It is released under the Gnu Public License, version 2.\n-#\n-# Import Perforce branches into Git repositories.\n-# Checking out the files is done by calling the standard p4\n-# client which you must have properly configured yourself\n-#\n-\n-import marshal\n-import os\n-import sys\n-import time\n-import getopt\n-\n-if sys.hexversion < 0x02020000:\n-   # The behavior of the marshal module changed significantly in 2.2\n-   sys.stderr.write(\"git-p4import.py: requires Python 2.2 or later.\\n\")\n-   sys.exit(1)\n-\n-from signal import signal, \\\n-   SIGPIPE, SIGINT, SIG_DFL, \\\n-   default_int_handler\n-\n-signal(SIGPIPE, SIG_DFL)\n-s = signal(SIGINT, SIG_DFL)\n-if s != default_int_handler:\n-   signal(SIGINT, s)\n-\n-def die(msg, *args):\n-    for a in args:\n-        msg = \"%s %s\" % (msg, a)\n-    print \"git-p4import fatal error:\", msg\n-    sys.exit(1)\n-\n-def usage():\n-    print \"USAGE: git-p4import [-q|-v]  [--authors=<file>]  [-t <timezone>]  [//p4repo/path <branch>]\"\n-    sys.exit(1)\n-\n-verbosity = 1\n-logfile = \"/dev/null\"\n-ignore_warnings = False\n-stitch = 0\n-tagall = True\n-\n-def report(level, msg, *args):\n-    global verbosity\n-    global logfile\n-    for a in args:\n-        msg = \"%s %s\" % (msg, a)\n-    fd = open(logfile, \"a\")\n-    fd.writelines(msg)\n-    fd.close()\n-    if level <= verbosity:\n-        print msg\n-\n-class p4_command:\n-    def __init__(self, _repopath):\n-        try:\n-            global logfile\n-            self.userlist = {}\n-            if _repopath[-1] == '/':\n-                self.repopath = _repopath[:-1]\n-            else:\n-                self.repopath = _repopath\n-            if self.repopath[-4:] != \"/...\":\n-                self.repopath= \"%s/...\" % self.repopath\n-            f=os.popen('p4 -V 2>>%s'%logfile, 'rb')\n-            a = f.readlines()\n-            if f.close():\n-                raise\n-        except:\n-                die(\"Could not find the \\\"p4\\\" command\")\n-\n-    def p4(self, cmd, *args):\n-        global logfile\n-        cmd = \"%s %s\" % (cmd, ' '.join(args))\n-        report(2, \"P4:\", cmd)\n-        f=os.popen('p4 -G %s 2>>%s' % (cmd,logfile), 'rb')\n-        list = []\n-        while 1:\n-           try:\n-                list.append(marshal.load(f))\n-           except EOFError:\n-                break\n-        self.ret = f.close()\n-        return list\n-\n-    def sync(self, id, force=False, trick=False, test=False):\n-        if force:\n-            ret = self.p4(\"sync -f %s@%s\"%(self.repopath, id))[0]\n-        elif trick:\n-            ret = self.p4(\"sync -k %s@%s\"%(self.repopath, id))[0]\n-        elif test:\n-            ret = self.p4(\"sync -n %s@%s\"%(self.repopath, id))[0]\n-        else:\n-            ret = self.p4(\"sync    %s@%s\"%(self.repopath, id))[0]\n-        if ret['code'] == \"error\":\n-             data = ret['data'].upper()\n-             if data.find('VIEW') > 0:\n-                 die(\"Perforce reports %s is not in client view\"% self.repopath)\n-             elif data.find('UP-TO-DATE') < 0:\n-                 die(\"Could not sync files from perforce\", self.repopath)\n-\n-    def changes(self, since=0):\n-        try:\n-            list = []\n-            for rec in self.p4(\"changes %s@%s,#head\" % (self.repopath, since+1)):\n-                list.append(rec['change'])\n-            list.reverse()\n-            return list\n-        except:\n-            return []\n-\n-    def authors(self, filename):\n-        f=open(filename)\n-        for l in f.readlines():\n-            self.userlist[l[:l.find('=')].rstrip()] = \\\n-                    (l[l.find('=')+1:l.find('<')].rstrip(),l[l.find('<')+1:l.find('>')])\n-        f.close()\n-        for f,e in self.userlist.items():\n-                report(2, f, \":\", e[0], \"  <\", e[1], \">\")\n-\n-    def _get_user(self, id):\n-        if not self.userlist.has_key(id):\n-            try:\n-                user = self.p4(\"users\", id)[0]\n-                self.userlist[id] = (user['FullName'], user['Email'])\n-            except:\n-                self.userlist[id] = (id, \"\")\n-        return self.userlist[id]\n-\n-    def _format_date(self, ticks):\n-        symbol='+'\n-        name = time.tzname[0]\n-        offset = time.timezone\n-        if ticks[8]:\n-            name = time.tzname[1]\n-            offset = time.altzone\n-        if offset < 0:\n-            offset *= -1\n-            symbol = '-'\n-        localo = \"%s%02d%02d %s\" % (symbol, offset / 3600, offset % 3600, name)\n-        tickso = time.strftime(\"%a %b %d %H:%M:%S %Y\", ticks)\n-        return \"%s %s\" % (tickso, localo)\n-\n-    def where(self):\n-        try:\n-            return self.p4(\"where %s\" % self.repopath)[-1]['path']\n-        except:\n-            return \"\"\n-\n-    def describe(self, num):\n-        desc = self.p4(\"describe -s\", num)[0]\n-        self.msg = desc['desc']\n-        self.author, self.email = self._get_user(desc['user'])\n-        self.date = self._format_date(time.localtime(long(desc['time'])))\n-        return self\n-\n-class git_command:\n-    def __init__(self):\n-        try:\n-            self.version = self.git(\"--version\")[0][12:].rstrip()\n-        except:\n-            die(\"Could not find the \\\"git\\\" command\")\n-        try:\n-            self.gitdir = self.get_single(\"rev-parse --git-dir\")\n-            report(2, \"gdir:\", self.gitdir)\n-        except:\n-            die(\"Not a git repository... did you forget to \\\"git init\\\" ?\")\n-        try:\n-            self.cdup = self.get_single(\"rev-parse --show-cdup\")\n-            if self.cdup != \"\":\n-                os.chdir(self.cdup)\n-            self.topdir = os.getcwd()\n-            report(2, \"topdir:\", self.topdir)\n-        except:\n-            die(\"Could not find top git directory\")\n-\n-    def git(self, cmd):\n-        global logfile\n-        report(2, \"GIT:\", cmd)\n-        f=os.popen('git %s 2>>%s' % (cmd,logfile), 'rb')\n-        r=f.readlines()\n-        self.ret = f.close()\n-        return r\n-\n-    def get_single(self, cmd):\n-        return self.git(cmd)[0].rstrip()\n-\n-    def current_branch(self):\n-        try:\n-            testit = self.git(\"rev-parse --verify HEAD\")[0]\n-            return self.git(\"symbolic-ref HEAD\")[0][11:].rstrip()\n-        except:\n-            return None\n-\n-    def get_config(self, variable):\n-        try:\n-            return self.git(\"config --get %s\" % variable)[0].rstrip()\n-        except:\n-            return None\n-\n-    def set_config(self, variable, value):\n-        try:\n-            self.git(\"config %s %s\"%(variable, value) )\n-        except:\n-            die(\"Could not set %s to \" % variable, value)\n-\n-    def make_tag(self, name, head):\n-        self.git(\"tag -f %s %s\"%(name,head))\n-\n-    def top_change(self, branch):\n-        try:\n-            a=self.get_single(\"name-rev --tags refs/heads/%s\" % branch)\n-            loc = a.find(' tags/') + 6\n-            if a[loc:loc+3] != \"p4/\":\n-                raise\n-            return int(a[loc+3:][:-2])\n-        except:\n-            return 0\n-\n-    def update_index(self):\n-        self.git(\"ls-files -m -d -o -z | git update-index --add --remove -z --stdin\")\n-\n-    def checkout(self, branch):\n-        self.git(\"checkout %s\" % branch)\n-\n-    def repoint_head(self, branch):\n-        self.git(\"symbolic-ref HEAD refs/heads/%s\" % branch)\n-\n-    def remove_files(self):\n-        self.git(\"ls-files | xargs rm\")\n-\n-    def clean_directories(self):\n-        self.git(\"clean -d\")\n-\n-    def fresh_branch(self, branch):\n-        report(1, \"Creating new branch\", branch)\n-        self.git(\"ls-files | xargs rm\")\n-        os.remove(\".git/index\")\n-        self.repoint_head(branch)\n-        self.git(\"clean -d\")\n-\n-    def basedir(self):\n-        return self.topdir\n-\n-    def commit(self, author, email, date, msg, id):\n-        self.update_index()\n-        fd=open(\".msg\", \"w\")\n-        fd.writelines(msg)\n-        fd.close()\n-        try:\n-                current = self.get_single(\"rev-parse --verify HEAD\")\n-                head = \"-p HEAD\"\n-        except:\n-                current = \"\"\n-                head = \"\"\n-        tree = self.get_single(\"write-tree\")\n-        for r,l in [('DATE',date),('NAME',author),('EMAIL',email)]:\n-            os.environ['GIT_AUTHOR_%s'%r] = l\n-            os.environ['GIT_COMMITTER_%s'%r] = l\n-        commit = self.get_single(\"commit-tree %s %s < .msg\" % (tree,head))\n-        os.remove(\".msg\")\n-        self.make_tag(\"p4/%s\"%id, commit)\n-        self.git(\"update-ref HEAD %s %s\" % (commit, current) )\n-\n-try:\n-    opts, args = getopt.getopt(sys.argv[1:], \"qhvt:\",\n-            [\"authors=\",\"help\",\"stitch=\",\"timezone=\",\"log=\",\"ignore\",\"notags\"])\n-except getopt.GetoptError:\n-    usage()\n-\n-for o, a in opts:\n-    if o == \"-q\":\n-        verbosity = 0\n-    if o == \"-v\":\n-        verbosity += 1\n-    if o in (\"--log\"):\n-        logfile = a\n-    if o in (\"--notags\"):\n-        tagall = False\n-    if o in (\"-h\", \"--help\"):\n-        usage()\n-    if o in (\"--ignore\"):\n-        ignore_warnings = True\n-\n-git = git_command()\n-branch=git.current_branch()\n-\n-for o, a in opts:\n-    if o in (\"-t\", \"--timezone\"):\n-        git.set_config(\"perforce.timezone\", a)\n-    if o in (\"--stitch\"):\n-        git.set_config(\"perforce.%s.path\" % branch, a)\n-        stitch = 1\n-\n-if len(args) == 2:\n-    branch = args[1]\n-    git.checkout(branch)\n-    if branch == git.current_branch():\n-        die(\"Branch %s already exists!\" % branch)\n-    report(1, \"Setting perforce to \", args[0])\n-    git.set_config(\"perforce.%s.path\" % branch, args[0])\n-elif len(args) != 0:\n-    die(\"You must specify the perforce //depot/path and git branch\")\n-\n-p4path = git.get_config(\"perforce.%s.path\" % branch)\n-if p4path == None:\n-    die(\"Do not know Perforce //depot/path for git branch\", branch)\n-\n-p4 = p4_command(p4path)\n-\n-for o, a in opts:\n-    if o in (\"-a\", \"--authors\"):\n-        p4.authors(a)\n-\n-localdir = git.basedir()\n-if p4.where()[:len(localdir)] != localdir:\n-    report(1, \"**WARNING** Appears p4 client is misconfigured\")\n-    report(1, \"   for sync from %s to %s\" % (p4.repopath, localdir))\n-    if ignore_warnings != True:\n-        die(\"Reconfigure or use \\\"--ignore\\\" on command line\")\n-\n-if stitch == 0:\n-    top = git.top_change(branch)\n-else:\n-    top = 0\n-changes = p4.changes(top)\n-count = len(changes)\n-if count == 0:\n-    report(1, \"Already up to date...\")\n-    sys.exit(0)\n-\n-ptz = git.get_config(\"perforce.timezone\")\n-if ptz:\n-    report(1, \"Setting timezone to\", ptz)\n-    os.environ['TZ'] = ptz\n-    time.tzset()\n-\n-if stitch == 1:\n-    git.remove_files()\n-    git.clean_directories()\n-    p4.sync(changes[0], force=True)\n-elif top == 0 and branch != git.current_branch():\n-    p4.sync(changes[0], test=True)\n-    report(1, \"Creating new initial commit\");\n-    git.fresh_branch(branch)\n-    p4.sync(changes[0], force=True)\n-else:\n-    p4.sync(changes[0], trick=True)\n-\n-report(1, \"processing %s changes from p4 (%s) to git (%s)\" % (count, p4.repopath, branch))\n-for id in changes:\n-    report(1, \"Importing changeset\", id)\n-    change = p4.describe(id)\n-    p4.sync(id)\n-    if tagall :\n-            git.commit(change.author, change.email, change.date, change.msg, id)\n-    else:\n-            git.commit(change.author, change.email, change.date, change.msg, \"import\")\n-    if stitch == 1:\n-        git.clean_directories()\n-        stitch = 0\ndiff --git a/contrib/p4import/git-p4import.txt b/contrib/p4import/git-p4import.txt\ndeleted file mode 100644\nindex 9967587..0000000\n--- a/contrib/p4import/git-p4import.txt\n+++ /dev/null\n@@ -1,167 +0,0 @@\n-git-p4import(1)\n-===============\n-\n-NAME\n-----\n-git-p4import - Import a Perforce repository into git\n-\n-\n-SYNOPSIS\n---------\n-[verse]\n-`git-p4import` [-q|-v] [--notags] [--authors <file>] [-t <timezone>]\n-               <//p4repo/path> <branch>\n-`git-p4import` --stitch <//p4repo/path>\n-`git-p4import`\n-\n-\n-DESCRIPTION\n------------\n-Import a Perforce repository into an existing git repository.  When\n-a <//p4repo/path> and <branch> are specified a new branch with the\n-given name will be created and the initial import will begin.\n-\n-Once the initial import is complete you can do an incremental import\n-of new commits from the Perforce repository.  You do this by checking\n-out the appropriate git branch and then running `git-p4import` without\n-any options.\n-\n-The standard p4 client is used to communicate with the Perforce\n-repository; it must be configured correctly in order for `git-p4import`\n-to operate (see below).\n-\n-\n-OPTIONS\n--------\n--q::\n-\tDo not display any progress information.\n-\n--v::\n-        Give extra progress information.\n-\n-\\--authors::\n-\tSpecify an authors file containing a mapping of Perforce user\n-\tids to full names and email addresses (see Notes below).\n-\n-\\--notags::\n-\tDo not create a tag for each imported commit.\n-\n-\\--stitch::\n-\tImport the contents of the given perforce branch into the\n-\tcurrently checked out git branch.\n-\n-\\--log::\n-\tStore debugging information in the specified file.\n-\n--t::\n-\tSpecify that the remote repository is in the specified timezone.\n-\tTimezone must be in the format \"US/Pacific\" or \"Europe/London\"\n-\tetc.  You only need to specify this once, it will be saved in\n-\tthe git config file for the repository.\n-\n-<//p4repo/path>::\n-\tThe Perforce path that will be imported into the specified branch.\n-\n-<branch>::\n-\tThe new branch that will be created to hold the Perforce imports.\n-\n-\n-P4 Client\n----------\n-You must make the `p4` client command available in your $PATH and\n-configure it to communicate with the target Perforce repository.\n-Typically this means you must set the \"$P4PORT\" and \"$P4CLIENT\"\n-environment variables.\n-\n-You must also configure a `p4` client \"view\" which maps the Perforce\n-branch into the top level of your git repository, for example:\n-\n-------------\n-Client: myhost\n-\n-Root:   /home/sean/import\n-\n-Options:   noallwrite clobber nocompress unlocked modtime rmdir\n-\n-View:\n-        //public/jam/... //myhost/jam/...\n-------------\n-\n-With the above `p4` client setup, you could import the \"jam\"\n-perforce branch into a branch named \"jammy\", like so:\n-\n-------------\n-$ mkdir -p /home/sean/import/jam\n-$ cd /home/sean/import/jam\n-$ git init\n-$ git p4import //public/jam jammy\n-------------\n-\n-\n-Multiple Branches\n------------------\n-Note that by creating multiple \"views\" you can use `git-p4import`\n-to import additional branches into the same git repository.\n-However, the `p4` client has a limitation in that it silently\n-ignores all but the last \"view\" that maps into the same local\n-directory.  So the following will *not* work:\n-\n-------------\n-View:\n-        //public/jam/... //myhost/jam/...\n-        //public/other/... //myhost/jam/...\n-        //public/guest/... //myhost/jam/...\n-------------\n-\n-If you want more than one Perforce branch to be imported into the\n-same directory you must employ a workaround.  A simple option is\n-to adjust your `p4` client before each import to only include a\n-single view.\n-\n-Another option is to create multiple symlinks locally which all\n-point to the same directory in your git repository and then use\n-one per \"view\" instead of listing the actual directory.\n-\n-\n-Tags\n-----\n-A git tag of the form p4/xx is created for every change imported from\n-the Perforce repository where xx is the Perforce changeset number.\n-Therefore after the import you can use git to access any commit by its\n-Perforce number, e.g. git show p4/327.\n-\n-The tag associated with the HEAD commit is also how `git-p4import`\n-determines if there are new changes to incrementally import from the\n-Perforce repository.\n-\n-If you import from a repository with many thousands of changes\n-you will have an equal number of p4/xxxx git tags.  Git tags can\n-be expensive in terms of disk space and repository operations.\n-If you don't need to perform further incremental imports, you\n-may delete the tags.\n-\n-\n-Notes\n------\n-You can interrupt the import (e.g. ctrl-c) at any time and restart it\n-without worry.\n-\n-Author information is automatically determined by querying the\n-Perforce \"users\" table using the id associated with each change.\n-However, if you want to manually supply these mappings you can do\n-so with the \"--authors\" option.  It accepts a file containing a list\n-of mappings with each line containing one mapping in the format:\n-\n-------------\n-    perforce_id = Full Name <email@address.com>\n-------------\n-\n-\n-Author\n-------\n-Written by Sean Estabrooks <seanlkml@sympatico.ca>\n-\n-\n-GIT\n----\n-Part of the gitlink:git[7] suite\n-- \n1.8.4.1\n"},{"id":"231105","messageId":"20131125210010.GV4212@google.com","threadId":"35405","inReplyTo":"20131125205119.GQ4212@google.com","subject":"[PATCH 5/9 gitk] gitk: chmod +x po2msg","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2013-11-25T21:00:10Z","receivedAt":"2013-11-25T21:00:10Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"The Makefile only runs it using tclsh, but because the fallback po2msg\nscript has the usual tcl preamble starting with #!/bin/sh it can also\nbe run directly.\n\nSigned-off-by: Jonathan Nieder <jrnieder@gmail.com>\n---\n po/po2msg.sh | 0\n 1 file changed, 0 insertions(+), 0 deletions(-)\n mode change 100644 => 100755 po/po2msg.sh\n\ndiff --git a/po/po2msg.sh b/po/po2msg.sh\nold mode 100644\nnew mode 100755\n-- \n1.8.4.1\n"},{"id":"231107","messageId":"20131125210105.GW4212@google.com","threadId":"35405","inReplyTo":"20131125205119.GQ4212@google.com","subject":"[PATCH 6/9 git-gui] git-gui: chmod +x po2msg, windows/git-gui.sh","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2013-11-25T21:01:05Z","receivedAt":"2013-11-25T21:01:05Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"The Makefile only runs po/po2msg.sh using tclsh, but because the\nscript has the usual tcl preamble starting with #!/bin/sh it can also\nbe run directly.\n\nThe Windows git-gui wrapper is usable in-place for the same reason.\n\nSigned-off-by: Jonathan Nieder <jrnieder@gmail.com>\n---\n po/po2msg.sh       | 0\n windows/git-gui.sh | 0\n 2 files changed, 0 insertions(+), 0 deletions(-)\n mode change 100644 => 100755 po/po2msg.sh\n mode change 100644 => 100755 windows/git-gui.sh\n\ndiff --git a/po/po2msg.sh b/po/po2msg.sh\nold mode 100644\nnew mode 100755\ndiff --git a/windows/git-gui.sh b/windows/git-gui.sh\nold mode 100644\nnew mode 100755\n-- \n1.8.4.1\n"},{"id":"231109","messageId":"20131125210216.GX4212@google.com","threadId":"35405","inReplyTo":"20131125205119.GQ4212@google.com","subject":"[PATCH 7/9] test: make FILEMODE a lazy prereq","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2013-11-25T21:02:16Z","receivedAt":"2013-11-25T21:02:16Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"This way, test authors don't need to remember to source\nlib-prereq-FILEMODE.sh before using the FILEMODE prereq to guard tests\nthat rely on the executable bit being honored when checking out files.\n\nSigned-off-by: Jonathan Nieder <jrnieder@gmail.com>\n---\n t/lib-prereq-FILEMODE.sh       | 11 -----------\n t/t3701-add-interactive.sh     |  1 -\n t/t4102-apply-rename.sh        |  1 -\n t/t4120-apply-popt.sh          |  1 -\n t/t4129-apply-samemode.sh      |  1 -\n t/t6031-merge-recursive.sh     |  1 -\n t/t9200-git-cvsexportcommit.sh |  1 -\n t/test-lib.sh                  |  4 ++++\n 8 files changed, 4 insertions(+), 17 deletions(-)\n delete mode 100644 t/lib-prereq-FILEMODE.sh\n\ndiff --git a/t/lib-prereq-FILEMODE.sh b/t/lib-prereq-FILEMODE.sh\ndeleted file mode 100644\nindex bce5a4c..0000000\n--- a/t/lib-prereq-FILEMODE.sh\n+++ /dev/null\n@@ -1,11 +0,0 @@\n-#!/bin/sh\n-#\n-# Copyright (c) 2010 Ævar Arnfjörð Bjarmason\n-#\n-\n-if test \"$(git config --bool core.filemode)\" = false\n-then\n-\tsay 'filemode disabled on the filesystem'\n-else\n-\ttest_set_prereq FILEMODE\n-fi\ndiff --git a/t/t3701-add-interactive.sh b/t/t3701-add-interactive.sh\nindex 9dc91d0..24ddd8a 100755\n--- a/t/t3701-add-interactive.sh\n+++ b/t/t3701-add-interactive.sh\n@@ -2,7 +2,6 @@\n \n test_description='add -i basic tests'\n . ./test-lib.sh\n-. \"$TEST_DIRECTORY\"/lib-prereq-FILEMODE.sh\n \n if ! test_have_prereq PERL\n then\ndiff --git a/t/t4102-apply-rename.sh b/t/t4102-apply-rename.sh\nindex e3ea3d5..49e2d6c 100755\n--- a/t/t4102-apply-rename.sh\n+++ b/t/t4102-apply-rename.sh\n@@ -7,7 +7,6 @@ test_description='git apply handling copy/rename patch.\n \n '\n . ./test-lib.sh\n-. \"$TEST_DIRECTORY\"/lib-prereq-FILEMODE.sh\n \n # setup\n \ndiff --git a/t/t4120-apply-popt.sh b/t/t4120-apply-popt.sh\nindex c5fecdf..497b628 100755\n--- a/t/t4120-apply-popt.sh\n+++ b/t/t4120-apply-popt.sh\n@@ -6,7 +6,6 @@\n test_description='git apply -p handling.'\n \n . ./test-lib.sh\n-. \"$TEST_DIRECTORY\"/lib-prereq-FILEMODE.sh\n \n test_expect_success setup '\n \tmkdir sub &&\ndiff --git a/t/t4129-apply-samemode.sh b/t/t4129-apply-samemode.sh\nindex 0d36ebd..c268298 100755\n--- a/t/t4129-apply-samemode.sh\n+++ b/t/t4129-apply-samemode.sh\n@@ -3,7 +3,6 @@\n test_description='applying patch with mode bits'\n \n . ./test-lib.sh\n-. \"$TEST_DIRECTORY\"/lib-prereq-FILEMODE.sh\n \n test_expect_success setup '\n \techo original >file &&\ndiff --git a/t/t6031-merge-recursive.sh b/t/t6031-merge-recursive.sh\nindex 1cd649e..a953f1b 100755\n--- a/t/t6031-merge-recursive.sh\n+++ b/t/t6031-merge-recursive.sh\n@@ -2,7 +2,6 @@\n \n test_description='merge-recursive: handle file mode'\n . ./test-lib.sh\n-. \"$TEST_DIRECTORY\"/lib-prereq-FILEMODE.sh\n \n test_expect_success 'mode change in one branch: keep changed version' '\n \t: >file1 &&\ndiff --git a/t/t9200-git-cvsexportcommit.sh b/t/t9200-git-cvsexportcommit.sh\nindex 3fb3368..812c9cd 100755\n--- a/t/t9200-git-cvsexportcommit.sh\n+++ b/t/t9200-git-cvsexportcommit.sh\n@@ -5,7 +5,6 @@\n test_description='Test export of commits to CVS'\n \n . ./test-lib.sh\n-. \"$TEST_DIRECTORY\"/lib-prereq-FILEMODE.sh\n \n if ! test_have_prereq PERL; then\n \tskip_all='skipping git cvsexportcommit tests, perl not available'\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex b25249e..5968157 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -830,6 +830,10 @@ test_lazy_prereq SYMLINKS '\n \tln -s x y && test -h y\n '\n \n+test_lazy_prereq FILEMODE '\n+\ttest \"$(git config --bool core.filemode)\" = true\n+'\n+\n test_lazy_prereq CASE_INSENSITIVE_FS '\n \techo good >CamelCase &&\n \techo bad >camelcase &&\n-- \n1.8.4.1\n"},{"id":"231110","messageId":"20131125210306.GY4212@google.com","threadId":"35405","inReplyTo":"20131125205119.GQ4212@google.com","subject":"[PATCH 8/9] test: replace shebangs with descriptions in shell libraries","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2013-11-25T21:03:06Z","receivedAt":"2013-11-25T21:03:06Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"A #! line in these files is misleading, since these scriptlets are\nmeant to be sourced with '.' (using whatever shell sources them)\ninstead of run directly using the interpreter named on the #! line.\n\nRemoving the #! line shouldn't hurt syntax highlighting since\nthese files have filenames ending with '.sh'.  For documentation,\nadd a brief description of how the files are meant to be used in\nplace of the shebang line.\n\nSigned-off-by: Jonathan Nieder <jrnieder@gmail.com>\n---\n t/gitweb-lib.sh           |  3 ++-\n t/lib-bash.sh             |  7 +++----\n t/lib-cvs.sh              |  2 +-\n t/lib-diff-alternative.sh |  3 ++-\n t/lib-gettext.sh          |  3 ++-\n t/lib-git-daemon.sh       | 18 +++++++++++++++++-\n t/lib-httpd.sh            | 29 ++++++++++++++++++++++++++++-\n t/lib-pack.sh             |  2 --\n t/lib-pager.sh            |  2 +-\n t/lib-read-tree.sh        |  2 --\n t/lib-rebase.sh           |  2 +-\n t/lib-terminal.sh         |  2 +-\n t/perf/perf-lib.sh        |  4 +++-\n t/test-lib-functions.sh   |  3 ++-\n t/test-lib.sh             |  2 +-\n 15 files changed, 64 insertions(+), 20 deletions(-)\n\ndiff --git a/t/gitweb-lib.sh b/t/gitweb-lib.sh\nindex 8cf909a..d5dab5a 100644\n--- a/t/gitweb-lib.sh\n+++ b/t/gitweb-lib.sh\n@@ -1,4 +1,5 @@\n-#!/bin/sh\n+# Initialization and helpers for Gitweb tests, which source this\n+# shell library instead of test-lib.sh.\n #\n # Copyright (c) 2007 Jakub Narebski\n #\ndiff --git a/t/lib-bash.sh b/t/lib-bash.sh\nindex 11397f7..10b76df 100644\n--- a/t/lib-bash.sh\n+++ b/t/lib-bash.sh\n@@ -1,7 +1,6 @@\n-#!/bin/sh\n-#\n-# Ensures that tests are run under Bash; primarily intended for running tests\n-# of the completion script.\n+# Shell library sourced instead of ./test-lib.sh by tests that need\n+# to run under Bash; primary intended for tests of the completion\n+# script.\n \n if test -n \"$BASH\" && test -z \"$POSIXLY_CORRECT\"; then\n \t# we are in full-on bash mode\ndiff --git a/t/lib-cvs.sh b/t/lib-cvs.sh\nindex 44263ad..5076718 100644\n--- a/t/lib-cvs.sh\n+++ b/t/lib-cvs.sh\n@@ -1,4 +1,4 @@\n-#!/bin/sh\n+# Shell library sourced instead of ./test-lib.sh by cvsimport tests.\n \n . ./test-lib.sh\n \ndiff --git a/t/lib-diff-alternative.sh b/t/lib-diff-alternative.sh\nindex 75ffd91..8b4dbf2 100644\n--- a/t/lib-diff-alternative.sh\n+++ b/t/lib-diff-alternative.sh\n@@ -1,4 +1,5 @@\n-#!/bin/sh\n+# Helpers shared by the test scripts for diff algorithms (patience,\n+# histogram, etc).\n \n test_diff_frobnitz() {\n \tcat >file1 <<\\EOF\ndiff --git a/t/lib-gettext.sh b/t/lib-gettext.sh\nindex ae8883a..eec757f 100644\n--- a/t/lib-gettext.sh\n+++ b/t/lib-gettext.sh\n@@ -1,4 +1,5 @@\n-#!/bin/sh\n+# Initialization and Icelandic locale for basic git i18n tests,\n+# which source this scriptlet instead of ./test-lib.sh.\n #\n # Copyright (c) 2010 Ævar Arnfjörð Bjarmason\n #\ndiff --git a/t/lib-git-daemon.sh b/t/lib-git-daemon.sh\nindex 87f0ad8..394b06b 100644\n--- a/t/lib-git-daemon.sh\n+++ b/t/lib-git-daemon.sh\n@@ -1,4 +1,20 @@\n-#!/bin/sh\n+# Shell library to run git-daemon in tests.  Ends the test early if\n+# GIT_TEST_GIT_DAEMON is not set.\n+#\n+# Usage:\n+#\n+#\t. ./test-lib.sh\n+#\t. \"$TEST_DIRECTORY\"/lib-git-daemon.sh\n+#\tstart_git_daemon\n+#\n+#\ttest_expect_success '...' '\n+#\t\t...\n+#\t'\n+#\n+#\ttest_expect_success ...\n+#\n+#\tstop_git_daemon\n+#\ttest_done\n \n if test -z \"$GIT_TEST_GIT_DAEMON\"\n then\ndiff --git a/t/lib-httpd.sh b/t/lib-httpd.sh\nindex ad8f1ef..c470784 100644\n--- a/t/lib-httpd.sh\n+++ b/t/lib-httpd.sh\n@@ -1,4 +1,31 @@\n-#!/bin/sh\n+# Shell library to run an HTTP server for use in tests.\n+# Ends the test early if httpd tests should not be run,\n+# for example because the user has not enabled them.\n+#\n+# Usage:\n+#\n+#\t. ./test-lib.sh\n+#\t. \"$TEST_DIRECTORY\"/lib-httpd.sh\n+#\tstart_httpd\n+#\n+#\ttest_expect_success '...' '\n+#\t\t...\n+#\t'\n+#\n+#\ttest_expect_success ...\n+#\n+#\tstop_httpd\n+#\ttest_done\n+#\n+# Can be configured using the following variables.\n+#\n+#    GIT_TEST_HTTPD              enable HTTPD tests\n+#    LIB_HTTPD_PATH              web server path\n+#    LIB_HTTPD_MODULE_PATH       web server modules path\n+#    LIB_HTTPD_PORT              listening port\n+#    LIB_HTTPD_DAV               enable DAV\n+#    LIB_HTTPD_SVN               enable SVN\n+#    LIB_HTTPD_SSL               enable SSL\n #\n # Copyright (c) 2008 Clemens Buchacher <drizzd@aon.at>\n #\ndiff --git a/t/lib-pack.sh b/t/lib-pack.sh\nindex b96e125..7509846 100644\n--- a/t/lib-pack.sh\n+++ b/t/lib-pack.sh\n@@ -1,5 +1,3 @@\n-#!/bin/sh\n-#\n # Support routines for hand-crafting weird or malicious packs.\n #\n # You can make a complete pack like:\ndiff --git a/t/lib-pager.sh b/t/lib-pager.sh\nindex ba03eab..3aa7a3f 100644\n--- a/t/lib-pager.sh\n+++ b/t/lib-pager.sh\n@@ -1,4 +1,4 @@\n-#!/bin/sh\n+# Helpers for tests of git's choice of pager.\n \n test_expect_success 'determine default pager' '\n \ttest_might_fail git config --unset core.pager &&\ndiff --git a/t/lib-read-tree.sh b/t/lib-read-tree.sh\nindex abc2c6f..6442ae3 100644\n--- a/t/lib-read-tree.sh\n+++ b/t/lib-read-tree.sh\n@@ -1,5 +1,3 @@\n-#!/bin/sh\n-#\n # Helper functions to check if read-tree would succeed/fail as expected with\n # and without the dry-run option. They also test that the dry-run does not\n # write the index and that together with -u it doesn't touch the work tree.\ndiff --git a/t/lib-rebase.sh b/t/lib-rebase.sh\nindex 8ff87fb..6bd2522 100644\n--- a/t/lib-rebase.sh\n+++ b/t/lib-rebase.sh\n@@ -1,4 +1,4 @@\n-#!/bin/sh\n+# Helper functions used by interactive rebase tests.\n \n # After setting the fake editor with this function, you can\n #\ndiff --git a/t/lib-terminal.sh b/t/lib-terminal.sh\nindex 737df28..9a2dca5 100644\n--- a/t/lib-terminal.sh\n+++ b/t/lib-terminal.sh\n@@ -1,4 +1,4 @@\n-#!/bin/sh\n+# Helpers for terminal output tests.\n \n test_expect_success PERL 'set up terminal for tests' '\n \t# Reading from the pty master seems to get stuck _sometimes_\ndiff --git a/t/perf/perf-lib.sh b/t/perf/perf-lib.sh\nindex f4eecaa..a8c9574 100644\n--- a/t/perf/perf-lib.sh\n+++ b/t/perf/perf-lib.sh\n@@ -1,4 +1,6 @@\n-#!/bin/sh\n+# Performance testing framework.  Each perf script starts much like\n+# a normal test script, except it sources this library instead of\n+# test-lib.sh.  See t/perf/README for documentation.\n #\n # Copyright (c) 2011 Thomas Rast\n #\ndiff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh\nindex 2f79146..aeae3ca 100644\n--- a/t/test-lib-functions.sh\n+++ b/t/test-lib-functions.sh\n@@ -1,4 +1,5 @@\n-#!/bin/sh\n+# Library of functions shared by all tests scripts, included by\n+# test-lib.sh.\n #\n # Copyright (c) 2005 Junio C Hamano\n #\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex 5968157..c306bd0 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -1,4 +1,4 @@\n-#!/bin/sh\n+# Test framework for git.  See t/README for usage.\n #\n # Copyright (c) 2005 Junio C Hamano\n #\n-- \n1.8.4.1\n"},{"id":"231111","messageId":"20131125210352.GZ4212@google.com","threadId":"35405","inReplyTo":"20131125205119.GQ4212@google.com","subject":"[PATCH 9/9] remove #!interpreter line from shell libraries","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2013-11-25T21:03:52Z","receivedAt":"2013-11-25T21:03:52Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"In a shell snippet meant to be sourced by other shell scripts, an\nopening #! line does more harm than good.\n\nThe harm:\n\n - When the shell library is sourced, the interpreter and options from\n   the #! line are not used.  Specifying a particular shell can\n   confuse the reader into thinking it is safe for the shell library\n   to rely on idiosyncrasies of that shell.\n\n - Using #! instead of a plain comment drops a helpful visual clue\n   that this is a shell library and not a self-contained script.\n\n - Tools such as lintian can use a #! line to tell when an\n   installation script has failed by forgetting to set a script\n   executable.  This check does not work if shell libraries also start\n   with a #! line.\n\nThe good:\n\n - Text editors notice the #! line and use it for syntax highlighting\n   if you try to edit the installed scripts (without \".sh\" suffix) in\n   place.\n\nThe use of the #! for file type detection is not needed because Git's\nshell libraries are meant to be edited in source form (with \".sh\"\nsuffix).  Replace the opening #! lines with comments.\n\nThis involves tweaking the test harness's valgrind support to find\nshell libraries by looking for \"# \" in the first line instead of \"#!\"\n(see v1.7.6-rc3~7, 2011-06-17).\n\nSuggested by Russ Allbery through lintian.  Thanks to Jeff King and\nClemens Buchacher for further analysis.\n\nTested by searching for non-executable scripts with #! line:\n\n\tfind . -name .git -prune -o -type f -not -executable |\n\twhile read file\n\tdo\n\t\tread line <\"$file\"\n\t\tcase $line in\n\t\t'#!'*)\n\t\t\techo \"$file\"\n\t\t\t;;\n\t\tesac\n\tdone\n\nThe only remaining scripts found are templates for shell scripts\n(unimplemented.sh, wrap-for-bin.sh) and sample input used in tests\n(t/t4034/perl/{pre,post}).\n\nSigned-off-by: Jonathan Nieder <jrnieder@gmail.com>\n---\nThanks for reading.\n\n contrib/completion/git-completion.bash | 2 --\n contrib/completion/git-completion.tcsh | 2 --\n git-mergetool--lib.sh                  | 3 +--\n git-parse-remote.sh                    | 4 +++-\n git-rebase--am.sh                      | 3 ++-\n git-rebase--interactive.sh             | 9 +++------\n git-rebase--merge.sh                   | 4 +++-\n git-sh-i18n.sh                         | 5 ++---\n git-sh-setup.sh                        | 9 +++------\n t/test-lib.sh                          | 6 ++----\n 10 files changed, 19 insertions(+), 28 deletions(-)\n\ndiff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\nindex dba3c15..be61931 100644\n--- a/contrib/completion/git-completion.bash\n+++ b/contrib/completion/git-completion.bash\n@@ -1,5 +1,3 @@\n-#!bash\n-#\n # bash/zsh completion support for core Git.\n #\n # Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org>\ndiff --git a/contrib/completion/git-completion.tcsh b/contrib/completion/git-completion.tcsh\nindex eaacaf0..6104a42 100644\n--- a/contrib/completion/git-completion.tcsh\n+++ b/contrib/completion/git-completion.tcsh\n@@ -1,5 +1,3 @@\n-#!tcsh\n-#\n # tcsh completion support for core Git.\n #\n # Copyright (C) 2012 Marc Khouzam <marc.khouzam@gmail.com>\ndiff --git a/git-mergetool--lib.sh b/git-mergetool--lib.sh\nindex a280f49..c45a020 100644\n--- a/git-mergetool--lib.sh\n+++ b/git-mergetool--lib.sh\n@@ -1,5 +1,4 @@\n-#!/bin/sh\n-# git-mergetool--lib is a library for common merge tool functions\n+# git-mergetool--lib is a shell library for common merge tool functions\n \n : ${MERGE_TOOLS_DIR=$(git --exec-path)/mergetools}\n \ndiff --git a/git-parse-remote.sh b/git-parse-remote.sh\nindex 0e87e09..55fe8d5 100644\n--- a/git-parse-remote.sh\n+++ b/git-parse-remote.sh\n@@ -1,4 +1,6 @@\n-#!/bin/sh\n+# This is a shell library to calculate the remote repository and\n+# upstream branch that should be pulled by \"git pull\" from the current\n+# branch.\n \n # git-ls-remote could be called from outside a git managed repository;\n # this would fail in that case and would issue an error message.\ndiff --git a/git-rebase--am.sh b/git-rebase--am.sh\nindex 34e3102..a4f683a 100644\n--- a/git-rebase--am.sh\n+++ b/git-rebase--am.sh\n@@ -1,4 +1,5 @@\n-#!/bin/sh\n+# This shell script fragment is sourced by git-rebase to implement\n+# its default, fast, patch-based, non-interactive mode.\n #\n # Copyright (c) 2010 Junio C Hamano.\n #\ndiff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh\nindex 3c6bed9..43c19e0 100644\n--- a/git-rebase--interactive.sh\n+++ b/git-rebase--interactive.sh\n@@ -1,11 +1,8 @@\n-#!/bin/sh\n+# This shell script fragment is sourced by git-rebase to implement\n+# its interactive mode.  \"git rebase --interactive\" makes it easy\n+# to fix up commits in the middle of a series and rearrange commits.\n #\n # Copyright (c) 2006 Johannes E. Schindelin\n-\n-# SHORT DESCRIPTION\n-#\n-# This script makes it easy to fix up commits in the middle of a series,\n-# and rearrange commits.\n #\n # The original idea comes from Eric W. Biederman, in\n # http://article.gmane.org/gmane.comp.version-control.git/22407\ndiff --git a/git-rebase--merge.sh b/git-rebase--merge.sh\nindex 16d1817..e7d96de 100644\n--- a/git-rebase--merge.sh\n+++ b/git-rebase--merge.sh\n@@ -1,4 +1,6 @@\n-#!/bin/sh\n+# This shell script fragment is sourced by git-rebase to implement\n+# its merge-based non-interactive mode that copes well with renamed\n+# files.\n #\n # Copyright (c) 2010 Junio C Hamano.\n #\ndiff --git a/git-sh-i18n.sh b/git-sh-i18n.sh\nindex 6a27f68..e6c3116 100644\n--- a/git-sh-i18n.sh\n+++ b/git-sh-i18n.sh\n@@ -1,9 +1,8 @@\n-#!/bin/sh\n+# This shell library is Git's interface to gettext.sh. See po/README\n+# for usage instructions.\n #\n # Copyright (c) 2010 Ævar Arnfjörð Bjarmason\n #\n-# This is Git's interface to gettext.sh. See po/README for usage\n-# instructions.\n \n # Export the TEXTDOMAIN* data that we need for Git\n TEXTDOMAIN=git\ndiff --git a/git-sh-setup.sh b/git-sh-setup.sh\nindex ebfe8f7..190a539 100644\n--- a/git-sh-setup.sh\n+++ b/git-sh-setup.sh\n@@ -1,9 +1,6 @@\n-#!/bin/sh\n-#\n-# This is included in commands that either have to be run from the toplevel\n-# of the repository, or with GIT_DIR environment variable properly.\n-# If the GIT_DIR does not look like the right correct git-repository,\n-# it dies.\n+# This shell scriplet is meant to be included by other shell scripts\n+# to set up some variables pointing at the normal git directories and\n+# a few helper shell functions.\n \n # Having this variable in your environment would break scripts because\n # you would cause \"cd\" to be taken to unexpected places.  If you\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex c306bd0..c3e07b9 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -573,11 +573,9 @@ then\n \n \tmake_valgrind_symlink () {\n \t\t# handle only executables, unless they are shell libraries that\n-\t\t# need to be in the exec-path.  We will just use \"#!\" as a\n-\t\t# guess for a shell-script, since we have no idea what the user\n-\t\t# may have configured as the shell path.\n+\t\t# need to be in the exec-path.\n \t\ttest -x \"$1\" ||\n-\t\ttest \"#!\" = \"$(head -c 2 <\"$1\")\" ||\n+\t\ttest \"# \" = \"$(head -c 2 <\"$1\")\" ||\n \t\treturn;\n \n \t\tbase=$(basename \"$1\")\n-- \n1.8.4.1\n"},{"id":"231124","messageId":"CAPig+cQizcuPjastanvyKkuo2=p9BPhBE-PhBC2J2EKwXvLekg@mail.gmail.com","threadId":"35405","inReplyTo":"20131125210306.GY4212@google.com","subject":"Re: [PATCH 8/9] test: replace shebangs with descriptions in shell libraries","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2013-11-26T05:18:31Z","receivedAt":"2013-11-26T05:18:31Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Mon, Nov 25, 2013 at 4:03 PM, Jonathan Nieder <jrnieder@gmail.com> wrote:\n> A #! line in these files is misleading, since these scriptlets are\n> meant to be sourced with '.' (using whatever shell sources them)\n> instead of run directly using the interpreter named on the #! line.\n>\n> Removing the #! line shouldn't hurt syntax highlighting since\n> these files have filenames ending with '.sh'.  For documentation,\n> add a brief description of how the files are meant to be used in\n> place of the shebang line.\n>\n> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>\n> ---\n> diff --git a/t/lib-bash.sh b/t/lib-bash.sh\n> index 11397f7..10b76df 100644\n> --- a/t/lib-bash.sh\n> +++ b/t/lib-bash.sh\n> @@ -1,7 +1,6 @@\n> -#!/bin/sh\n> -#\n> -# Ensures that tests are run under Bash; primarily intended for running tests\n> -# of the completion script.\n> +# Shell library sourced instead of ./test-lib.sh by tests that need\n> +# to run under Bash; primary intended for tests of the completion\n\ns/primary/primarily/\n\n> +# script.\n>\n>  if test -n \"$BASH\" && test -z \"$POSIXLY_CORRECT\"; then\n>         # we are in full-on bash mode\n"},{"id":"231133","messageId":"20131126123159.GA22601@padd.com","threadId":"35405","inReplyTo":"20131125205847.GU4212@google.com","subject":"Re: [PATCH 4/9] contrib: remove git-p4import","fromName":"Pete Wyckoff","fromEmail":"pw@padd.com","sentAt":"2013-11-26T12:31:59Z","receivedAt":"2013-11-26T12:31:59Z","isPatch":true,"sender":{"key":"pw@padd.com","avatar":null},"body":"jrnieder@gmail.com wrote on Mon, 25 Nov 2013 12:58 -0800:\n> The git p4import documentation has suggested git p4 as a better\n> alternative for more than 6 years.  (According to the mailing list\n> discussion when it was moved to contrib/, git-p4import has serious\n> bugs --- e.g., its incremental mode just doesn't work.) Since then,\n> git p4 has been actively developed and was promoted to a standard git\n> command alongside git svn.\n> \n> Searches on google.com/trends and stackoverflow suggest that no one is\n> looking for git-p4import any more.  Remove it.\n> \n> Noticed while considering marking the contrib/p4import/git-p4import.py\n> script executable as part of a wider sweep.\n\nI haven't seen git-p4import mentioned for the last 6 years either.\nThanks,\n\nAcked-by: Pete Wyckoff <pw@padd.com> \n"},{"id":"231146","messageId":"20131126213951.GE4212@google.com","threadId":"35405","inReplyTo":"CAPig+cQizcuPjastanvyKkuo2=p9BPhBE-PhBC2J2EKwXvLekg@mail.gmail.com","subject":"[PATCH 8/9 v2] test: replace shebangs with descriptions in shell libraries","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2013-11-26T21:39:51Z","receivedAt":"2013-11-26T21:39:51Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"A #! line in these files is misleading, since these scriptlets are\nmeant to be sourced with '.' (using whatever shell sources them)\ninstead of run directly using the interpreter named on the #! line.\n\nRemoving the #! line shouldn't hurt syntax highlighting since\nthese files have filenames ending with '.sh'.  For documentation,\nadd a brief description of how the files are meant to be used in\nplace of the shebang line.\n\nSigned-off-by: Jonathan Nieder <jrnieder@gmail.com>\n---\nEric Sunshine wrote:\n> On Mon, Nov 25, 2013 at 4:03 PM, Jonathan Nieder <jrnieder@gmail.com> wrote:\n\n>> +++ b/t/lib-bash.sh\n>> @@ -1,7 +1,6 @@\n>> -#!/bin/sh\n>> -#\n>> -# Ensures that tests are run under Bash; primarily intended for running tests\n>> -# of the completion script.\n>> +# Shell library sourced instead of ./test-lib.sh by tests that need\n>> +# to run under Bash; primary intended for tests of the completion\n>\n> s/primary/primarily/\n\nGood eyes.  Here's an updated version of the patch with that change.\n\nThanks,\nJonathan\n\n t/gitweb-lib.sh           |  3 ++-\n t/lib-bash.sh             |  7 +++----\n t/lib-cvs.sh              |  2 +-\n t/lib-diff-alternative.sh |  3 ++-\n t/lib-gettext.sh          |  3 ++-\n t/lib-git-daemon.sh       | 18 +++++++++++++++++-\n t/lib-httpd.sh            | 29 ++++++++++++++++++++++++++++-\n t/lib-pack.sh             |  2 --\n t/lib-pager.sh            |  2 +-\n t/lib-read-tree.sh        |  2 --\n t/lib-rebase.sh           |  2 +-\n t/lib-terminal.sh         |  2 +-\n t/perf/perf-lib.sh        |  4 +++-\n t/test-lib-functions.sh   |  3 ++-\n t/test-lib.sh             |  2 +-\n 15 files changed, 64 insertions(+), 20 deletions(-)\n\ndiff --git a/t/gitweb-lib.sh b/t/gitweb-lib.sh\nindex 8cf909a..d5dab5a 100644\n--- a/t/gitweb-lib.sh\n+++ b/t/gitweb-lib.sh\n@@ -1,4 +1,5 @@\n-#!/bin/sh\n+# Initialization and helpers for Gitweb tests, which source this\n+# shell library instead of test-lib.sh.\n #\n # Copyright (c) 2007 Jakub Narebski\n #\ndiff --git a/t/lib-bash.sh b/t/lib-bash.sh\nindex 11397f7..2be955f 100644\n--- a/t/lib-bash.sh\n+++ b/t/lib-bash.sh\n@@ -1,7 +1,6 @@\n-#!/bin/sh\n-#\n-# Ensures that tests are run under Bash; primarily intended for running tests\n-# of the completion script.\n+# Shell library sourced instead of ./test-lib.sh by tests that need\n+# to run under Bash; primarily intended for tests of the completion\n+# script.\n \n if test -n \"$BASH\" && test -z \"$POSIXLY_CORRECT\"; then\n \t# we are in full-on bash mode\ndiff --git a/t/lib-cvs.sh b/t/lib-cvs.sh\nindex 44263ad..5076718 100644\n--- a/t/lib-cvs.sh\n+++ b/t/lib-cvs.sh\n@@ -1,4 +1,4 @@\n-#!/bin/sh\n+# Shell library sourced instead of ./test-lib.sh by cvsimport tests.\n \n . ./test-lib.sh\n \ndiff --git a/t/lib-diff-alternative.sh b/t/lib-diff-alternative.sh\nindex 75ffd91..8b4dbf2 100644\n--- a/t/lib-diff-alternative.sh\n+++ b/t/lib-diff-alternative.sh\n@@ -1,4 +1,5 @@\n-#!/bin/sh\n+# Helpers shared by the test scripts for diff algorithms (patience,\n+# histogram, etc).\n \n test_diff_frobnitz() {\n \tcat >file1 <<\\EOF\ndiff --git a/t/lib-gettext.sh b/t/lib-gettext.sh\nindex ae8883a..eec757f 100644\n--- a/t/lib-gettext.sh\n+++ b/t/lib-gettext.sh\n@@ -1,4 +1,5 @@\n-#!/bin/sh\n+# Initialization and Icelandic locale for basic git i18n tests,\n+# which source this scriptlet instead of ./test-lib.sh.\n #\n # Copyright (c) 2010 Ævar Arnfjörð Bjarmason\n #\ndiff --git a/t/lib-git-daemon.sh b/t/lib-git-daemon.sh\nindex 87f0ad8..394b06b 100644\n--- a/t/lib-git-daemon.sh\n+++ b/t/lib-git-daemon.sh\n@@ -1,4 +1,20 @@\n-#!/bin/sh\n+# Shell library to run git-daemon in tests.  Ends the test early if\n+# GIT_TEST_GIT_DAEMON is not set.\n+#\n+# Usage:\n+#\n+#\t. ./test-lib.sh\n+#\t. \"$TEST_DIRECTORY\"/lib-git-daemon.sh\n+#\tstart_git_daemon\n+#\n+#\ttest_expect_success '...' '\n+#\t\t...\n+#\t'\n+#\n+#\ttest_expect_success ...\n+#\n+#\tstop_git_daemon\n+#\ttest_done\n \n if test -z \"$GIT_TEST_GIT_DAEMON\"\n then\ndiff --git a/t/lib-httpd.sh b/t/lib-httpd.sh\nindex ad8f1ef..c470784 100644\n--- a/t/lib-httpd.sh\n+++ b/t/lib-httpd.sh\n@@ -1,4 +1,31 @@\n-#!/bin/sh\n+# Shell library to run an HTTP server for use in tests.\n+# Ends the test early if httpd tests should not be run,\n+# for example because the user has not enabled them.\n+#\n+# Usage:\n+#\n+#\t. ./test-lib.sh\n+#\t. \"$TEST_DIRECTORY\"/lib-httpd.sh\n+#\tstart_httpd\n+#\n+#\ttest_expect_success '...' '\n+#\t\t...\n+#\t'\n+#\n+#\ttest_expect_success ...\n+#\n+#\tstop_httpd\n+#\ttest_done\n+#\n+# Can be configured using the following variables.\n+#\n+#    GIT_TEST_HTTPD              enable HTTPD tests\n+#    LIB_HTTPD_PATH              web server path\n+#    LIB_HTTPD_MODULE_PATH       web server modules path\n+#    LIB_HTTPD_PORT              listening port\n+#    LIB_HTTPD_DAV               enable DAV\n+#    LIB_HTTPD_SVN               enable SVN\n+#    LIB_HTTPD_SSL               enable SSL\n #\n # Copyright (c) 2008 Clemens Buchacher <drizzd@aon.at>\n #\ndiff --git a/t/lib-pack.sh b/t/lib-pack.sh\nindex b96e125..7509846 100644\n--- a/t/lib-pack.sh\n+++ b/t/lib-pack.sh\n@@ -1,5 +1,3 @@\n-#!/bin/sh\n-#\n # Support routines for hand-crafting weird or malicious packs.\n #\n # You can make a complete pack like:\ndiff --git a/t/lib-pager.sh b/t/lib-pager.sh\nindex ba03eab..3aa7a3f 100644\n--- a/t/lib-pager.sh\n+++ b/t/lib-pager.sh\n@@ -1,4 +1,4 @@\n-#!/bin/sh\n+# Helpers for tests of git's choice of pager.\n \n test_expect_success 'determine default pager' '\n \ttest_might_fail git config --unset core.pager &&\ndiff --git a/t/lib-read-tree.sh b/t/lib-read-tree.sh\nindex abc2c6f..6442ae3 100644\n--- a/t/lib-read-tree.sh\n+++ b/t/lib-read-tree.sh\n@@ -1,5 +1,3 @@\n-#!/bin/sh\n-#\n # Helper functions to check if read-tree would succeed/fail as expected with\n # and without the dry-run option. They also test that the dry-run does not\n # write the index and that together with -u it doesn't touch the work tree.\ndiff --git a/t/lib-rebase.sh b/t/lib-rebase.sh\nindex 8ff87fb..6bd2522 100644\n--- a/t/lib-rebase.sh\n+++ b/t/lib-rebase.sh\n@@ -1,4 +1,4 @@\n-#!/bin/sh\n+# Helper functions used by interactive rebase tests.\n \n # After setting the fake editor with this function, you can\n #\ndiff --git a/t/lib-terminal.sh b/t/lib-terminal.sh\nindex 737df28..9a2dca5 100644\n--- a/t/lib-terminal.sh\n+++ b/t/lib-terminal.sh\n@@ -1,4 +1,4 @@\n-#!/bin/sh\n+# Helpers for terminal output tests.\n \n test_expect_success PERL 'set up terminal for tests' '\n \t# Reading from the pty master seems to get stuck _sometimes_\ndiff --git a/t/perf/perf-lib.sh b/t/perf/perf-lib.sh\nindex f4eecaa..a8c9574 100644\n--- a/t/perf/perf-lib.sh\n+++ b/t/perf/perf-lib.sh\n@@ -1,4 +1,6 @@\n-#!/bin/sh\n+# Performance testing framework.  Each perf script starts much like\n+# a normal test script, except it sources this library instead of\n+# test-lib.sh.  See t/perf/README for documentation.\n #\n # Copyright (c) 2011 Thomas Rast\n #\ndiff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh\nindex 2f79146..aeae3ca 100644\n--- a/t/test-lib-functions.sh\n+++ b/t/test-lib-functions.sh\n@@ -1,4 +1,5 @@\n-#!/bin/sh\n+# Library of functions shared by all tests scripts, included by\n+# test-lib.sh.\n #\n # Copyright (c) 2005 Junio C Hamano\n #\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex 5968157..c306bd0 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -1,4 +1,4 @@\n-#!/bin/sh\n+# Test framework for git.  See t/README for usage.\n #\n # Copyright (c) 2005 Junio C Hamano\n #\n-- \n1.8.4.1\n"}]}