Merge git://github.com/git-l10n/git-po
authorJunio C Hamano <gitster@pobox.com>
Tue, 12 Nov 2013 19:26:11 +0000 (11:26 -0800)
committerJunio C Hamano <gitster@pobox.com>
Tue, 12 Nov 2013 19:26:11 +0000 (11:26 -0800)
* git://github.com/git-l10n/git-po:
l10n: de.po: improve error message when pushing to unknown upstream
l10n: de.po: translate 68 new messages
po/TEAMS: update Thomas Rast's email address
l10n: Update Swedish translation (2194t0f0u)
l10n: fr.po 2194/1294 messages translated
l10n: zh_CN.po: translate 68 messages (2194t0f0u)
l10n: vi.po (2194t): Update and minor fix
l10n: git.pot: v1.8.5 round 1 (68 new, 9 removed)

63 files changed:
Documentation/RelNotes/1.8.4.3.txt [new file with mode: 0644]
Documentation/RelNotes/1.8.5.txt
Documentation/date-formats.txt
Documentation/git-blame.txt
Documentation/git-cvsimport.txt
Documentation/git-fast-import.txt
Documentation/git-pull.txt
Documentation/git-svn.txt
Documentation/git-unpack-objects.txt
Documentation/git.txt
Documentation/gitignore.txt
Documentation/gitweb.conf.txt
Documentation/howto/setup-git-server-over-http.txt
Documentation/rev-list-options.txt
GIT-VERSION-GEN
builtin/branch.c
builtin/describe.c
builtin/diff.c
builtin/merge.c
contrib/subtree/Makefile
git-cvsserver.perl
pretty.c
revision.c
revision.h
run-command.c
setup.c
sha1_name.c
t/README
t/annotate-tests.sh
t/gitweb-lib.sh
t/lib-git-svn.sh
t/lib-pack.sh
t/lib-terminal.sh
t/t0008-ignores.sh
t/t0202-gettext-perl.sh
t/t1010-mktree.sh
t/t3300-funny-names.sh
t/t4014-format-patch.sh
t/t4015-diff-whitespace.sh
t/t4020-diff-external.sh
t/t4029-diff-trailing-space.sh
t/t4103-apply-binary.sh
t/t4116-apply-reverse.sh
t/t4200-rerere.sh
t/t5300-pack-object.sh
t/t5303-pack-corruption-resilience.sh
t/t5551-http-fetch.sh
t/t6011-rev-list-with-bad-commit.sh
t/t6013-rev-list-reverse-parents.sh
t/t7508-status.sh
t/t9114-git-svn-dcommit-merge.sh
t/t9129-git-svn-i18n-commitencoding.sh
t/t9137-git-svn-dcommit-clobber-series.sh
t/t9300-fast-import.sh
t/t9350-fast-export.sh
t/t9400-git-cvsserver-server.sh
t/t9401-git-cvsserver-crlf.sh
t/t9402-git-cvsserver-refs.sh
t/t9500-gitweb-standalone-no-errors.sh
t/t9700-perl-git.sh
t/t9810-git-p4-rcs.sh
t/test-lib-functions.sh
transport-helper.c
diff --git a/Documentation/RelNotes/1.8.4.3.txt b/Documentation/RelNotes/1.8.4.3.txt
new file mode 100644 (file)
index 0000000..03f3d17
--- /dev/null
@@ -0,0 +1,54 @@
+Git v1.8.4.3 Release Notes
+========================
+
+Fixes since v1.8.4.2
+--------------------
+
+ * The interaction between use of Perl in our test suite and NO_PERL
+   has been clarified a bit.
+
+ * A fast-import stream expresses a pathname with funny characters by
+   quoting them in C style; remote-hg remote helper (in contrib/)
+   forgot to unquote such a path.
+
+ * One long-standing flaw in the pack transfer protocol used by "git
+   clone" was that there was no way to tell the other end which branch
+   "HEAD" points at, and the receiving end needed to guess.  A new
+   capability has been defined in the pack protocol to convey this
+   information so that cloning from a repository with more than one
+   branches pointing at the same commit where the HEAD is at now
+   reliably sets the initial branch in the resulting repository.
+
+ * We did not handle cases where http transport gets redirected during
+   the authorization request (e.g. from http:// to https://).
+
+ * "git rev-list --objects ^v1.0^ v1.0" gave v1.0 tag itself in the
+   output, but "git rev-list --objects v1.0^..v1.0" did not.
+
+ * The fall-back parsing of commit objects with broken author or
+   committer lines were less robust than ideal in picking up the
+   timestamps.
+
+ * Bash prompting code to deal with an SVN remote as an upstream
+   were coded in a way not supported by older Bash versions (3.x).
+
+ * "git checkout topic", when there is not yet a local "topic" branch
+   but there is a unique remote-tracking branch for a remote "topic"
+   branch, pretended as if "git checkout -t -b topic remote/$r/topic"
+   (for that unique remote $r) was run. This hack however was not
+   implemented for "git checkout topic --".
+
+ * Coloring around octopus merges in "log --graph" output was screwy.
+
+ * We did not generate HTML version of documentation to "git subtree"
+   in contrib/.
+
+ * The synopsis section of "git unpack-objects" documentation has been
+   clarified a bit.
+
+ * An ancient How-To on serving Git repositories on an HTTP server
+   lacked a warning that it has been mostly superseded with more
+   modern way.
+
+Also contains a handful of trivial code clean-ups, documentation
+updates, updates to the test suite, etc.
index 797e67bb738419f6b5d0d97cbcf3d8ab1c6a06cc..13b4336e511ba4633358d628cbe25fb09e596291 100644 (file)
@@ -248,6 +248,23 @@ Unless otherwise noted, all the fixes since v1.8.4 in the maintenance
 track are contained in this release (see release notes to them for
 details).
 
+ * An ancient How-To on serving Git repositories on an HTTP server
+   lacked a warning that it has been mostly superseded with more
+   modern way.
+   (merge 6d52bc3 sc/doc-howto-dumb-http later to maint).
+
+ * The interaction between use of Perl in our test suite and NO_PERL
+   has been clarified a bit.
+   (merge f8fc0ee jn/test-prereq-perl-doc later to maint).
+
+ * The synopsis section of "git unpack-objects" documentation has been
+   clarified a bit.
+   (merge 61e2e22 vd/doc-unpack-objects later to maint).
+
+ * We did not generate HTML version of documentation to "git subtree"
+   in contrib/.
+   (merge 95c62fb jk/subtree-install-fix later to maint).
+
  * A fast-import stream expresses a pathname with funny characters by
    quoting them in C style; remote-hg remote helper forgot to unquote
    such a path.
index c000f08a9d51bc5101f22e62586bb580ff3a9e51..ccd1fc8122a74be4ac04fd7be905ebf881f7413b 100644 (file)
@@ -8,9 +8,9 @@ endif::git-commit[]
 support the following date formats:
 
 Git internal format::
-       It is `<unix timestamp> <timezone offset>`, where `<unix
+       It is `<unix timestamp> <time zone offset>`, where `<unix
        timestamp>` is the number of seconds since the UNIX epoch.
-       `<timezone offset>` is a positive or negative offset from UTC.
+       `<time zone offset>` is a positive or negative offset from UTC.
        For example CET (which is 2 hours ahead UTC) is `+0200`.
 
 RFC 2822::
index f2c85cc6334e50f716c23be6cac4e502fe4d228f..8e70a61840ba59d75bf64cb14b08df9c0961ee63 100644 (file)
@@ -103,7 +103,7 @@ This header line is followed by the following information
 at least once for each commit:
 
 - the author name ("author"), email ("author-mail"), time
-  ("author-time"), and timezone ("author-tz"); similarly
+  ("author-time"), and time zone ("author-tz"); similarly
   for committer.
 - the filename in the commit that the line is attributed to.
 - the first line of the commit log message ("summary").
index d1bcda28f423566dff17a7bff85f40ae07d4ca9a..2df9953968ce19e7baf460a9c33de8f56398f11d 100644 (file)
@@ -144,7 +144,7 @@ This option can be used several times to provide several detection regexes.
        CVS by default uses the Unix username when writing its
        commit logs. Using this option and an author-conv-file
        maps the name recorded in CVS to author name, e-mail and
-       optional timezone:
+       optional time zone:
 +
 ---------
        exon=Andreas Ericsson <ae@op5.se>
@@ -154,7 +154,7 @@ This option can be used several times to provide several detection regexes.
 +
 'git cvsimport' will make it appear as those authors had
 their GIT_AUTHOR_NAME and GIT_AUTHOR_EMAIL set properly
-all along.  If a timezone is specified, GIT_AUTHOR_DATE will
+all along.  If a time zone is specified, GIT_AUTHOR_DATE will
 have the corresponding offset applied.
 +
 For convenience, this data is saved to `$GIT_DIR/cvs-authors`
index 73f980638e7939e8c0c6ef41920d5bb61b751632..fd22a9a0c1312382a972a39e06063e7ff77b027d 100644 (file)
@@ -251,7 +251,7 @@ advisement to help formatting routines display the timestamp.
 If the local offset is not available in the source material, use
 ``+0000'', or the most common local offset.  For example many
 organizations have a CVS repository which has only ever been accessed
-by users who are located in the same location and timezone.  In this
+by users who are located in the same location and time zone.  In this
 case a reasonable offset from UTC could be assumed.
 +
 Unlike the `rfc2822` format, this format is very strict.  Any
@@ -271,7 +271,7 @@ the malformed string.  There are also some types of malformed
 strings which Git will parse wrong, and yet consider valid.
 Seriously malformed strings will be rejected.
 +
-Unlike the `raw` format above, the timezone/UTC offset information
+Unlike the `raw` format above, the time zone/UTC offset information
 contained in an RFC 2822 date string is used to adjust the date
 value to UTC prior to storage.  Therefore it is important that
 this information be as accurate as possible.
@@ -287,13 +287,13 @@ format, or its format is easily convertible to it, as there is no
 ambiguity in parsing.
 
 `now`::
-       Always use the current time and timezone.  The literal
+       Always use the current time and time zone.  The literal
        `now` must always be supplied for `<when>`.
 +
-This is a toy format.  The current time and timezone of this system
+This is a toy format.  The current time and time zone of this system
 is always copied into the identity string at the time it is being
 created by fast-import.  There is no way to specify a different time or
-timezone.
+time zone.
 +
 This particular format is supplied as it's short to implement and
 may be useful to a process that wants to create a new commit
index beea10b148ce9a24752222081caecb1497150b29..6083aab87bd947c8528cbf347769b6621531b035 100644 (file)
@@ -42,6 +42,8 @@ Assume the following history exists and the current branch is
          A---B---C master on origin
         /
     D---E---F---G master
+       ^
+       origin/master in your repository
 ------------
 
 Then "`git pull`" will fetch and replay the changes from the remote
@@ -51,7 +53,7 @@ result in a new commit along with the names of the two parent commits
 and a log message from the user describing the changes.
 
 ------------
-         A---B---C remotes/origin/master
+         A---B---C origin/master
         /         \
     D---E---F---G---H master
 ------------
index dcad890616c818ee45b42b5abedcaf6e67fd5c60..30c5ee256463eca3f38cb5a62191ed194304d35b 100644 (file)
@@ -124,15 +124,15 @@ This automatically updates the rev_map if needed (see
 '$GIT_DIR/svn/\*\*/.rev_map.*' in the FILES section below for details).
 
 --localtime;;
-       Store Git commit times in the local timezone instead of UTC.  This
+       Store Git commit times in the local time zone instead of UTC.  This
        makes 'git log' (even without --date=local) show the same times
-       that `svn log` would in the local timezone.
+       that `svn log` would in the local time zone.
 +
 This doesn't interfere with interoperating with the Subversion
 repository you cloned from, but if you wish for your local Git
 repository to be able to interoperate with someone else's local Git
 repository, either don't use this option or you should both use it in
-the same local timezone.
+the same local time zone.
 
 --parent;;
        Fetch only from the SVN parent of the current HEAD.
index ff23494e7013c5d491c7a7e2642ec30133906aac..12cb108b8561a6365192a65688d116901468decf 100644 (file)
@@ -9,7 +9,7 @@ git-unpack-objects - Unpack objects from a packed archive
 SYNOPSIS
 --------
 [verse]
-'git unpack-objects' [-n] [-q] [-r] [--strict] <pack-file
+'git unpack-objects' [-n] [-q] [-r] [--strict] < <pack-file>
 
 
 DESCRIPTION
index 824a179a965ba419492840afb55d1d55e038ed0e..10cddb5b48e94633ebfbda881814ffb13949089c 100644 (file)
@@ -43,9 +43,10 @@ unreleased) version of Git, that is available from 'master'
 branch of the `git.git` repository.
 Documentation for older releases are available here:
 
-* link:v1.8.4.2/git.html[documentation for release 1.8.4.2]
+* link:v1.8.4.3/git.html[documentation for release 1.8.4.3]
 
 * release notes for
+  link:RelNotes/1.8.4.3.txt[1.8.4.3],
   link:RelNotes/1.8.4.2.txt[1.8.4.2],
   link:RelNotes/1.8.4.1.txt[1.8.4.1],
   link:RelNotes/1.8.4.txt[1.8.4].
index 54e334e3af1e790b132da5b6af761326d586ce8a..f9719605123003c97bdf2999f912712536fa927a 100644 (file)
@@ -113,12 +113,12 @@ full pathname may have special meaning:
 
  - A leading "`**`" followed by a slash means match in all
    directories. For example, "`**/foo`" matches file or directory
-   "`foo`" anywhere, the same as pattern "`foo`". "**/foo/bar"
+   "`foo`" anywhere, the same as pattern "`foo`". "`**/foo/bar`"
    matches file or directory "`bar`" anywhere that is directly
    under directory "`foo`".
 
- - A trailing "/**" matches everything inside. For example,
-   "abc/**" matches all files inside directory "abc", relative
+ - A trailing "`/**`" matches everything inside. For example,
+   "`abc/**`" matches all files inside directory "`abc`", relative
    to the location of the `.gitignore` file, with infinite depth.
 
  - A slash followed by two consecutive asterisks then a slash
index 305db633ccb1165e819a1061e8ec8b60e33e9eed..e2113d93c9d34aa0af3fd421d5f6ed9bf01ad896 100644 (file)
@@ -822,18 +822,18 @@ timed::
 Project specific override is not supported.
 
 javascript-timezone::
-       Enable and configure the ability to change a common timezone for dates
+       Enable and configure the ability to change a common time zone for dates
        in gitweb output via JavaScript.  Dates in gitweb output include
        authordate and committerdate in "commit", "commitdiff" and "log"
        views, and taggerdate in "tag" view.  Enabled by default.
 +
-The value is a list of three values: a default timezone (for if the client
-hasn't selected some other timezone and saved it in a cookie), a name of cookie
-where to store selected timezone, and a CSS class used to mark up
+The value is a list of three values: a default time zone (for if the client
+hasn't selected some other time zone and saved it in a cookie), a name of cookie
+where to store selected time zone, and a CSS class used to mark up
 dates for manipulation.  If you want to turn this feature off, set "default"
 to empty list: `[]`.
 +
-Typical gitweb config files will only change starting (default) timezone,
+Typical gitweb config files will only change starting (default) time zone,
 and leave other elements at their default values:
 +
 ---------------------------------------------------------------------------
@@ -843,9 +843,9 @@ $feature{'javascript-timezone'}{'default'}[0] = "utc";
 The example configuration presented here is guaranteed to be backwards
 and forward compatible.
 +
-Timezone values can be "local" (for local timezone that browser uses), "utc"
+Time zone values can be "local" (for local time zone that browser uses), "utc"
 (what gitweb uses when JavaScript or this feature is disabled), or numerical
-timezones in the form of "+/-HHMM", such as "+0200".
+time zones in the form of "+/-HHMM", such as "+0200".
 +
 Project specific override is not supported.
 
index 981cbddc8627fcc2322d626148e2735d6222075c..6de4f3c4875e3d9607754d5ca76a17e00c8f5841 100644 (file)
@@ -6,6 +6,10 @@ Content-type: text/asciidoc
 How to setup Git server over http
 =================================
 
+NOTE: This document is from 2006.  A lot has happened since then, and this
+document is now relevant mainly if your web host is not CGI capable.
+Almost everyone else should instead look at linkgit:git-http-backend[1].
+
 Since Apache is one of those packages people like to compile
 themselves while others prefer the bureaucrat's dream Debian, it is
 impossible to give guidelines which will work for everyone. Just send
index 5bdfb4285247770722434541700b0f7547e3a113..ec86d091993fc32c2ecc18bbefe019c98886beae 100644 (file)
@@ -720,7 +720,7 @@ include::pretty-options.txt[]
 `--date=relative` shows dates relative to the current time,
 e.g. "2 hours ago".
 +
-`--date=local` shows timestamps in user's local timezone.
+`--date=local` shows timestamps in user's local time zone.
 +
 `--date=iso` (or `--date=iso8601`) shows timestamps in ISO 8601 format.
 +
@@ -731,7 +731,7 @@ format, often found in E-mail messages.
 +
 `--date=raw` shows the date in the internal raw Git format `%s %z` format.
 +
-`--date=default` shows timestamps in the original timezone
+`--date=default` shows timestamps in the original time zone
 (either committer's or author's).
 
 ifdef::git-rev-list[]
index 4dcaac3e9798b9c1fb2f1575408303448d7197d6..366705cbe52a63f0522cb1b41b0834e05271706a 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 GVF=GIT-VERSION-FILE
-DEF_VER=v1.8.5-rc0
+DEF_VER=v1.8.5-rc1
 
 LF='
 '
index ad0f86de540dc394199f71c03665d0cd76371c35..5696cf0ef79cd8242e0a384a058d5bd565ec5be3 100644 (file)
@@ -975,9 +975,8 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
                        die(_("no such branch '%s'"), argv[0]);
                }
 
-               if (!branch_has_merge_config(branch)) {
+               if (!branch_has_merge_config(branch))
                        die(_("Branch '%s' has no upstream information"), branch->name);
-               }
 
                strbuf_addf(&buf, "branch.%s.remote", branch->name);
                git_config_set_multivar(buf.buf, NULL, NULL, 1);
index b9d36037041deac869a2fa498e823bd7f315c2ba..6f6210988709dc866bf79a5bb5523356773b93a0 100644 (file)
@@ -9,7 +9,7 @@
 #include "hash.h"
 #include "argv-array.h"
 
-#define SEEN           (1u<<0)
+#define SEEN           (1u << 0)
 #define MAX_TAGS       (FLAG_BITS - 1)
 
 static const char * const describe_usage[] = {
@@ -36,7 +36,6 @@ static const char *diff_index_args[] = {
        "diff-index", "--quiet", "HEAD", "--", NULL
 };
 
-
 struct commit_name {
        struct commit_name *next;
        unsigned char peeled[20];
@@ -46,6 +45,7 @@ struct commit_name {
        unsigned char sha1[20];
        char *path;
 };
+
 static const char *prio_names[] = {
        "head", "lightweight", "annotated",
 };
@@ -488,9 +488,8 @@ int cmd_describe(int argc, const char **argv, const char *prefix)
        } else if (dirty) {
                die(_("--dirty is incompatible with commit-ishes"));
        } else {
-               while (argc-- > 0) {
+               while (argc-- > 0)
                        describe(*argv++, argc == 0);
-               }
        }
        return 0;
 }
index 2fb8c5dc0b6fdc97beb82f4dc3802a8f0dad8211..adb93a9efa5ed9b97a08224e46f6fbaf680343e6 100644 (file)
@@ -169,7 +169,7 @@ static int builtin_diff_tree(struct rev_info *revs,
        if (ent1->item->flags & UNINTERESTING)
                swap = 1;
        sha1[swap] = ent0->item->sha1;
-       sha1[1-swap] = ent1->item->sha1;
+       sha1[1 - swap] = ent1->item->sha1;
        diff_tree_sha1(sha1[0], sha1[1], "", &revs->diffopt);
        log_tree_diff_flush(revs);
        return 0;
index 02a69c14e6abfc51413b397a93180e0890285e2a..41fb66dec2c2fd9645a72c28c362067fb3bcc16c 100644 (file)
@@ -186,13 +186,6 @@ static int option_parse_n(const struct option *opt,
        return 0;
 }
 
-static int option_parse_ff_only(const struct option *opt,
-                         const char *arg, int unset)
-{
-       fast_forward = FF_ONLY;
-       return 0;
-}
-
 static struct option builtin_merge_options[] = {
        { OPTION_CALLBACK, 'n', NULL, NULL, NULL,
                N_("do not show a diffstat at the end of the merge"),
@@ -210,9 +203,9 @@ static struct option builtin_merge_options[] = {
        OPT_BOOL('e', "edit", &option_edit,
                N_("edit message before committing")),
        OPT_SET_INT(0, "ff", &fast_forward, N_("allow fast-forward (default)"), FF_ALLOW),
-       { OPTION_CALLBACK, 0, "ff-only", NULL, NULL,
+       { OPTION_SET_INT, 0, "ff-only", &fast_forward, NULL,
                N_("abort if fast-forward is not possible"),
-               PARSE_OPT_NOARG | PARSE_OPT_NONEG, option_parse_ff_only },
+               PARSE_OPT_NOARG | PARSE_OPT_NONEG, NULL, FF_ONLY },
        OPT_RERERE_AUTOUPDATE(&allow_rerere_auto),
        OPT_BOOL(0, "verify-signatures", &verify_signatures,
                N_("Verify that the named commit has a valid GPG signature")),
index 435b2dea293b01daaad83e6905148be2256c02df..4030a168986d29bdbb2cd982a2e819ce009580f6 100644 (file)
@@ -21,13 +21,14 @@ GIT_SUBTREE    := git-subtree
 GIT_SUBTREE_DOC := git-subtree.1
 GIT_SUBTREE_XML := git-subtree.xml
 GIT_SUBTREE_TXT := git-subtree.txt
+GIT_SUBTREE_HTML := git-subtree.html
 
 all: $(GIT_SUBTREE)
 
 $(GIT_SUBTREE): $(GIT_SUBTREE_SH)
        cp $< $@ && chmod +x $@
 
-doc: $(GIT_SUBTREE_DOC)
+doc: $(GIT_SUBTREE_DOC) $(GIT_SUBTREE_HTML)
 
 install: $(GIT_SUBTREE)
        $(INSTALL) -d -m 755 $(DESTDIR)$(libexecdir)
@@ -46,6 +47,10 @@ $(GIT_SUBTREE_XML): $(GIT_SUBTREE_TXT)
        asciidoc -b docbook -d manpage -f $(ASCIIDOC_CONF) \
                -agit_version=$(gitver) $^
 
+$(GIT_SUBTREE_HTML): $(GIT_SUBTREE_TXT)
+       asciidoc -b xhtml11 -d manpage -f $(ASCIIDOC_CONF) \
+               -agit_version=$(gitver) $^
+
 test:
        $(MAKE) -C t/ test
 
index 74d1cc7db040c4d4fa736567be9340e4b4070863..95e69b19a70ba63f2055d6a2ec3f9af0092a0832 100755 (executable)
@@ -430,10 +430,10 @@ sub req_validrequests
 
     $log->debug("req_validrequests");
 
-    $log->debug("SEND : Valid-requests " . join(" ",keys %$methods));
+    $log->debug("SEND : Valid-requests " . join(" ",sort keys %$methods));
     $log->debug("SEND : ok");
 
-    print "Valid-requests " . join(" ",keys %$methods) . "\n";
+    print "Valid-requests " . join(" ",sort keys %$methods) . "\n";
     print "ok\n";
 }
 
@@ -2124,7 +2124,7 @@ sub req_diff
             print "M retrieving revision $meta2->{revision}\n"
         }
         print "M diff ";
-        foreach my $opt ( keys %{$state->{opt}} )
+        foreach my $opt ( sort keys %{$state->{opt}} )
         {
             if ( ref $state->{opt}{$opt} eq "ARRAY" )
             {
@@ -4050,7 +4050,7 @@ sub update
             close FILELIST;
 
             # Detect deleted files
-            foreach my $file ( keys %$head )
+            foreach my $file ( sort keys %$head )
             {
                 unless ( exists $seen_files->{$file} or $head->{$file}{filehash} eq "deleted" )
                 {
@@ -4078,7 +4078,7 @@ sub update
     }
 
     $self->delete_head();
-    foreach my $file ( keys %$head )
+    foreach my $file ( sort keys %$head )
     {
         $self->insert_head(
             $file,
index b4e32b74d3622f92b2c5d3b9881e5cdf49d7f375..962e82be8633217b811a8c8c87b892721b35f662 100644 (file)
--- a/pretty.c
+++ b/pretty.c
@@ -497,7 +497,7 @@ void pp_user_info(struct pretty_print_context *pp,
 static int is_empty_line(const char *line, int *len_p)
 {
        int len = *len_p;
-       while (len && isspace(line[len-1]))
+       while (len && isspace(line[len - 1]))
                len--;
        *len_p = len;
        return !len;
index 3fdea51ffed4839c6c30f34b45d67f5e95ab6cc2..956040c8c8fdd79c081acfaa466e4f3acc69507e 100644 (file)
@@ -1519,7 +1519,7 @@ struct cmdline_pathspec {
 static void append_prune_data(struct cmdline_pathspec *prune, const char **av)
 {
        while (*av) {
-               ALLOC_GROW(prune->path, prune->nr+1, prune->alloc);
+               ALLOC_GROW(prune->path, prune->nr + 1, prune->alloc);
                prune->path[prune->nr++] = *(av++);
        }
 }
@@ -1531,7 +1531,7 @@ static void read_pathspec_from_stdin(struct rev_info *revs, struct strbuf *sb,
                int len = sb->len;
                if (len && sb->buf[len - 1] == '\n')
                        sb->buf[--len] = '\0';
-               ALLOC_GROW(prune->path, prune->nr+1, prune->alloc);
+               ALLOC_GROW(prune->path, prune->nr + 1, prune->alloc);
                prune->path[prune->nr++] = xstrdup(sb->buf);
        }
 }
@@ -2134,7 +2134,7 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, struct s
                 *      call init_pathspec() to set revs->prune_data here.
                 * }
                 */
-               ALLOC_GROW(prune_data.path, prune_data.nr+1, prune_data.alloc);
+               ALLOC_GROW(prune_data.path, prune_data.nr + 1, prune_data.alloc);
                prune_data.path[prune_data.nr++] = NULL;
                parse_pathspec(&revs->prune_data, 0, 0,
                               revs->prefix, prune_data.path);
@@ -2987,7 +2987,7 @@ static struct commit *get_revision_internal(struct rev_info *revs)
        if (revs->max_count) {
                c = get_revision_1(revs);
                if (c) {
-                       while (0 < revs->skip_count) {
+                       while (revs->skip_count > 0) {
                                revs->skip_count--;
                                c = get_revision_1(revs);
                                if (!c)
@@ -3002,9 +3002,8 @@ static struct commit *get_revision_internal(struct rev_info *revs)
        if (c)
                c->object.flags |= SHOWN;
 
-       if (!revs->boundary) {
+       if (!revs->boundary)
                return c;
-       }
 
        if (!c) {
                /*
@@ -3050,9 +3049,8 @@ struct commit *get_revision(struct rev_info *revs)
 
        if (revs->reverse) {
                reversed = NULL;
-               while ((c = get_revision_internal(revs))) {
+               while ((c = get_revision_internal(revs)))
                        commit_list_insert(c, &reversed);
-               }
                revs->commits = reversed;
                revs->reverse = 0;
                revs->reverse_output_stage = 1;
index e7f1d211bf0a203978a3024bcbae5c98f25c60cf..89132df2fa481ce6cdd142fa31f5b2cfd2f43219 100644 (file)
@@ -5,6 +5,7 @@
 #include "grep.h"
 #include "notes.h"
 #include "commit.h"
+#include "diff.h"
 
 #define SEEN           (1u<<0)
 #define UNINTERESTING   (1u<<1)
index 1b7f88eeb1f1971f1568d5991978192c2d00645e..3914d9c5117f29651b56772da143f0a226494a62 100644 (file)
@@ -406,13 +406,12 @@ int start_command(struct child_process *cmd)
                                        unsetenv(*cmd->env);
                        }
                }
-               if (cmd->git_cmd) {
+               if (cmd->git_cmd)
                        execv_git_cmd(cmd->argv);
-               } else if (cmd->use_shell) {
+               else if (cmd->use_shell)
                        execv_shell_cmd(cmd->argv);
-               } else {
+               else
                        sane_execvp(cmd->argv[0], (char *const*) cmd->argv);
-               }
                if (errno == ENOENT) {
                        if (!cmd->silent_exec_failure)
                                error("cannot run %s: %s", cmd->argv[0],
@@ -446,7 +445,6 @@ int start_command(struct child_process *cmd)
                cmd->pid = -1;
        }
        close(notify_pipe[0]);
-
 }
 #else
 {
@@ -480,11 +478,10 @@ int start_command(struct child_process *cmd)
        if (cmd->env)
                env = make_augmented_environ(cmd->env);
 
-       if (cmd->git_cmd) {
+       if (cmd->git_cmd)
                cmd->argv = prepare_git_cmd(cmd->argv);
-       } else if (cmd->use_shell) {
+       else if (cmd->use_shell)
                cmd->argv = prepare_shell_cmd(cmd->argv);
-       }
 
        cmd->pid = mingw_spawnvpe(cmd->argv[0], cmd->argv, env, cmd->dir,
                                  fhin, fhout, fherr);
diff --git a/setup.c b/setup.c
index dbf41387204766981ebda444bc56a0884f9341f5..5432a31b62800bfba4d5a19226946ea30c5446a4 100644 (file)
--- a/setup.c
+++ b/setup.c
@@ -563,7 +563,7 @@ static const char *setup_git_directory_gently_1(int *nongit_ok)
 {
        const char *env_ceiling_dirs = getenv(CEILING_DIRECTORIES_ENVIRONMENT);
        struct string_list ceiling_dirs = STRING_LIST_INIT_DUP;
-       static char cwd[PATH_MAX+1];
+       static char cwd[PATH_MAX + 1];
        const char *gitdirenv, *ret;
        char *gitfile;
        int len, offset, offset_parent, ceil_offset = -1;
@@ -578,7 +578,7 @@ static const char *setup_git_directory_gently_1(int *nongit_ok)
        if (nongit_ok)
                *nongit_ok = 0;
 
-       if (!getcwd(cwd, sizeof(cwd)-1))
+       if (!getcwd(cwd, sizeof(cwd) - 1))
                die_errno("Unable to read current working directory");
        offset = len = strlen(cwd);
 
index 0e5fe7f9371d2e6ae5aa9ce99c4b6c2dfb7a456f..e9c299943b817b5b3b5b700ac3979211d5688e2e 100644 (file)
@@ -343,7 +343,6 @@ static int get_short_sha1(const char *name, int len, unsigned char *sha1,
        return status;
 }
 
-
 int for_each_abbrev(const char *prefix, each_abbrev_fn fn, void *cb_data)
 {
        char hex_pfx[40];
index 2167125008db5e3e1c7d13310c8da3a4243e8718..caeeb9dedc46940132dceb65f2ea976709945e2d 100644 (file)
--- a/t/README
+++ b/t/README
@@ -340,7 +340,11 @@ Don't:
  - use perl without spelling it as "$PERL_PATH". This is to help our
    friends on Windows where the platform Perl often adds CR before
    the end of line, and they bundle Git with a version of Perl that
-   does not do so, whose path is specified with $PERL_PATH.
+   does not do so, whose path is specified with $PERL_PATH. Note that we
+   provide a "perl" function which uses $PERL_PATH under the hood, so
+   you do not need to worry when simply running perl in the test scripts
+   (but you do, for example, on a shebang line or in a sub script
+   created via "write_script").
 
  - use sh without spelling it as "$SHELL_PATH", when the script can
    be misinterpreted by broken platform shell (e.g. Solaris).
@@ -387,7 +391,7 @@ of the test_* functions (see the "Test harness library" section
 below), e.g.:
 
     test_expect_success PERL 'I need Perl' '
-        "$PERL_PATH" -e "hlagh() if unf_unf()"
+        perl -e "hlagh() if unf_unf()"
     '
 
 The advantage of skipping tests like this is that platforms that don't
@@ -520,7 +524,7 @@ library for your script to use.
 
        test_external \
            'GitwebCache::*FileCache*' \
-           "$PERL_PATH" "$TEST_DIRECTORY"/t9503/test_cache_interface.pl
+           perl "$TEST_DIRECTORY"/t9503/test_cache_interface.pl
 
    If the test is outputting its own TAP you should set the
    test_external_has_tap variable somewhere before calling the first
@@ -536,7 +540,7 @@ library for your script to use.
 
        test_external_without_stderr \
            'Perl API' \
-           "$PERL_PATH" "$TEST_DIRECTORY"/t9700/test.pl
+           perl "$TEST_DIRECTORY"/t9700/test.pl
 
  - test_expect_code <exit-code> <command>
 
@@ -629,11 +633,18 @@ See the prereq argument to the test_* functions in the "Test harness
 library" section above and the "test_have_prereq" function for how to
 use these, and "test_set_prereq" for how to define your own.
 
- - PERL & PYTHON
+ - PYTHON
 
-   Git wasn't compiled with NO_PERL=YesPlease or
-   NO_PYTHON=YesPlease. Wrap any tests that need Perl or Python in
-   these.
+   Git wasn't compiled with NO_PYTHON=YesPlease. Wrap any tests that
+   need Python with this.
+
+ - PERL
+
+   Git wasn't compiled with NO_PERL=YesPlease.
+
+   Even without the PERL prerequisite, tests can assume there is a
+   usable perl interpreter at $PERL_PATH, though it need not be
+   particularly modern.
 
  - POSIXPERM
 
index 99caa42f5cdc199504d1c5fad442d8f8036e376e..c9d105d70725b9a97d5a9518e83c615821e91c23 100644 (file)
@@ -92,7 +92,7 @@ test_expect_success 'blame 2 authors + 1 branch2 author' '
 '
 
 test_expect_success 'merge branch1 & branch2' '
-       git pull . branch1
+       git merge branch1
 '
 
 test_expect_success 'blame 2 authors + 2 merged-in authors' '
index 9e381e000f6cbece882dec43d2a3dbab3d18a983..8cf909a6c5521729b24064c8273209ec2338d29c 100644 (file)
@@ -69,7 +69,7 @@ gitweb_run () {
        # written to web server logs, so we are not interested in that:
        # we are interested only in properly formatted errors/warnings
        rm -f gitweb.log &&
-       "$PERL_PATH" -- "$SCRIPT_NAME" \
+       perl -- "$SCRIPT_NAME" \
                >gitweb.output 2>gitweb.log &&
        perl -w -e '
                open O, ">gitweb.headers";
index c5e55b190bfbb06eef5a03d701b956e32ad22048..b0ec12ff6cbcdd7352b764db32bc34340b37fc8a 100644 (file)
@@ -29,7 +29,7 @@ export svnrepo
 svnconf=$PWD/svnconf
 export svnconf
 
-"$PERL_PATH" -w -e "
+perl -w -e "
 use SVN::Core;
 use SVN::Repos;
 \$SVN::Core::VERSION gt '1.1.0' or exit(42);
@@ -146,7 +146,7 @@ stop_httpd () {
 }
 
 convert_to_rev_db () {
-       "$PERL_PATH" -w -- - "$@" <<\EOF
+       perl -w -- - "$@" <<\EOF
 use strict;
 @ARGV == 2 or die "usage: convert_to_rev_db <input> <output>";
 open my $wr, '+>', $ARGV[1] or die "$!: couldn't open: $ARGV[1]";
index 7e8685b44c90047bff973bec61f046f6900637e5..b96e1254dd36821b4a390726c7aefb5286c243f3 100644 (file)
 # Print the big-endian 4-byte octal representation of $1
 uint32_octal () {
        n=$1
-       printf '\%o' $(($n / 16777216)); n=$((n % 16777216))
-       printf '\%o' $(($n /    65536)); n=$((n %    65536))
-       printf '\%o' $(($n /      256)); n=$((n %      256))
-       printf '\%o' $(($n           ));
+       printf '\\%o' $(($n / 16777216)); n=$((n % 16777216))
+       printf '\\%o' $(($n /    65536)); n=$((n %    65536))
+       printf '\\%o' $(($n /      256)); n=$((n %      256))
+       printf '\\%o' $(($n           ));
 }
 
 # Print the big-endian 4-byte binary representation of $1
index 58d911d21b894ba05e878e6efbc234071795c600..737df289a1450b80aed58b52a59cf00eb2d77da3 100644 (file)
@@ -19,7 +19,7 @@ test_expect_success PERL 'set up terminal for tests' '
        then
                :
        elif
-               "$PERL_PATH" "$TEST_DIRECTORY"/test-terminal.perl \
+               perl "$TEST_DIRECTORY"/test-terminal.perl \
                        sh -c "test -t 1 && test -t 2"
        then
                test_set_prereq TTY &&
@@ -29,7 +29,7 @@ test_expect_success PERL 'set up terminal for tests' '
                                echo >&4 "test_terminal: need to declare TTY prerequisite"
                                return 127
                        fi
-                       "$PERL_PATH" "$TEST_DIRECTORY"/test-terminal.perl "$@"
+                       perl "$TEST_DIRECTORY"/test-terminal.perl "$@"
                }
        fi
 '
index 181513ab4fba47750b3e6b25eb105f2c8a4a011f..b4d98e602f7422009599e58f0a7ae943476b1c7e 100755 (executable)
@@ -37,6 +37,14 @@ test_stderr () {
        test_cmp "$HOME/expected-stderr" "$HOME/stderr"
 }
 
+broken_c_unquote () {
+       "$PERL_PATH" -pe 's/^"//; s/\\//; s/"$//; tr/\n/\0/' "$@"
+}
+
+broken_c_unquote_verbose () {
+       "$PERL_PATH" -pe 's/    "/      /; s/\\//; s/"$//; tr/:\t\n/\0/' "$@"
+}
+
 stderr_contains () {
        regexp="$1"
        if grep "$regexp" "$HOME/stderr"
@@ -606,12 +614,11 @@ cat <<-EOF >expected-verbose
        $global_excludes:2:!globaltwo   b/globaltwo
 EOF
 
-sed -e 's/^"//' -e 's/\\//' -e 's/"$//' stdin | \
-       tr "\n" "\0" >stdin0
-sed -e 's/^"//' -e 's/\\//' -e 's/"$//' expected-default | \
-       tr "\n" "\0" >expected-default0
-sed -e 's/     "/      /' -e 's/\\//' -e 's/"$//' expected-verbose | \
-       tr ":\t\n" "\0" >expected-verbose0
+broken_c_unquote stdin >stdin0
+
+broken_c_unquote expected-default >expected-default0
+
+broken_c_unquote_verbose expected-verbose >expected-verbose0
 
 test_expect_success '--stdin' '
        expect_from_stdin <expected-default &&
@@ -692,12 +699,11 @@ EOF
 grep -v '^::   ' expected-all >expected-verbose
 sed -e 's/.*   //' expected-verbose >expected-default
 
-sed -e 's/^"//' -e 's/\\//' -e 's/"$//' stdin | \
-       tr "\n" "\0" >stdin0
-sed -e 's/^"//' -e 's/\\//' -e 's/"$//' expected-default | \
-       tr "\n" "\0" >expected-default0
-sed -e 's/     "/      /' -e 's/\\//' -e 's/"$//' expected-verbose | \
-       tr ":\t\n" "\0" >expected-verbose0
+broken_c_unquote stdin >stdin0
+
+broken_c_unquote expected-default >expected-default0
+
+broken_c_unquote_verbose expected-verbose >expected-verbose0
 
 test_expect_success '--stdin from subdirectory' '
        expect_from_stdin <expected-default &&
index 428ebb00804c47199e4a786cdc495a84597c78fd..a29d166e007b7ef1d669231f2da318cecdb6f859 100755 (executable)
@@ -12,7 +12,7 @@ if ! test_have_prereq PERL; then
        test_done
 fi
 
-"$PERL_PATH" -MTest::More -e 0 2>/dev/null || {
+perl -MTest::More -e 0 2>/dev/null || {
        skip_all="Perl Test::More unavailable, skipping test"
        test_done
 }
@@ -22,6 +22,6 @@ test_external_has_tap=1
 
 test_external_without_stderr \
     'Perl Git::I18N API' \
-    "$PERL_PATH" "$TEST_DIRECTORY"/t0202/test.pl
+    perl "$TEST_DIRECTORY"/t0202/test.pl
 
 test_done
index df573c4978c9d6b665b56eeae7bc9997c7df4207..b946f8768649dd76d8a175877c63d49244e00ffb 100755 (executable)
@@ -42,13 +42,13 @@ test_expect_success 'ls-tree piped to mktree (2)' '
 '
 
 test_expect_success 'ls-tree output in wrong order given to mktree (1)' '
-       "$PERL_PATH" -e "print reverse <>" <top |
+       perl -e "print reverse <>" <top |
        git mktree >actual &&
        test_cmp tree actual
 '
 
 test_expect_success 'ls-tree output in wrong order given to mktree (2)' '
-       "$PERL_PATH" -e "print reverse <>" <top.withsub |
+       perl -e "print reverse <>" <top.withsub |
        git mktree >actual &&
        test_cmp tree.withsub actual
 '
index 7480d6e7c2a8d14c5f75875d47eefe96ca9c5010..9a146f133539387a8cbc70fb4f5095eca5cd288e 100755 (executable)
@@ -69,7 +69,7 @@ test_expect_success 'ls-files -z does not quote funny filename' '
        tabs    ," (dq) and spaces
        EOF
        git ls-files -z >ls-files.z &&
-       "$PERL_PATH" -pe "y/\000/\012/" <ls-files.z >current &&
+       perl -pe "y/\000/\012/" <ls-files.z >current &&
        test_cmp expected current
 '
 
@@ -106,7 +106,7 @@ test_expect_success 'diff-index -z does not quote funny filename' '
        tabs    ," (dq) and spaces
        EOF
        git diff-index -z --name-status $t0 >diff-index.z &&
-       "$PERL_PATH" -pe "y/\000/\012/" <diff-index.z >current &&
+       perl -pe "y/\000/\012/" <diff-index.z >current &&
        test_cmp expected current
 '
 
@@ -116,7 +116,7 @@ test_expect_success 'diff-tree -z does not quote funny filename' '
        tabs    ," (dq) and spaces
        EOF
        git diff-tree -z --name-status $t0 $t1 >diff-tree.z &&
-       "$PERL_PATH" -pe y/\\000/\\012/ <diff-tree.z >current &&
+       perl -pe y/\\000/\\012/ <diff-tree.z >current &&
        test_cmp expected current
 '
 
index 8f272bce84ba605da82dacb04561649f10878df0..73194b2c3dbe267b759bfd036367366b4955f0c4 100755 (executable)
@@ -293,7 +293,7 @@ check_threading () {
        (git format-patch --stdout "$@"; echo $? > status.out) |
        # Prints everything between the Message-ID and In-Reply-To,
        # and replaces all Message-ID-lookalikes by a sequence number
-       "$PERL_PATH" -ne '
+       perl -ne '
                if (/^(message-id|references|in-reply-to)/i) {
                        $printing = 1;
                } elsif (/^\S/) {
index 3fb4b976a277e69cdbf73172caf335748be609a3..604a838c1ab4d173f9910158935d74398fabf788 100755 (executable)
@@ -145,7 +145,7 @@ test_expect_success 'another test, with --ignore-space-at-eol' 'test_cmp expect
 test_expect_success 'ignore-blank-lines: only new lines' '
        test_seq 5 >x &&
        git update-index x &&
-       test_seq 5 | sed "/3/i \\
+       test_seq 5 | sed "/3/i\\
 " >x &&
        git diff --ignore-blank-lines >out &&
        >expect &&
@@ -155,7 +155,8 @@ test_expect_success 'ignore-blank-lines: only new lines' '
 test_expect_success 'ignore-blank-lines: only new lines with space' '
        test_seq 5 >x &&
        git update-index x &&
-       test_seq 5 | sed "/3/i \ " >x &&
+       test_seq 5 | sed "/3/i\\
+ " >x &&
        git diff -w --ignore-blank-lines >out &&
        >expect &&
        test_cmp out expect
index 2e7d73f0906e6a2808706236328470b2d855e9f9..8a309795c9c9654446d82c2e474e1ca08486e081 100755 (executable)
@@ -177,7 +177,7 @@ test_expect_success 'no diff with -diff' '
        git diff | grep Binary
 '
 
-echo NULZbetweenZwords | "$PERL_PATH" -pe 'y/Z/\000/' > file
+echo NULZbetweenZwords | perl -pe 'y/Z/\000/' > file
 
 test_expect_success 'force diff with "diff"' '
        echo >.gitattributes "file diff" &&
index 36e2f075c9f94286a05474b58e7600f2a9de2f20..3ccc237a8d4443bfc8763fbb9cb51033f846b0e8 100755 (executable)
@@ -27,7 +27,7 @@ test_expect_success \
      git config --bool diff.suppressBlankEmpty true &&
      git diff f > actual &&
      test_cmp exp actual &&
-     "$PERL_PATH" -i.bak -p -e "s/^\$/ /" exp &&
+     perl -i.bak -p -e "s/^\$/ /" exp &&
      git config --bool diff.suppressBlankEmpty false &&
      git diff f > actual &&
      test_cmp exp actual &&
index b1b906b1bb58ad9f96ee8f6146a2d49ec999e3f2..1b420e3b5fc2a7130d2b10bcd5660670b9d780c8 100755 (executable)
@@ -23,10 +23,10 @@ test_expect_success 'setup' '
        git commit -m "Initial Version" 2>/dev/null &&
 
        git checkout -b binary &&
-       "$PERL_PATH" -pe "y/x/\000/" <file1 >file3 &&
+       perl -pe "y/x/\000/" <file1 >file3 &&
        cat file3 >file4 &&
        git add file2 &&
-       "$PERL_PATH" -pe "y/\000/v/" <file3 >file1 &&
+       perl -pe "y/\000/v/" <file3 >file1 &&
        rm -f file2 &&
        git update-index --add --remove file1 file2 file3 file4 &&
        git commit -m "Second Version" &&
index fca815392e305da095486888a38b6bff41e3d750..2298ece8019d79ef718ef658bdac74493d265b92 100755 (executable)
@@ -12,14 +12,14 @@ test_description='git apply in reverse
 test_expect_success setup '
 
        for i in a b c d e f g h i j k l m n; do echo $i; done >file1 &&
-       "$PERL_PATH" -pe "y/ijk/\\000\\001\\002/" <file1 >file2 &&
+       perl -pe "y/ijk/\\000\\001\\002/" <file1 >file2 &&
 
        git add file1 file2 &&
        git commit -m initial &&
        git tag initial &&
 
        for i in a b c g h i J K L m o n p q; do echo $i; done >file1 &&
-       "$PERL_PATH" -pe "y/mon/\\000\\001\\002/" <file1 >file2 &&
+       perl -pe "y/mon/\\000\\001\\002/" <file1 >file2 &&
 
        git commit -a -m second &&
        git tag second &&
index 7f6666fcd3ffd6dfe53ed72cedcbabfe5a626ed8..ed9c91e25b584c2241c238f9c6ffad9a3a327d2c 100755 (executable)
@@ -78,7 +78,7 @@ test_expect_success 'activate rerere, old style (conflicting merge)' '
        test_might_fail git config --unset rerere.enabled &&
        test_must_fail git merge first &&
 
-       sha1=$("$PERL_PATH" -pe "s/     .*//" .git/MERGE_RR) &&
+       sha1=$(perl -pe "s/     .*//" .git/MERGE_RR) &&
        rr=.git/rr-cache/$sha1 &&
        grep "^=======\$" $rr/preimage &&
        ! test -f $rr/postimage &&
@@ -91,7 +91,7 @@ test_expect_success 'rerere.enabled works, too' '
        git reset --hard &&
        test_must_fail git merge first &&
 
-       sha1=$("$PERL_PATH" -pe "s/     .*//" .git/MERGE_RR) &&
+       sha1=$(perl -pe "s/     .*//" .git/MERGE_RR) &&
        rr=.git/rr-cache/$sha1 &&
        grep ^=======$ $rr/preimage
 '
@@ -101,7 +101,7 @@ test_expect_success 'set up rr-cache' '
        git config rerere.enabled true &&
        git reset --hard &&
        test_must_fail git merge first &&
-       sha1=$("$PERL_PATH" -pe "s/     .*//" .git/MERGE_RR) &&
+       sha1=$(perl -pe "s/     .*//" .git/MERGE_RR) &&
        rr=.git/rr-cache/$sha1
 '
 
@@ -172,7 +172,7 @@ test_expect_success 'first postimage wins' '
        git show second^:a1 | sed "s/To die: t/To die! T/" >a1 &&
        git commit -q -a -m third &&
 
-       test_must_fail git pull . first &&
+       test_must_fail git merge first &&
        # rerere kicked in
        ! grep "^=======\$" a1 &&
        test_cmp expect a1
@@ -185,7 +185,7 @@ test_expect_success 'rerere updates postimage timestamp' '
 
 test_expect_success 'rerere clear' '
        rm $rr/postimage &&
-       echo "$sha1     a1" | "$PERL_PATH" -pe "y/\012/\000/" >.git/MERGE_RR &&
+       echo "$sha1     a1" | perl -pe "y/\012/\000/" >.git/MERGE_RR &&
        git rerere clear &&
        ! test -d $rr
 '
index 61e787dca121928a191051acc40aefffabbcc0e1..20c1961515a02e3411d02a5656bf8a9dc6b198de 100755 (executable)
@@ -13,9 +13,9 @@ TRASH=`pwd`
 test_expect_success \
     'setup' \
     'rm -f .git/index* &&
-     "$PERL_PATH" -e "print \"a\" x 4096;" > a &&
-     "$PERL_PATH" -e "print \"b\" x 4096;" > b &&
-     "$PERL_PATH" -e "print \"c\" x 4096;" > c &&
+     perl -e "print \"a\" x 4096;" > a &&
+     perl -e "print \"b\" x 4096;" > b &&
+     perl -e "print \"c\" x 4096;" > c &&
      test-genrandom "seed a" 2097152 > a_big &&
      test-genrandom "seed b" 2097152 > b_big &&
      git update-index --add a a_big b b_big c &&
@@ -129,7 +129,7 @@ test_expect_success \
 cd "$TRASH"
 
 test_expect_success 'compare delta flavors' '
-       "$PERL_PATH" -e '\''
+       perl -e '\''
                defined($_ = -s $_) or die for @ARGV;
                exit 1 if $ARGV[0] <= $ARGV[1];
        '\'' test-2-$packname_2.pack test-3-$packname_3.pack
index 35926debe3df81dc997e99f5edbf74ab5f9ec479..663b02bbb13cf6bee3d59ea350d5f42add687d7b 100755 (executable)
@@ -98,7 +98,7 @@ test_expect_success \
     'create_new_pack &&
      git prune-packed &&
      chmod +w ${pack}.pack &&
-     "$PERL_PATH" -i.bak -pe "s/ base /abcdef/" ${pack}.pack &&
+     perl -i.bak -pe "s/ base /abcdef/" ${pack}.pack &&
      test_must_fail git cat-file blob $blob_1 > /dev/null &&
      test_must_fail git cat-file blob $blob_2 > /dev/null &&
      test_must_fail git cat-file blob $blob_3 > /dev/null'
@@ -155,7 +155,7 @@ test_expect_success \
     'create_new_pack &&
      git prune-packed &&
      chmod +w ${pack}.pack &&
-     "$PERL_PATH" -i.bak -pe "s/ delta1 /abcdefgh/" ${pack}.pack &&
+     perl -i.bak -pe "s/ delta1 /abcdefgh/" ${pack}.pack &&
      git cat-file blob $blob_1 > /dev/null &&
      test_must_fail git cat-file blob $blob_2 > /dev/null &&
      test_must_fail git cat-file blob $blob_3 > /dev/null'
index fb16833f7673ed33cd097b98e4ca91df1a89b135..afb439e09c2db4853c6eba88a1e630f319337cf8 100755 (executable)
@@ -235,7 +235,7 @@ test_expect_success EXPENSIVE 'create 50,000 tags in the repo' '
        done | git fast-import --export-marks=marks &&
 
        # now assign tags to all the dangling commits we created above
-       tag=$("$PERL_PATH" -e "print \"bla\" x 30") &&
+       tag=$(perl -e "print \"bla\" x 30") &&
        sed -e "s|^:\([^ ]*\) \(.*\)$|\2 refs/tags/$tag-\1|" <marks >>packed-refs
        )
 '
index bbb0581f88a874c74e296754544300544429ccc4..e51eb41f4b9575d2b51d8d4d255ff5ab7a0889ad 100755 (executable)
@@ -37,7 +37,7 @@ test_expect_success 'verify number of revisions' \
 
 test_expect_success 'corrupt second commit object' \
    '
-   "$PERL_PATH" -i.bak -pe "s/second commit/socond commit/" .git/objects/pack/*.pack &&
+   perl -i.bak -pe "s/second commit/socond commit/" .git/objects/pack/*.pack &&
    test_must_fail git fsck --full
    '
 
index 892a537989fd7e877f698925fb0a8a33a1e20939..59fc2f06e0b5895af60b6eb4084fe7a38d3aa948 100755 (executable)
@@ -25,7 +25,7 @@ test_expect_success 'set up --reverse example' '
 
 test_expect_success '--reverse --parents --full-history combines correctly' '
        git rev-list --parents --full-history master -- foo |
-               "$PERL_PATH" -e "print reverse <>" > expected &&
+               perl -e "print reverse <>" > expected &&
        git rev-list --reverse --parents --full-history master -- foo \
                > actual &&
        test_cmp actual expected
@@ -33,7 +33,7 @@ test_expect_success '--reverse --parents --full-history combines correctly' '
 
 test_expect_success '--boundary does too' '
        git rev-list --boundary --parents --full-history master ^root -- foo |
-               "$PERL_PATH" -e "print reverse <>" > expected &&
+               perl -e "print reverse <>" > expected &&
        git rev-list --boundary --reverse --parents --full-history \
                master ^root -- foo > actual &&
        test_cmp actual expected
index 6fb59f32937102b4b5cdb014774bee5dbfe5a1f0..c987b5ed652b977cc2169bdd4c64f42eccdf63db 100755 (executable)
@@ -994,7 +994,7 @@ test_expect_success 'status -s submodule summary (clean submodule)' '
 
 test_expect_success 'status -z implies porcelain' '
        git status --porcelain |
-       "$PERL_PATH" -pe "s/\012/\000/g" >expect &&
+       perl -pe "s/\012/\000/g" >expect &&
        git status -z >output &&
        test_cmp expect output
 '
index f524d2f383212c7d5fb02103cc08c3cdde2519fc..d33d7140060613fbec4c45dc8d2c86394d64b4fa 100755 (executable)
@@ -62,7 +62,7 @@ test_expect_success 'setup git mirror and merge' '
        echo friend > README &&
        cat tmp >> README &&
        git commit -a -m "friend" &&
-       git pull . merge
+       git merge merge
        '
 
 test_debug 'gitk --all & sleep 1'
index 9a40f1e1993a1bc04e3e1cba6452dd290a8e00e9..8cfdfe790f1e0bb7cd0ddb72a72a55073368ec60 100755 (executable)
@@ -29,7 +29,7 @@ fi
 compare_svn_head_with () {
        # extract just the log message and strip out committer info.
        # don't use --limit here since svn 1.1.x doesn't have it,
-       LC_ALL="$a_utf8_locale" svn log `git svn info --url` | "$PERL_PATH" -w -e '
+       LC_ALL="$a_utf8_locale" svn log `git svn info --url` | perl -w -e '
                use bytes;
                $/ = ("-"x72) . "\n";
                my @x = <STDIN>;
index c17aa3186f7dbf02f474345ba507969060f867ab..d60da63f7aced3e13a411eee661509ae3790e68f 100755 (executable)
@@ -20,8 +20,8 @@ test_expect_success '(supposedly) non-conflicting change from SVN' '
        test x"`sed -n -e 61p < file`" = x61 &&
        svn_cmd co "$svnrepo" tmp &&
        (cd tmp &&
-               "$PERL_PATH" -i.bak -p -e "s/^58$/5588/" file &&
-               "$PERL_PATH" -i.bak -p -e "s/^61$/6611/" file &&
+               perl -i.bak -p -e "s/^58$/5588/" file &&
+               perl -i.bak -p -e "s/^61$/6611/" file &&
                poke file &&
                test x"`sed -n -e 58p < file`" = x5588 &&
                test x"`sed -n -e 61p < file`" = x6611 &&
@@ -40,8 +40,8 @@ test_expect_success 'some unrelated changes to git' "
 test_expect_success 'change file but in unrelated area' "
        test x\"\`sed -n -e 4p < file\`\" = x4 &&
        test x\"\`sed -n -e 7p < file\`\" = x7 &&
-       "$PERL_PATH" -i.bak -p -e 's/^4\$/4444/' file &&
-       "$PERL_PATH" -i.bak -p -e 's/^7\$/7777/' file &&
+       perl -i.bak -p -e 's/^4\$/4444/' file &&
+       perl -i.bak -p -e 's/^7\$/7777/' file &&
        test x\"\`sed -n -e 4p < file\`\" = x4444 &&
        test x\"\`sed -n -e 7p < file\`\" = x7777 &&
        git commit -m '4 => 4444, 7 => 7777' file &&
index 88fc407ed6aa96acd21eb249d10832fe3ff8723d..27263dfb80420a417bb0f33aa8731ef2fb7bc7b6 100755 (executable)
@@ -12,7 +12,7 @@ test_description='test git fast-import utility'
 # This could be written as "head -c $1", but IRIX "head" does not
 # support the -c option.
 head_c () {
-       "$PERL_PATH" -e '
+       perl -e '
                my $len = $ARGV[1];
                while ($len > 0) {
                        my $s;
index 34c2d8f49ab6fd02a19e4b9f95e31838c8de3ece..2312dec8f096fe7e36feeabd0e1cd85b5e421d4a 100755 (executable)
@@ -429,7 +429,7 @@ test_expect_success 'fast-export quotes pathnames' '
                --cacheinfo 100644 $blob "path with \\backslash" \
                --cacheinfo 100644 $blob "path with space" &&
         git commit -m addition &&
-        git ls-files -z -s | "$PERL_PATH" -0pe "s{\\t}{$&subdir/}" >index &&
+        git ls-files -z -s | perl -0pe "s{\\t}{$&subdir/}" >index &&
         git read-tree --empty &&
         git update-index -z --index-info <index &&
         git commit -m rename &&
index 043138631b8ba7fa21899e634383925feb6737e8..3edc4086d860e38e4dddab97a223071ab8e3cfc0 100755 (executable)
@@ -20,7 +20,7 @@ then
     skip_all='skipping git-cvsserver tests, cvs not found'
     test_done
 fi
-"$PERL_PATH" -e 'use DBI; use DBD::SQLite' >/dev/null 2>&1 || {
+perl -e 'use DBI; use DBD::SQLite' >/dev/null 2>&1 || {
     skip_all='skipping git-cvsserver tests, Perl SQLite interface unavailable'
     test_done
 }
index 8c3db763013ff736e173a405de70f68cbdddaf9f..5a4ed28e4980ea080fc018043527d9c62dd9b5d7 100755 (executable)
@@ -68,7 +68,7 @@ then
     skip_all='skipping git-cvsserver tests, perl not available'
     test_done
 fi
-"$PERL_PATH" -e 'use DBI; use DBD::SQLite' >/dev/null 2>&1 || {
+perl -e 'use DBI; use DBD::SQLite' >/dev/null 2>&1 || {
     skip_all='skipping git-cvsserver tests, Perl SQLite interface unavailable'
     test_done
 }
index db69af2cff72733bda515446a48b5ec8dcee23fd..1e266efffff6880929fdf2a35209511c5cefcba2 100755 (executable)
@@ -76,7 +76,7 @@ then
        skip_all='skipping git-cvsserver tests, perl not available'
        test_done
 fi
-"$PERL_PATH" -e 'use DBI; use DBD::SQLite' >/dev/null 2>&1 || {
+perl -e 'use DBI; use DBD::SQLite' >/dev/null 2>&1 || {
        skip_all='skipping git-cvsserver tests, Perl SQLite interface unavailable'
        test_done
 }
index 718014d5dead8f36b2dde6ce38de63316ec57fdb..e74b9ab1e16a9255afad32de380b69aa9e76db47 100755 (executable)
@@ -328,7 +328,7 @@ test_expect_success \
         git add b &&
         git commit -a -m "On branch" &&
         git checkout master &&
-        git pull . b &&
+        git merge b &&
         git tag merge_commit'
 
 test_expect_success \
index 435d8964763d3f048a71db5453b3a19e0cbb7fb9..102c133112c7149258d123b95acec807006890b7 100755 (executable)
@@ -11,7 +11,7 @@ if ! test_have_prereq PERL; then
        test_done
 fi
 
-"$PERL_PATH" -MTest::More -e 0 2>/dev/null || {
+perl -MTest::More -e 0 2>/dev/null || {
        skip_all="Perl Test::More unavailable, skipping test"
        test_done
 }
@@ -55,6 +55,6 @@ test_external_has_tap=1
 
 test_external_without_stderr \
     'Perl API' \
-    "$PERL_PATH" "$TEST_DIRECTORY"/t9700/test.pl
+    perl "$TEST_DIRECTORY"/t9700/test.pl
 
 test_done
index 34fbc900055d9bbaa9e533063b7c69e384e07e5a..8134ab439b2eb91a3a315cab92b12a2b8b3e5a00 100755 (executable)
@@ -263,7 +263,7 @@ test_expect_success 'cope with rcs keyword expansion damage' '
                git config git-p4.attemptRCSCleanup true &&
                (cd "$cli" && p4_append_to_file kwfile1.c) &&
                old_lines=$(wc -l <kwfile1.c) &&
-               "$PERL_PATH" -n -i -e "print unless m/Revision:/" kwfile1.c &&
+               perl -n -i -e "print unless m/Revision:/" kwfile1.c &&
                new_lines=$(wc -l <kwfile1.c) &&
                test $new_lines = $(($old_lines - 1)) &&
 
index f98769427b51017db7b9d757fd12e582609dbb03..2f79146e6ce0c5df32845f7c9c0927cea133ad5f 100644 (file)
@@ -76,11 +76,11 @@ test_decode_color () {
 }
 
 nul_to_q () {
-       "$PERL_PATH" -pe 'y/\000/Q/'
+       perl -pe 'y/\000/Q/'
 }
 
 q_to_nul () {
-       "$PERL_PATH" -pe 'y/Q/\000/'
+       perl -pe 'y/Q/\000/'
 }
 
 q_to_cr () {
@@ -648,7 +648,7 @@ test_seq () {
        2)      ;;
        *)      error "bug in the test script: not 1 or 2 parameters to test_seq" ;;
        esac
-       "$PERL_PATH" -le 'print for $ARGV[0]..$ARGV[1]' -- "$@"
+       perl -le 'print for $ARGV[0]..$ARGV[1]' -- "$@"
 }
 
 # This function can be used to schedule some commands to be run
@@ -711,6 +711,10 @@ test_ln_s_add () {
        fi
 }
 
+perl () {
+       command "$PERL_PATH" "$@"
+}
+
 # The following mingw_* functions obey POSIX shell syntax, but are actually
 # bash scripts, and are meant to be used only with bash on Windows.
 
index b32e2d64dd344c3f8c4d5f42b6c48dd6bdb8d29f..673b7c214f981cf158a8790b7278e37611c700fa 100644 (file)
@@ -269,6 +269,7 @@ static const char *unsupported_options[] = {
        TRANS_OPT_THIN,
        TRANS_OPT_KEEP
        };
+
 static const char *boolean_options[] = {
        TRANS_OPT_THIN,
        TRANS_OPT_KEEP,