Merge branch 'rr/svn-fe' into maint
authorJunio C Hamano <gitster@pobox.com>
Tue, 3 Aug 2010 22:17:11 +0000 (15:17 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 3 Aug 2010 22:17:11 +0000 (15:17 -0700)
* rr/svn-fe:
  contrib/svn-fe: Add the svn-fe target to .gitignore
  contrib/svn-fe: Fix IncludePath

57 files changed:
Documentation/RelNotes-1.7.0.7.txt [new file with mode: 0644]
Documentation/RelNotes-1.7.1.2.txt
Documentation/RelNotes-1.7.2.1.txt [new file with mode: 0644]
Documentation/RelNotes-1.7.2.txt
Documentation/config.txt
Documentation/git-add.txt
Documentation/git-ls-files.txt
Documentation/git-mergetool.txt
Documentation/git-push.txt
Documentation/git-read-tree.txt
Documentation/git-request-pull.txt
Documentation/git-rev-parse.txt
Documentation/git-submodule.txt
Documentation/git.txt
GIT-VERSION-GEN
INSTALL
Makefile
RelNotes
builtin/add.c
builtin/commit.c
builtin/diff.c
builtin/fetch.c
builtin/help.c
dir.c
dir.h
git-gui/git-gui.sh
git-gui/lib/blame.tcl
git-gui/lib/choose_repository.tcl
git-gui/lib/diff.tcl
git-gui/lib/option.tcl
git-gui/lib/shortcut.tcl
git-gui/lib/status_bar.tcl
git-gui/lib/win32.tcl
git-gui/windows/git-gui.sh
git-instaweb.sh
git-rebase--interactive.sh
git-rebase.sh
git-submodule.sh
git-svn.perl
git-web--browse.sh
git.c
path.c
server-info.c
setup.c
t/Makefile
t/README
t/lib-httpd.sh
t/t1300-repo-config.sh
t/t2017-checkout-orphan.sh
t/t3200-branch.sh
t/t3301-notes.sh
t/t3404-rebase-interactive.sh
t/t3418-rebase-continue.sh [new file with mode: 0755]
t/t3700-add.sh
t/t5541-http-push.sh
t/t7400-submodule-basic.sh
t/test-lib.sh

diff --git a/Documentation/RelNotes-1.7.0.7.txt b/Documentation/RelNotes-1.7.0.7.txt
new file mode 100644 (file)
index 0000000..d0cb7ca
--- /dev/null
@@ -0,0 +1,16 @@
+Git v1.7.0.7 Release Notes
+==========================
+
+Fixes since v1.7.0.6
+--------------------
+
+ * "make NO_CURL=NoThanks install" was broken.
+
+ * An overlong line after ".gitdir: " in a git file caused out of bounds
+   access to an array on the stack.
+
+ * "git config --path conf.var" to attempt to expand a variable conf.var
+   that uses "~/" short-hand segfaulted when $HOME environment variable
+   was not set.
+
+And other minor fixes and documentation updates.
index 46b6a960c799a5324b48ea2e266eaab5187ded24..61ba14e262a450c47d1490f4eedadbf8031fd3ed 100644 (file)
@@ -17,3 +17,12 @@ Fixes since v1.7.1.1
 
  * "git rev-parse --parseopt --stop-at-non-option" did not stop at non option
    when --keep-dashdash was in effect.
+
+ * An overlong line after ".gitdir: " in a git file caused out of bounds
+   access to an array on the stack.
+
+ * "git config --path conf.var" to attempt to expand a variable conf.var
+   that uses "~/" short-hand segfaulted when $HOME environment variable
+   was not set.
+
+And other minor fixes and documentation updates.
diff --git a/Documentation/RelNotes-1.7.2.1.txt b/Documentation/RelNotes-1.7.2.1.txt
new file mode 100644 (file)
index 0000000..1103c47
--- /dev/null
@@ -0,0 +1,25 @@
+Git v1.7.2.1 Release Notes
+==========================
+
+Fixes since v1.7.2
+------------------
+
+ * "git instaweb" wasn't useful when your Apache was installed under a
+   name other than apache2 (e.g. "httpd").
+
+ * Similarly, "git web--browse" (invoked by "git help -w") learned that
+   chrome browser is sometimes called google-chrome.
+
+ * An overlong line after ".gitdir: " in a git file caused out of bounds
+   access to an array on the stack.
+
+ * "git config --path conf.var" to attempt to expand a variable conf.var
+   that uses "~/" short-hand segfaulted when $HOME environment variable
+   was not set.
+
+ * Documentation on Cygwin failed to build.
+
+ * The error message from "git pull blarg" when 'blarg' is an unknown
+   remote name has been improved.
+
+And other minor fixes and documentation updates.
index f24b3876af6e2edbfdd7e8af2eff445fb8e6f85d..15cf01178c1f653230c8f718ef7024b147ecacf9 100644 (file)
@@ -1,5 +1,5 @@
-Git v1.7.2 Release Notes (draft)
-================================
+Git v1.7.2 Release Notes
+========================
 
 Updates since v1.7.1
 --------------------
@@ -123,6 +123,8 @@ Updates since v1.7.1
 
  * The test harness has been updated to produce TAP-friendly output.
 
+ * Many documentation improvement patches are also included.
+
 
 Fixes since v1.7.1
 ------------------
@@ -147,9 +149,3 @@ release, unless otherwise noted.
 
  * "git read-tree -m A B" used to switch to branch B while retaining
    local changes added an incorrect cache-tree information (b1f47514).
-
---
-exec >/var/tmp/1
-O=v1.7.2-rc2-17-gc9a9766
-echo O=$(git describe HEAD)
-git shortlog --no-merges HEAD ^maint ^$O
index e75434b3ef2d81fa8dafd552d4b689eb84eea441..f81fb918dac03bc6084f84d818ba08caacd39fc1 100644 (file)
@@ -1558,6 +1558,10 @@ receive.denyDeletes::
        If set to true, git-receive-pack will deny a ref update that deletes
        the ref. Use this to prevent such a ref deletion via a push.
 
+receive.denyDeleteCurrent::
+       If set to true, git-receive-pack will deny a ref update that
+       deletes the currently checked out branch of a non-bare repository.
+
 receive.denyCurrentBranch::
        If set to true or "refuse", git-receive-pack will deny a ref update
        to the currently checked out branch of a non-bare repository.
index 74741a42f409a7af5c60584a0d3b7a0be851811c..e22a62f06592c7d233fc06da022962cae59d105a 100644 (file)
@@ -10,7 +10,8 @@ SYNOPSIS
 [verse]
 'git add' [-n] [-v] [--force | -f] [--interactive | -i] [--patch | -p]
          [--edit | -e] [--all | [--update | -u]] [--intent-to-add | -N]
-         [--refresh] [--ignore-errors] [--] [<filepattern>...]
+         [--refresh] [--ignore-errors] [--ignore-missing] [--]
+         [<filepattern>...]
 
 DESCRIPTION
 -----------
@@ -57,7 +58,8 @@ OPTIONS
 
 -n::
 --dry-run::
-        Don't actually add the file(s), just show if they exist.
+       Don't actually add the file(s), just show if they exist and/or will
+       be ignored.
 
 -v::
 --verbose::
@@ -131,6 +133,12 @@ subdirectories.
        them, do not abort the operation, but continue adding the
        others. The command shall still exit with non-zero status.
 
+--ignore-missing::
+       This option can only be used together with --dry-run. By using
+       this option the user can check if any of the given files would
+       be ignored, no matter if they are already present in the work
+       tree or not.
+
 \--::
        This option can be used to separate command-line options from
        the list of files, (useful when filenames might be mistaken
index 3521637b582687978c088dc463e8784817a92217..bd919f2dfddc0165f7749e425a9b1d393558d46f 100644 (file)
@@ -106,8 +106,16 @@ OPTIONS
        with `-s` or `-u` options does not make any sense.
 
 -t::
-       Identify the file status with the following tags (followed by
-       a space) at the start of each line:
+       This feature is semi-deprecated. For scripting purpose,
+       linkgit:git-status[1] `--porcelain` and
+       linkgit:git-diff-files[1] `--name-status` are almost always
+       superior alternatives, and users should look at
+       linkgit:git-status[1] `--short` or linkgit:git-diff[1]
+       `--name-status` for more user-friendly alternatives.
++
+This option identifies the file status with the following tags (followed by
+a space) at the start of each line:
+
        H::     cached
        S::     skip-worktree
        M::     unmerged
index 55735faf7b58dfa56f7a7b93b5e0d7f19b98a808..e4ed0161467866f731c89eb48e64453051c64281 100644 (file)
@@ -72,6 +72,16 @@ success of the resolution after the custom tool has exited.
        This is the default behaviour; the option is provided to
        override any configuration settings.
 
+TEMPORARY FILES
+---------------
+`git mergetool` creates `*.orig` backup files while resolving merges.
+These are safe to remove once a file has been merged and its
+`git mergetool` session has completed.
+
+Setting the `mergetool.keepBackup` configuration variable to `false`
+causes `git mergetool` to automatically remove the backup as files
+are successfully merged.
+
 Author
 ------
 Written by Theodore Y Ts'o <tytso@mit.edu>
index b68abff28a0fe27fbcb2bbffa2296cffb1297eaf..658ff2ff67f23e9a9d2942e38528dba415139ac3 100644 (file)
@@ -200,16 +200,29 @@ summary::
        For a successfully pushed ref, the summary shows the old and new
        values of the ref in a form suitable for using as an argument to
        `git log` (this is `<old>..<new>` in most cases, and
-       `<old>...<new>` for forced non-fast-forward updates). For a
-       failed update, more details are given for the failure.
-       The string `rejected` indicates that git did not try to send the
-       ref at all (typically because it is not a fast-forward). The
-       string `remote rejected` indicates that the remote end refused
-       the update; this rejection is typically caused by a hook on the
-       remote side. The string `remote failure` indicates that the
-       remote end did not report the successful update of the ref
-       (perhaps because of a temporary error on the remote side, a
-       break in the network connection, or other transient error).
+       `<old>...<new>` for forced non-fast-forward updates).
++
+For a failed update, more details are given:
++
+--
+rejected::
+       Git did not try to send the ref at all, typically because it
+       is not a fast-forward and you did not force the update.
+
+remote rejected::
+       The remote end refused the update.  Usually caused by a hook
+       on the remote side, or because the remote repository has one
+       of the following safety options in effect:
+       `receive.denyCurrentBranch` (for pushes to the checked out
+       branch), `receive.denyNonFastForwards` (for forced
+       non-fast-forward updates), `receive.denyDeletes` or
+       `receive.denyDeleteCurrent`.  See linkgit:git-config[1].
+
+remote failure::
+       The remote end did not report the successful update of the ref,
+       perhaps because of a temporary error on the remote side, a
+       break in the network connection, or other transient error.
+--
 
 from::
        The name of the local ref being pushed, minus its
index f6037c4f6a7c6988a9a497455e555979d44e2600..2e78da448f30ad260cb7683a5610f424d0c5ffea 100644 (file)
@@ -412,6 +412,13 @@ turn `core.sparseCheckout` on in order to have sparse checkout
 support.
 
 
+BUGS
+----
+In order to match a directory with $GIT_DIR/info/sparse-checkout,
+trailing slash must be used. The form without trailing slash, while
+works with .gitignore, does not work with sparse checkout.
+
+
 SEE ALSO
 --------
 linkgit:git-write-tree[1]; linkgit:git-ls-files[1];
index 19335fddae2b706cd785258a8c02a5595c525667..400f61f6e24947525e51b7e5d808378819945205 100644 (file)
@@ -7,7 +7,7 @@ git-request-pull - Generates a summary of pending changes
 
 SYNOPSIS
 --------
-'git request-pull' <start> <url> [<end>]
+'git request-pull' [-p] <start> <url> [<end>]
 
 DESCRIPTION
 -----------
@@ -17,6 +17,9 @@ the given URL in the generated summary.
 
 OPTIONS
 -------
+-p::
+       Show patch text
+
 <start>::
        Commit to start at.
 
index 0727f431c6dc01296b04cc93204ba37d16b5a32b..be4c0533603443cd9b4df5bf732bbcdd31802a11 100644 (file)
@@ -184,10 +184,13 @@ scripts the same facilities C builtins have. It works as an option normalizer
 (e.g. splits single switches aggregate values), a bit like `getopt(1)` does.
 
 It takes on the standard input the specification of the options to parse and
-understand, and echoes on the standard output a line suitable for `sh(1)` `eval`
+understand, and echoes on the standard output a string suitable for `sh(1)` `eval`
 to replace the arguments with normalized ones.  In case of error, it outputs
 usage on the standard error stream, and exits with code 129.
 
+Note: Make sure you quote the result when passing it to `eval`.  See
+below for an example.
+
 Input Format
 ~~~~~~~~~~~~
 
@@ -244,7 +247,7 @@ bar=      some cool option --bar with an argument
   An option group Header
 C?        option C with an optional argument"
 
-eval `echo "$OPTS_SPEC" | git rev-parse --parseopt -- "$@" || echo exit $?`
+eval "$(echo "$OPTS_SPEC" | git rev-parse --parseopt -- "$@" || echo exit $?)"
 ------------
 
 SQ-QUOTE
index 76a832a3ac893111b2d17333e6bc99b7903b47a8..1ed331c599d4b492b0dec112332bb83db5506d74 100644 (file)
@@ -9,7 +9,7 @@ git-submodule - Initialize, update or inspect submodules
 SYNOPSIS
 --------
 [verse]
-'git submodule' [--quiet] add [-b branch]
+'git submodule' [--quiet] add [-b branch] [-f|--force]
              [--reference <repository>] [--] <repository> [<path>]
 'git submodule' [--quiet] status [--cached] [--recursive] [--] [<path>...]
 'git submodule' [--quiet] init [--] [<path>...]
@@ -95,10 +95,6 @@ is the superproject and submodule repositories will be kept
 together in the same relative location, and only the
 superproject's URL needs to be provided: git-submodule will correctly
 locate the submodule using the relative URL in .gitmodules.
-+
-The submodule will be added with "git add --force <path>". I.e. git
-doesn't care if the new path is in a `gitignore`. Your invocation of
-"git submodule add" is considered enough to override it.
 
 status::
        Show the status of the submodules. This will print the SHA-1 of the
@@ -187,6 +183,11 @@ OPTIONS
 --branch::
        Branch of repository to add as submodule.
 
+-f::
+--force::
+       This option is only valid for the add command.
+       Allow adding an otherwise ignored submodule path.
+
 --cached::
        This option is only valid for status and summary commands.  These
        commands typically use the commit found in the submodule HEAD, but
index 12066ab3fc2ba37c0a9eb291d40e1fb4a985714b..c28a7ecc4d0ac4e75b3cd430d642e67b1f9c4a35 100644 (file)
@@ -44,15 +44,23 @@ unreleased) version of git, that is available from 'master'
 branch of the `git.git` repository.
 Documentation for older releases are available here:
 
-* link:v1.7.1.1/git.html[documentation for release 1.7.1.1]
+* link:v1.7.2.1/git.html[documentation for release 1.7.2.1]
 
 * release notes for
+  link:RelNotes-1.7.2.1.txt[1.7.2.1],
+  link:RelNotes-1.7.2.txt[1.7.2].
+
+* link:v1.7.1.2/git.html[documentation for release 1.7.1.2]
+
+* release notes for
+  link:RelNotes-1.7.1.2.txt[1.7.1.2],
   link:RelNotes-1.7.1.1.txt[1.7.1.1],
   link:RelNotes-1.7.1.txt[1.7.1].
 
-* link:v1.7.0.6/git.html[documentation for release 1.7.0.6]
+* link:v1.7.0.7/git.html[documentation for release 1.7.0.7]
 
 * release notes for
+  link:RelNotes-1.7.0.7.txt[1.7.0.7],
   link:RelNotes-1.7.0.6.txt[1.7.0.6],
   link:RelNotes-1.7.0.5.txt[1.7.0.5],
   link:RelNotes-1.7.0.4.txt[1.7.0.4],
@@ -719,6 +727,13 @@ The documentation for git suite was started by David Greaves
 <david@dgreaves.com>, and later enhanced greatly by the
 contributors on the git-list <git@vger.kernel.org>.
 
+Reporting Bugs
+--------------
+
+Report bugs to the Git mailing list <git@vger.kernel.org> where the
+development and maintenance is primarily done.  You do not have to be
+subscribed to the list to send a message there.
+
 SEE ALSO
 --------
 linkgit:gittutorial[7], linkgit:gittutorial-2[7],
index e45513dee938dde3a8428a833fb43023b04ca95b..8228e883e6c5aba64ee4aa691b624b451f0b3946 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 GVF=GIT-VERSION-FILE
-DEF_VER=v1.7.1.GIT
+DEF_VER=v1.7.2.1
 
 LF='
 '
diff --git a/INSTALL b/INSTALL
index 61086ab1204a4304cb1d84eeea9d1649878ac9e1..59200b730ec00a63f981691f7fd37f2eacb11653 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -157,3 +157,36 @@ Issues of note:
    It has been reported that docbook-xsl version 1.72 and 1.73 are
    buggy; 1.72 misformats manual pages for callouts, and 1.73 needs
    the patch in contrib/patches/docbook-xsl-manpages-charmap.patch
+
+   Users attempting to build the documentation on Cygwin may need to ensure
+   that the /etc/xml/catalog file looks something like this:
+
+   <?xml version="1.0"?>
+   <!DOCTYPE catalog PUBLIC
+      "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN"
+      "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd"
+   >
+   <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
+     <rewriteURI
+       uriStartString = "http://docbook.sourceforge.net/release/xsl/current"
+       rewritePrefix = "/usr/share/sgml/docbook/xsl-stylesheets"
+     />
+     <rewriteURI
+       uriStartString="http://www.oasis-open.org/docbook/xml/4.5"
+       rewritePrefix="/usr/share/sgml/docbook/xml-dtd-4.5"
+     />
+  </catalog>
+
+  This can be achieved with the following two xmlcatalog commands:
+
+  xmlcatalog --noout \
+     --add rewriteURI \
+        http://docbook.sourceforge.net/release/xsl/current \
+        /usr/share/sgml/docbook/xsl-stylesheets \
+     /etc/xml/catalog
+
+  xmlcatalog --noout \
+     --add rewriteURI \
+         http://www.oasis-open.org/docbook/xml/4.5/xsl/current \
+         /usr/share/sgml/docbook/xml-dtd-4.5 \
+     /etc/xml/catalog
index bc3c57058faba66f6a7a947e1e9642f47053b5bb..f33648da013237db8ab7ab7e13e37060ae2bdb25 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -2254,6 +2254,7 @@ check-docs::
                documented,gitglossary | \
                documented,githooks | \
                documented,gitrepository-layout | \
+               documented,gitrevisions | \
                documented,gittutorial | \
                documented,gittutorial-2 | \
                documented,git-bisect-lk2009 | \
index 3da01a5622c0b6c581a701dbb5421fb84e87df80..a479abbc60611a95d75a33b092a322cb5fa2832c 120000 (symlink)
--- a/RelNotes
+++ b/RelNotes
@@ -1 +1 @@
-Documentation/RelNotes-1.7.2.txt
\ No newline at end of file
+Documentation/RelNotes-1.7.2.1.txt
\ No newline at end of file
index 17149cfeedcc39956dc55f8b72acc1227fed5213..56a4e0af6b35ea9f6d86accad27a1c87bc5ad0d9 100644 (file)
@@ -310,7 +310,7 @@ static const char ignore_error[] =
 "The following paths are ignored by one of your .gitignore files:\n";
 
 static int verbose = 0, show_only = 0, ignored_too = 0, refresh_only = 0;
-static int ignore_add_errors, addremove, intent_to_add;
+static int ignore_add_errors, addremove, intent_to_add, ignore_missing = 0;
 
 static struct option builtin_add_options[] = {
        OPT__DRY_RUN(&show_only),
@@ -325,6 +325,7 @@ static struct option builtin_add_options[] = {
        OPT_BOOLEAN('A', "all", &addremove, "add all, noticing removal of tracked files"),
        OPT_BOOLEAN( 0 , "refresh", &refresh_only, "don't add, only refresh the index"),
        OPT_BOOLEAN( 0 , "ignore-errors", &ignore_add_errors, "just skip files which cannot be added because of errors"),
+       OPT_BOOLEAN( 0 , "ignore-missing", &ignore_missing, "check if - even missing - files are ignored in dry run"),
        OPT_END(),
 };
 
@@ -385,6 +386,8 @@ int cmd_add(int argc, const char **argv, const char *prefix)
 
        if (addremove && take_worktree_changes)
                die("-A and -u are mutually incompatible");
+       if (!show_only && ignore_missing)
+               die("Option --ignore-missing can only be used together with --dry-run");
        if ((addremove || take_worktree_changes) && !argc) {
                static const char *here[2] = { ".", NULL };
                argc = 1;
@@ -441,9 +444,14 @@ int cmd_add(int argc, const char **argv, const char *prefix)
                        seen = find_used_pathspec(pathspec);
                for (i = 0; pathspec[i]; i++) {
                        if (!seen[i] && pathspec[i][0]
-                           && !file_exists(pathspec[i]))
-                               die("pathspec '%s' did not match any files",
-                                   pathspec[i]);
+                           && !file_exists(pathspec[i])) {
+                               if (ignore_missing) {
+                                       if (excluded(&dir, pathspec[i], DT_UNKNOWN))
+                                               dir_add_ignored(&dir, pathspec[i], strlen(pathspec[i]));
+                               } else
+                                       die("pathspec '%s' did not match any files",
+                                           pathspec[i]);
+                       }
                }
                free(seen);
        }
index a78dbd83bf04c7080487b8508321d79d848e9b1f..2bb30c0e80f8948b28599da06c94c8c66b5733c7 100644 (file)
@@ -147,7 +147,7 @@ static struct option builtin_commit_options[] = {
                    "terminate entries with NUL"),
        OPT_BOOLEAN(0, "amend", &amend, "amend previous commit"),
        OPT_BOOLEAN(0, "no-post-rewrite", &no_post_rewrite, "bypass post-rewrite hook"),
-       { OPTION_STRING, 'u', "untracked-files", &untracked_files_arg, "mode", "show untracked files, optional modes: all, normal, no. (Default: all)", PARSE_OPT_OPTARG, NULL, (intptr_t)"all" },
+       { OPTION_STRING, 'u', "untracked-files", &untracked_files_arg, "mode", "show untracked files, optional modes: all, normal, no (Default: all)", PARSE_OPT_OPTARG, NULL, (intptr_t)"all" },
        /* end commit contents options */
 
        { OPTION_BOOLEAN, 0, "allow-empty", &allow_empty, NULL,
index bb128631a919aa93bea31d7d6cb5e811427844f3..89ae89cde1e6d8a0a2e02209f5396263a81bda5b 100644 (file)
@@ -408,19 +408,6 @@ int cmd_diff(int argc, const char **argv, const char *prefix)
        else if (ents == 2)
                result = builtin_diff_tree(&rev, argc, argv, ent);
        else if (ent[0].item->flags & UNINTERESTING) {
-               /*
-                * Perhaps the user gave us A...B, which expands
-                * to a list of negative merge bases followed by
-                * A (symmetric-left) and B?  Let's make sure...
-                */
-               for (i = 1; i < ents; i++)
-                       if (!(ent[i].item->flags & UNINTERESTING))
-                               break;
-               if (ents != i + 2 ||
-                   (ent[i+1].item->flags & UNINTERESTING) ||
-                   (!(ent[i].item->flags & SYMMETRIC_LEFT)) ||
-                   (ent[i+1].item->flags & SYMMETRIC_LEFT))
-                       die("what do you mean by that?");
                /*
                 * diff A...B where there is at least one merge base
                 * between A and B.  We have ent[0] == merge-base,
index 6eb1dfea092e2873c5910bf4389d3b071786d8b0..1b67f5fda55896635e91852657259b47e722c889 100644 (file)
@@ -845,7 +845,8 @@ static int fetch_one(struct remote *remote, int argc, const char **argv)
        int exit_code;
 
        if (!remote)
-               die("Where do you want to fetch from today?");
+               die("No remote repository specified.  Please, specify either a URL or a\n"
+                   "remote name from which new revisions should be fetched.");
 
        transport = transport_get(remote, NULL);
        transport_set_verbosity(transport, verbosity, progress);
index a9836b00aec8df68e7a615dce83d3c60f73e242f..61ff79839bc4778451425d0ae1cfd199247954a1 100644 (file)
@@ -120,7 +120,7 @@ static void exec_woman_emacs(const char *path, const char *page)
                if (!path)
                        path = "emacsclient";
                strbuf_addf(&man_page, "(woman \"%s\")", page);
-               execlp(path, "emacsclient", "-e", man_page.buf, NULL);
+               execlp(path, "emacsclient", "-e", man_page.buf, (char *)NULL);
                warning("failed to exec '%s': %s", path, strerror(errno));
        }
 }
@@ -148,7 +148,7 @@ static void exec_man_konqueror(const char *path, const char *page)
                } else
                        path = "kfmclient";
                strbuf_addf(&man_page, "man:%s(1)", page);
-               execlp(path, filename, "newTab", man_page.buf, NULL);
+               execlp(path, filename, "newTab", man_page.buf, (char *)NULL);
                warning("failed to exec '%s': %s", path, strerror(errno));
        }
 }
@@ -157,7 +157,7 @@ static void exec_man_man(const char *path, const char *page)
 {
        if (!path)
                path = "man";
-       execlp(path, "man", page, NULL);
+       execlp(path, "man", page, (char *)NULL);
        warning("failed to exec '%s': %s", path, strerror(errno));
 }
 
@@ -165,7 +165,7 @@ static void exec_man_cmd(const char *cmd, const char *page)
 {
        struct strbuf shell_cmd = STRBUF_INIT;
        strbuf_addf(&shell_cmd, "%s %s", cmd, page);
-       execl("/bin/sh", "sh", "-c", shell_cmd.buf, NULL);
+       execl("/bin/sh", "sh", "-c", shell_cmd.buf, (char *)NULL);
        warning("failed to exec '%s': %s", cmd, strerror(errno));
 }
 
@@ -372,7 +372,7 @@ static void show_info_page(const char *git_cmd)
 {
        const char *page = cmd_to_page(git_cmd);
        setenv("INFOPATH", system_path(GIT_INFO_PATH), 1);
-       execlp("info", "info", "gitman", page, NULL);
+       execlp("info", "info", "gitman", page, (char *)NULL);
        die("no info viewer handled the request");
 }
 
@@ -398,7 +398,7 @@ static void get_html_page_path(struct strbuf *page_path, const char *page)
 #ifndef open_html
 static void open_html(const char *path)
 {
-       execl_git_cmd("web--browse", "-c", "help.browser", path, NULL);
+       execl_git_cmd("web--browse", "-c", "help.browser", path, (char *)NULL);
 }
 #endif
 
diff --git a/dir.c b/dir.c
index 151ea670d961d39394990f122469557b6f217de3..133f472a1e73786e781c1021eea17e543858937f 100644 (file)
--- a/dir.c
+++ b/dir.c
@@ -453,7 +453,7 @@ static struct dir_entry *dir_add_name(struct dir_struct *dir, const char *pathna
        return dir->entries[dir->nr++] = dir_entry_new(pathname, len);
 }
 
-static struct dir_entry *dir_add_ignored(struct dir_struct *dir, const char *pathname, int len)
+struct dir_entry *dir_add_ignored(struct dir_struct *dir, const char *pathname, int len)
 {
        if (!cache_name_is_other(pathname, len))
                return NULL;
diff --git a/dir.h b/dir.h
index 3bead5f0e25a864c34f515b7bff4c89b55ce84fe..278d84cdf7df01c33a45e6dc9c20592cecff9d85 100644 (file)
--- a/dir.h
+++ b/dir.h
@@ -72,6 +72,7 @@ extern int read_directory(struct dir_struct *, const char *path, int len, const
 extern int excluded_from_list(const char *pathname, int pathlen, const char *basename,
                              int *dtype, struct exclude_list *el);
 extern int excluded(struct dir_struct *, const char *, int *);
+struct dir_entry *dir_add_ignored(struct dir_struct *dir, const char *pathname, int len);
 extern int add_excludes_from_file_to_list(const char *fname, const char *base, int baselen,
                                          char **buf_p, struct exclude_list *which, int check_index);
 extern void add_excludes_from_file(struct dir_struct *, const char *fname);
index 7d5451198cb109e1d3e30e3e33f1557bbd8b12c0..bb104895a94450a2ade7446c8fda52910bae0868 100755 (executable)
@@ -38,7 +38,7 @@ if {[catch {package require Tcl 8.4} err]
        tk_messageBox \
                -icon error \
                -type ok \
-               -title [mc "git-gui: fatal error"] \
+               -title "git-gui: fatal error" \
                -message $err
        exit 1
 }
@@ -269,6 +269,17 @@ proc is_config_true {name} {
        }
 }
 
+proc is_config_false {name} {
+       global repo_config
+       if {[catch {set v $repo_config($name)}]} {
+               return 0
+       } elseif {$v eq {false} || $v eq {0} || $v eq {no}} {
+               return 1
+       } else {
+               return 0
+       }
+}
+
 proc get_config {name} {
        global repo_config
        if {[catch {set v $repo_config($name)}]} {
@@ -323,6 +334,8 @@ proc _trace_exec {cmd} {
        puts stderr $d
 }
 
+#'"  fix poor old emacs font-lock mode
+
 proc _git_cmd {name} {
        global _git_cmd_path
 
@@ -416,6 +429,9 @@ proc _lappend_nice {cmd_var} {
 
        if {![info exists _nice]} {
                set _nice [_which nice]
+               if {[catch {exec $_nice git version}]} {
+                       set _nice {}
+               }
        }
        if {$_nice ne {}} {
                lappend cmd $_nice
@@ -634,6 +650,7 @@ proc rmsel_tag {text} {
        return $text
 }
 
+wm withdraw .
 set root_exists 0
 bind . <Visibility> {
        bind . <Visibility> {}
@@ -782,6 +799,7 @@ set default_config(user.email) {}
 
 set default_config(gui.encoding) [encoding system]
 set default_config(gui.matchtrackingbranch) false
+set default_config(gui.textconv) true
 set default_config(gui.pruneduringfetch) false
 set default_config(gui.trustmtime) false
 set default_config(gui.fastcopyblame) false
@@ -1155,6 +1173,9 @@ apply_config
 # try to set work tree from environment, falling back to core.worktree
 if {[catch { set _gitworktree $env(GIT_WORK_TREE) }]} {
        set _gitworktree [get_config core.worktree]
+       if {$_gitworktree eq ""} {
+               set _gitworktree [file dirname [file normalize $_gitdir]]
+       }
 }
 if {$_prefix ne {}} {
        if {$_gitworktree eq {}} {
@@ -2098,7 +2119,7 @@ proc do_explore {} {
                # freedesktop.org-conforming system is our best shot
                set explorer "xdg-open"
        }
-       eval exec $explorer $_gitworktree &
+       eval exec $explorer [list [file nativename $_gitworktree]] &
 }
 
 set is_quitting 0
@@ -2901,6 +2922,7 @@ blame {
                set current_branch $head
        }
 
+       wm deiconify .
        switch -- $subcommand {
        browser {
                if {$jump_spec ne {}} usage
@@ -3405,6 +3427,19 @@ lappend diff_actions [list $ctxmsm entryconf [$ctxmsm index last] -state]
 $ctxmsm add separator
 create_common_diff_popup $ctxmsm
 
+proc has_textconv {path} {
+       if {[is_config_false gui.textconv]} {
+               return 0
+       }
+       set filter [gitattr $path diff set]
+       set textconv [get_config [join [list diff $filter textconv] .]]
+       if {$filter ne {set} && $textconv ne {}} {
+               return 1
+       } else {
+               return 0
+       }
+}
+
 proc popup_diff_menu {ctxm ctxmmg ctxmsm x y X Y} {
        global current_diff_path file_states
        set ::cursorX $x
@@ -3440,7 +3475,8 @@ proc popup_diff_menu {ctxm ctxmmg ctxmsm x y X Y} {
                        || {__} eq $state
                        || {_O} eq $state
                        || {_T} eq $state
-                       || {T_} eq $state} {
+                       || {T_} eq $state
+                       || [has_textconv $current_diff_path]} {
                        set s disabled
                } else {
                        set s normal
@@ -3460,29 +3496,44 @@ $main_status show [mc "Initializing..."]
 
 # -- Load geometry
 #
-catch {
-set gm $repo_config(gui.geometry)
-wm geometry . [lindex $gm 0]
-if {$use_ttk} {
-       .vpane sashpos 0 [lindex $gm 1]
-       .vpane.files sashpos 0 [lindex $gm 2]
-} else {
-       .vpane sash place 0 \
-               [lindex $gm 1] \
-               [lindex [.vpane sash coord 0] 1]
-       .vpane.files sash place 0 \
-               [lindex [.vpane.files sash coord 0] 0] \
-               [lindex $gm 2]
+proc on_ttk_pane_mapped {w pane pos} {
+       bind $w <Map> {}
+       after 0 [list after idle [list $w sashpos $pane $pos]]
+}
+proc on_tk_pane_mapped {w pane x y} {
+       bind $w <Map> {}
+       after 0 [list after idle [list $w sash place $pane $x $y]]
+}
+proc on_application_mapped {} {
+       global repo_config use_ttk
+       bind . <Map> {}
+       set gm $repo_config(gui.geometry)
+       if {$use_ttk} {
+               bind .vpane <Map> \
+                   [list on_ttk_pane_mapped %W 0 [lindex $gm 1]]
+               bind .vpane.files <Map> \
+                   [list on_ttk_pane_mapped %W 0 [lindex $gm 2]]
+       } else {
+               bind .vpane <Map> \
+                   [list on_tk_pane_mapped %W 0 \
+                        [lindex $gm 1] \
+                        [lindex [.vpane sash coord 0] 1]]
+               bind .vpane.files <Map> \
+                   [list on_tk_pane_mapped %W 0 \
+                        [lindex [.vpane.files sash coord 0] 0] \
+                        [lindex $gm 2]]
+       }
+       wm geometry . [lindex $gm 0]
 }
-unset gm
+if {[info exists repo_config(gui.geometry)]} {
+       bind . <Map> [list on_application_mapped]
+       wm geometry . [lindex $repo_config(gui.geometry) 0]
 }
 
 # -- Load window state
 #
-catch {
-set gws $repo_config(gui.wmstate)
-wm state . $gws
-unset gws
+if {[info exists repo_config(gui.wmstate)]} {
+       catch {wm state . $repo_config(gui.wmstate)}
 }
 
 # -- Key Bindings
index 786b50b8c2b6f877d1d1a3a86d27368281ec2ae8..2137ec9684d0acdb386e6b50e1b41aa7705c9746 100644 (file)
@@ -449,11 +449,28 @@ method _load {jump} {
 
        $status show [mc "Reading %s..." "$commit:[escape_path $path]"]
        $w_path conf -text [escape_path $path]
+
+       set do_textconv 0
+       if {![is_config_false gui.textconv] && [git-version >= 1.7.2]} {
+               set filter [gitattr $path diff set]
+               set textconv [get_config [join [list diff $filter textconv] .]]
+               if {$filter ne {set} && $textconv ne {}} {
+                       set do_textconv 1
+               }
+       }
        if {$commit eq {}} {
-               set fd [open $path r]
+               if {$do_textconv ne 0} {
+                       set fd [open |[list $textconv $path] r]
+               } else {
+                       set fd [open $path r]
+               }
                fconfigure $fd -eofchar {}
        } else {
-               set fd [git_read cat-file blob "$commit:$path"]
+               if {$do_textconv ne 0} {
+                       set fd [git_read cat-file --textconv "$commit:$path"]
+               } else {
+                       set fd [git_read cat-file blob "$commit:$path"]
+               }
        }
        fconfigure $fd \
                -blocking 0 \
index 64f06748b612721143e851824e30987575010be2..fae119286d3d4511d1b362fb05a8fab775e80a40 100644 (file)
@@ -100,12 +100,17 @@ constructor pick {} {
        $opts insert end [mc "Clone Existing Repository"] link_clone
        $opts insert end "\n"
        if {$m_repo ne {}} {
+               if {[tk windowingsystem] eq "win32"} {
+                       set key L
+               } else {
+                       set key C
+               }
                $m_repo add command \
                        -command [cb _next clone] \
-                       -accelerator $M1T-C \
+                       -accelerator $M1T-$key \
                        -label [mc "Clone..."]
-               bind $top <$M1B-c> [cb _next clone]
-               bind $top <$M1B-C> [cb _next clone]
+               bind $top <$M1B-[string tolower $key]> [cb _next clone]
+               bind $top <$M1B-[string toupper $key]> [cb _next clone]
        }
 
        $opts tag conf link_open -foreground blue -underline 1
index ec8c11eeb7912e2e49e48f467ffc27fd9fc5f919..c628750276303fca620c9292463c4c59690c764f 100644 (file)
@@ -55,7 +55,7 @@ proc handle_empty_diff {} {
 
        set path $current_diff_path
        set s $file_states($path)
-       if {[lindex $s 0] ne {_M}} return
+       if {[lindex $s 0] ne {_M} || [has_textconv $path]} return
 
        # Prevent infinite rescan loops
        incr diff_empty_count
@@ -280,6 +280,9 @@ proc start_show_diff {cont_info {add_opts {}}} {
                        lappend cmd diff-files
                }
        }
+       if {![is_config_false gui.textconv] && [git-version >= 1.6.1]} {
+               lappend cmd --textconv
+       }
 
        if {[string match {160000 *} [lindex $s 2]]
         || [string match {160000 *} [lindex $s 3]]} {
index d4c5e45c8a7ade900753cb7eb5caf977e6e4ae2a..3807c8d28324a277204db9191e99ddb856041c22 100644 (file)
@@ -148,6 +148,7 @@ proc do_options {} {
                {b gui.trustmtime  {mc "Trust File Modification Timestamps"}}
                {b gui.pruneduringfetch {mc "Prune Tracking Branches During Fetch"}}
                {b gui.matchtrackingbranch {mc "Match Tracking Branches"}}
+               {b gui.textconv {mc "Use Textconv For Diffs and Blames"}}
                {b gui.fastcopyblame {mc "Blame Copy Only On Changed Files"}}
                {i-20..200 gui.copyblamethreshold {mc "Minimum Letters To Blame Copy On"}}
                {i-0..300 gui.blamehistoryctx {mc "Blame History Context Radius (days)"}}
index 79c1888e11d210eed962eebdf67793a7367dff5a..78878ef89d11210d614fc8b3d2957705611bdaa3 100644 (file)
@@ -16,7 +16,7 @@ proc do_windows_shortcut {} {
                                        [info nameofexecutable] \
                                        [file normalize $::argv0] \
                                        ] \
-                                       [file normalize [$_gitworktree]]
+                                       [file normalize $_gitworktree]
                        } err]} {
                        error_popup [strcat [mc "Cannot write shortcut:"] "\n\n$err"]
                }
@@ -57,7 +57,7 @@ proc do_cygwin_shortcut {} {
                                        $sh -c \
                                        "CHERE_INVOKING=1 source /etc/profile;[sq $me] &" \
                                        ] \
-                                       [file normalize [$_gitworktree]]
+                                       [file normalize $_gitworktree]
                        } err]} {
                        error_popup [strcat [mc "Cannot write shortcut:"] "\n\n$err"]
                }
index 5fe3aad382f43a30a099a106f7d51f136eda0652..95cb44991fc5b018805d6091c4f98ce7ae0ccf52 100644 (file)
@@ -39,6 +39,7 @@ method _oneline_pack {} {
 }
 
 constructor two_line {path} {
+       global NS
        set w $path
        set w_l $w.l
        set w_c $w.c
index d7f93d045d1a2b3a14d2fdb4907697622b5973a8..db91ab84a56d79be6a5497f885a9181f368b9cf2 100644 (file)
@@ -18,9 +18,9 @@ proc win32_create_lnk {lnk_path lnk_exec lnk_dir} {
        eval [list exec wscript.exe \
                /E:jscript \
                /nologo \
-               [file join $oguilib win32_shortcut.js] \
+               [file nativename [file join $oguilib win32_shortcut.js]] \
                $lnk_path \
-               [file join $oguilib git-gui.ico] \
+               [file nativename [file join $oguilib git-gui.ico]] \
                $lnk_dir \
                $lnk_exec] $lnk_args
 }
index 66bbb2f8faaf83bc87819a9e288a0592f400e147..b1845c505500a0f079b2299de07d481c6b2550c4 100644 (file)
@@ -13,10 +13,11 @@ if { $argc >=2 && [lindex $argv 0] == "--working-dir" } {
        incr argc -2
 }
 
-set bindir [file dirname \
+set basedir [file dirname \
             [file dirname \
              [file dirname [info script]]]]
-set bindir [file join $bindir bin]
+set bindir [file join $basedir bin]
+set bindir "$bindir;[file join $basedir mingw bin]"
 regsub -all ";" $bindir "\\;" bindir
 set env(PATH) "$bindir;$env(PATH)"
 unset bindir
index 6635fbefdf2a06e556716f91a70181ecf4f3252a..b7342e22c88993756e7beb6582a896087e52a034 100755 (executable)
@@ -43,7 +43,8 @@ test -z "$port" && port=1234
 
 resolve_full_httpd () {
        case "$httpd" in
-       *apache2*|*lighttpd*)
+       *apache2*|*lighttpd*|*httpd*)
+               # yes, *httpd* covers *lighttpd* above, but it is there for clarity
                # ensure that the apache2/lighttpd command ends with "-f"
                if ! echo "$httpd" | sane_grep -- '-f *$' >/dev/null 2>&1
                then
@@ -300,7 +301,13 @@ EOF
 }
 
 apache2_conf () {
-       test -z "$module_path" && module_path=/usr/lib/apache2/modules
+       if test -z "$module_path"
+       then
+               test -d "/usr/lib/httpd/modules" &&
+                       module_path="/usr/lib/httpd/modules"
+               test -d "/usr/lib/apache2/modules" &&
+                       module_path="/usr/lib/apache2/modules"
+       fi
        bind=
        test x"$local" = xtrue && bind='127.0.0.1:'
        echo 'text/css css' > "$fqgitdir/mime.types"
@@ -314,8 +321,10 @@ PidFile "$fqgitdir/pid"
 Listen $bind$port
 EOF
 
-       for mod in mime dir; do
-               if test -e $module_path/mod_${mod}.so; then
+       for mod in mime dir env log_config
+       do
+               if test -e $module_path/mod_${mod}.so
+               then
                        echo "LoadModule ${mod}_module " \
                             "$module_path/mod_${mod}.so" >> "$conf"
                fi
@@ -334,7 +343,7 @@ EOF
                cat >> "$conf" <<EOF
 LoadModule perl_module $module_path/mod_perl.so
 PerlPassEnv GIT_DIR
-PerlPassEnv GIT_EXEC_DIR
+PerlPassEnv GIT_EXEC_PATH
 PerlPassEnv GITWEB_CONFIG
 <Location /gitweb.cgi>
        SetHandler perl-script
@@ -364,6 +373,9 @@ EOF
                        echo "ScriptSock logs/gitweb.sock" >> "$conf"
                fi
                cat >> "$conf" <<EOF
+PassEnv GIT_DIR
+PassEnv GIT_EXEC_PATH
+PassEnv GITWEB_CONFIG
 AddHandler cgi-script .cgi
 <Location /gitweb.cgi>
        Options +ExecCGI
@@ -560,7 +572,7 @@ case "$httpd" in
 *lighttpd*)
        lighttpd_conf
        ;;
-*apache2*)
+*apache2*|*httpd*)
        apache2_conf
        ;;
 webrick)
index 31e68603f4e8124fd67f42c8aae6033a792892cb..b94c2a03867ddcd1fa0c2051f81cf14547b550f0 100755 (executable)
@@ -119,7 +119,7 @@ run 'git rebase --continue'"
 export GIT_CHERRY_PICK_HELP
 
 warn () {
-       echo "$*" >&2
+       printf '%s\n' "$*" >&2
 }
 
 output () {
@@ -606,7 +606,7 @@ skip_unnecessary_picks () {
                        fd=1
                        ;;
                esac
-               echo "$command${sha1:+ }$sha1${rest:+ }$rest" >&$fd
+               printf '%s\n' "$command${sha1:+ }$sha1${rest:+ }$rest" >&$fd
        done <"$TODO" >"$TODO.new" 3>>"$DONE" &&
        mv -f "$TODO".new "$TODO" &&
        case "$(peek_next_command)" in
@@ -649,12 +649,12 @@ rearrange_squash () {
                case " $used" in
                *" $sha1 "*) continue ;;
                esac
-               echo "$pick $sha1 $message"
+               printf '%s\n' "$pick $sha1 $message"
                while read -r squash action msg
                do
                        case "$message" in
                        "$msg"*)
-                               echo "$action $squash $action! $msg"
+                               printf '%s\n' "$action $squash $action! $msg"
                                used="$used$squash "
                                ;;
                        esac
@@ -895,7 +895,7 @@ first and then run 'git rebase --continue' again."
                do
                        if test t != "$PRESERVE_MERGES"
                        then
-                               echo "pick $shortsha1 $rest" >> "$TODO"
+                               printf '%s\n' "pick $shortsha1 $rest" >> "$TODO"
                        else
                                sha1=$(git rev-parse $shortsha1)
                                if test -z "$REBASE_ROOT"
@@ -914,7 +914,7 @@ first and then run 'git rebase --continue' again."
                                if test f = "$preserve"
                                then
                                        touch "$REWRITTEN"/$sha1
-                                       echo "pick $shortsha1 $rest" >> "$TODO"
+                                       printf '%s\n' "pick $shortsha1 $rest" >> "$TODO"
                                fi
                        fi
                done
index ab4afa7dee377707484e7f76c7d44ac955f09397..2d88742cecc5037b945b5e01fba0674177ab6a74 100755 (executable)
@@ -208,6 +208,7 @@ do
                test -d "$dotest" -o -d "$GIT_DIR"/rebase-apply ||
                        die "No rebase in progress?"
 
+               git update-index --ignore-submodules --refresh &&
                git diff-files --quiet --ignore-submodules || {
                        echo "You must edit all merge conflicts and then"
                        echo "mark them as resolved using git add"
index ad2417d1b0827b80ec884009447adada0ddb8173..170186f4946859e04d6a0b4ce248dd17bc877b31 100755 (executable)
@@ -5,7 +5,7 @@
 # Copyright (c) 2007 Lars Hjemli
 
 dashless=$(basename "$0" | sed -e 's/-/ /')
-USAGE="[--quiet] add [-b branch] [--reference <repository>] [--] <repository> [<path>]
+USAGE="[--quiet] add [-b branch] [-f|--force] [--reference <repository>] [--] <repository> [<path>]
    or: $dashless [--quiet] status [--cached] [--recursive] [--] [<path>...]
    or: $dashless [--quiet] init [--] [<path>...]
    or: $dashless [--quiet] update [--init] [-N|--no-fetch] [--rebase] [--reference <repository>] [--merge] [--recursive] [--] [<path>...]
@@ -19,6 +19,7 @@ require_work_tree
 
 command=
 branch=
+force=
 reference=
 cached=
 recursive=
@@ -133,6 +134,9 @@ cmd_add()
                        branch=$2
                        shift
                        ;;
+               -f | --force)
+                       force=$1
+                       ;;
                -q|--quiet)
                        GIT_QUIET=1
                        ;;
@@ -201,6 +205,14 @@ cmd_add()
        git ls-files --error-unmatch "$path" > /dev/null 2>&1 &&
        die "'$path' already exists in the index"
 
+       if test -z "$force" && ! git add --dry-run --ignore-missing "$path" > /dev/null 2>&1
+       then
+               echo >&2 "The following path is ignored by one of your .gitignore files:" &&
+               echo >&2 $path &&
+               echo >&2 "Use -f if you really want to add it."
+               exit 1
+       fi
+
        # perhaps the path exists and is already a git repo, else clone it
        if test -e "$path"
        then
@@ -234,7 +246,7 @@ cmd_add()
                ) || die "Unable to checkout submodule '$path'"
        fi
 
-       git add --force "$path" ||
+       git add $force "$path" ||
        die "Failed to add submodule '$path'"
 
        git config -f .gitmodules submodule."$path".path "$path" &&
index 19d6848d0e7754b9afb9fdbbac6fce31286468a5..c4163584a93ba594141aa8af99948fc8929605d7 100755 (executable)
@@ -3169,6 +3169,22 @@ sub has_no_changes {
                        LIST_CACHE => 'FAULT',
                ;
        }
+
+       sub unmemoize_svn_mergeinfo_functions {
+               return if not $memoized;
+               $memoized = 0;
+
+               Memoize::unmemoize 'lookup_svn_merge';
+               Memoize::unmemoize 'check_cherry_pick';
+               Memoize::unmemoize 'has_no_changes';
+       }
+}
+
+END {
+       # Force cache writeout explicitly instead of waiting for
+       # global destruction to avoid segfault in Storable:
+       # http://rt.cpan.org/Public/Bug/Display.html?id=36087
+       unmemoize_svn_mergeinfo_functions();
 }
 
 sub parents_exclude {
index dbded76aaf5499dd116e5ad22f95d4518b79c0d8..3fc4166b25714911b6b1294c7439da1e237e4918 100755 (executable)
@@ -31,7 +31,7 @@ valid_custom_tool()
 
 valid_tool() {
        case "$1" in
-               firefox | iceweasel | chrome | chromium | konqueror | w3m | links | lynx | dillo | open | start)
+               firefox | iceweasel | chrome | google-chrome | chromium | konqueror | w3m | links | lynx | dillo | open | start)
                        ;; # happy
                *)
                        valid_custom_tool "$1" || return 1
@@ -103,7 +103,7 @@ fi
 
 if test -z "$browser" ; then
     if test -n "$DISPLAY"; then
-       browser_candidates="firefox iceweasel chrome chromium konqueror w3m links lynx dillo"
+       browser_candidates="firefox iceweasel google-chrome chrome chromium konqueror w3m links lynx dillo"
        if test "$KDE_FULL_SESSION" = "true"; then
            browser_candidates="konqueror $browser_candidates"
        fi
@@ -146,7 +146,7 @@ case "$browser" in
        test "$vers" -lt 2 && NEWTAB=''
        "$browser_path" $NEWTAB "$@" &
        ;;
-    chrome|chromium)
+    google-chrome|chrome|chromium)
        # Actual command for chromium is chromium-browser.
        # No need to specify newTab. It's default in chromium
        eval "$browser_path" "$@" &
diff --git a/git.c b/git.c
index 17538117a5ccfd48129a873697d8674e86f512f5..f37028b3b722e6203ae8dac1ccf40a94421597d2 100644 (file)
--- a/git.c
+++ b/git.c
@@ -8,8 +8,8 @@ const char git_usage_string[] =
        "git [--version] [--exec-path[=GIT_EXEC_PATH]] [--html-path]\n"
        "           [-p|--paginate|--no-pager] [--no-replace-objects]\n"
        "           [--bare] [--git-dir=GIT_DIR] [--work-tree=GIT_WORK_TREE]\n"
-       "           [-c name=value\n"
-       "           [--help] COMMAND [ARGS]";
+       "           [-c name=value] [--help]\n"
+       "           COMMAND [ARGS]";
 
 const char git_more_info_string[] =
        "See 'git help COMMAND' for more information on a specific command.";
diff --git a/path.c b/path.c
index b4c8d917229a4187f36a76f43603fc036e65632e..6b23023095d7e1a5cfc1aef8db6d6e5fb56b32de 100644 (file)
--- a/path.c
+++ b/path.c
@@ -316,6 +316,8 @@ char *expand_user_path(const char *path)
                size_t username_len = first_slash - username;
                if (username_len == 0) {
                        const char *home = getenv("HOME");
+                       if (!home)
+                               goto return_null;
                        strbuf_add(&user_path, home, strlen(home));
                } else {
                        struct passwd *pw = getpw_str(username, username_len);
index 4098ca2b5c166c32cfe4aea9d1bff2e6593e9a60..9ec744e9f2da294a21ac02b46f0ea0b35889ae54 100644 (file)
@@ -113,11 +113,8 @@ static int read_pack_info_file(const char *infofile)
                                goto out_stale;
                        break;
                case 'D': /* we used to emit D but that was misguided. */
-                       goto out_stale;
-                       break;
                case 'T': /* we used to emit T but nobody uses it. */
                        goto out_stale;
-                       break;
                default:
                        error("unrecognized: %s", line);
                        break;
diff --git a/setup.c b/setup.c
index 87c21f02e0e3bedb42305bbfe2b4223885d4250f..276916052795c5ffa872b57a7e6723edc71dfdc4 100644 (file)
--- a/setup.c
+++ b/setup.c
@@ -170,6 +170,8 @@ static int is_git_directory(const char *suspect)
        char path[PATH_MAX];
        size_t len = strlen(suspect);
 
+       if (PATH_MAX <= len + strlen("/objects"))
+               die("Too long path: %.*s", 60, suspect);
        strcpy(path, suspect);
        if (getenv(DB_ENVIRONMENT)) {
                if (access(getenv(DB_ENVIRONMENT), X_OK))
index f9de24b4d2baa9fad1d6caa72fea651da78d6878..cf5f9e2e1eb17c442220464d06374e6c529f8629 100644 (file)
@@ -36,7 +36,7 @@ aggregate-results-and-cleanup: $(T)
        $(MAKE) clean
 
 aggregate-results:
-       for f in test-results/t*-*; do \
+       for f in test-results/t*-*.counts; do \
                echo "$$f"; \
        done | '$(SHELL_PATH_SQ)' ./aggregate-results.sh
 
index b906ceb4766a283ae6b22bd037f9e1619feb12d1..0d1183c3e69904e9e3543d757f14f10c629e199b 100644 (file)
--- a/t/README
+++ b/t/README
@@ -259,11 +259,11 @@ Do:
        test ...
 
    That way all of the commands in your tests will succeed or fail. If
-   you must ignore the return value of something (e.g. the return
-   value of export is unportable) it's best to indicate so explicitly
-   with a semicolon:
+   you must ignore the return value of something (e.g., the return
+   after unsetting a variable that was already unset is unportable) it's
+   best to indicate so explicitly with a semicolon:
 
-       export HLAGH;
+       unset HLAGH;
        git merge hla &&
        git push gh &&
        test ...
@@ -451,8 +451,10 @@ library for your script to use.
  - test_must_fail <git-command>
 
    Run a git command and ensure it fails in a controlled way.  Use
-   this instead of "! <git-command>" to fail when git commands
-   segfault.
+   this instead of "! <git-command>".  When git-command dies due to a
+   segfault, test_must_fail diagnoses it as an error; "! <git-command>"
+   treats it as just another expected failure, which would let such a
+   bug go unnoticed.
 
  - test_might_fail <git-command>
 
index 71effc5becd09d1289361767f6f54af8f1594627..e733f6516fdf98e48d5c7cd36ecc89d36166eea1 100644 (file)
@@ -145,7 +145,7 @@ test_http_push_nonff() {
                echo "changed" > path2 &&
                git commit -a -m path2 --amend &&
 
-               !(git push -v origin >output 2>&1) &&
+               test_must_fail git push -v origin >output 2>&1 &&
                (cd "$REMOTE_REPO" &&
                 test $HEAD = $(git rev-parse --verify HEAD))
        '
index 64f05080b65c2b9506d1e34748b47ee721026aef..074f2f2e3e57f76b01f16502998e95b493676711 100755 (executable)
@@ -707,19 +707,41 @@ test_expect_success 'set --path' '
        git config --path path.trailingtilde "foo~" &&
        test_cmp expect .git/config'
 
+if test "${HOME+set}"
+then
+       test_set_prereq HOMEVAR
+fi
+
 cat >expect <<EOF
 $HOME/
 /dev/null
 foo~
 EOF
 
-test_expect_success 'get --path' '
+test_expect_success HOMEVAR 'get --path' '
        git config --get --path path.home > result &&
        git config --get --path path.normal >> result &&
        git config --get --path path.trailingtilde >> result &&
        test_cmp expect result
 '
 
+cat >expect <<\EOF
+/dev/null
+foo~
+EOF
+
+test_expect_success 'get --path copes with unset $HOME' '
+       (
+               unset HOME;
+               test_must_fail git config --get --path path.home \
+                       >result 2>msg &&
+               git config --get --path path.normal >>result &&
+               git config --get --path path.trailingtilde >>result
+       ) &&
+       grep "[Ff]ailed to expand.*~/" msg &&
+       test_cmp expect result
+'
+
 rm .git/config
 
 git config quote.leading " test"
index be88d4b5ee86b75eb0e5654404064f712192d0a9..2d2f63f22ee59d8dc24dafaa5224928ad62dea0c 100755 (executable)
@@ -68,41 +68,34 @@ test_expect_success '--orphan makes reflog by default' '
        git checkout master &&
        git config --unset core.logAllRefUpdates &&
        git checkout --orphan delta &&
-       ! test -f .git/logs/refs/heads/delta &&
-       test_must_fail PAGER= git reflog show delta &&
+       test_must_fail git rev-parse --verify delta@{0} &&
        git commit -m Delta &&
-       test -f .git/logs/refs/heads/delta &&
-       PAGER= git reflog show delta
+       git rev-parse --verify delta@{0}
 '
 
 test_expect_success '--orphan does not make reflog when core.logAllRefUpdates = false' '
        git checkout master &&
        git config core.logAllRefUpdates false &&
        git checkout --orphan epsilon &&
-       ! test -f .git/logs/refs/heads/epsilon &&
-       test_must_fail PAGER= git reflog show epsilon &&
+       test_must_fail git rev-parse --verify epsilon@{0} &&
        git commit -m Epsilon &&
-       ! test -f .git/logs/refs/heads/epsilon &&
-       test_must_fail PAGER= git reflog show epsilon
+       test_must_fail git rev-parse --verify epsilon@{0}
 '
 
 test_expect_success '--orphan with -l makes reflog when core.logAllRefUpdates = false' '
        git checkout master &&
        git checkout -l --orphan zeta &&
-       test -f .git/logs/refs/heads/zeta &&
-       test_must_fail PAGER= git reflog show zeta &&
+       test_must_fail git rev-parse --verify zeta@{0} &&
        git commit -m Zeta &&
-       PAGER= git reflog show zeta
+       git rev-parse --verify zeta@{0}
 '
 
 test_expect_success 'giving up --orphan not committed when -l and core.logAllRefUpdates = false deletes reflog' '
        git checkout master &&
        git checkout -l --orphan eta &&
-       test -f .git/logs/refs/heads/eta &&
-       test_must_fail PAGER= git reflog show eta &&
+       test_must_fail git rev-parse --verify eta@{0} &&
        git checkout master &&
-       ! test -f .git/logs/refs/heads/eta &&
-       test_must_fail PAGER= git reflog show eta
+       test_must_fail git rev-parse --verify eta@{0}
 '
 
 test_expect_success '--orphan is rejected with an existing name' '
index 859b99abf1cc62c966322fcfc552c0a7eb7356df..f54a533456d74a3eb2f745dbc77c8ad5a5ae960f 100755 (executable)
@@ -228,24 +228,21 @@ test_expect_success 'checkout -b makes reflog by default' '
        git checkout master &&
        git config --unset core.logAllRefUpdates &&
        git checkout -b alpha &&
-       test -f .git/logs/refs/heads/alpha &&
-       PAGER= git reflog show alpha
+       git rev-parse --verify alpha@{0}
 '
 
 test_expect_success 'checkout -b does not make reflog when core.logAllRefUpdates = false' '
        git checkout master &&
        git config core.logAllRefUpdates false &&
        git checkout -b beta &&
-       ! test -f .git/logs/refs/heads/beta &&
-       test_must_fail PAGER= git reflog show beta
+       test_must_fail git rev-parse --verify beta@{0}
 '
 
 test_expect_success 'checkout -b with -l makes reflog when core.logAllRefUpdates = false' '
        git checkout master &&
        git checkout -lb gamma &&
        git config --unset core.logAllRefUpdates &&
-       test -f .git/logs/refs/heads/gamma &&
-       PAGER= git reflog show gamma
+       git rev-parse --verify gamma@{0}
 '
 
 test_expect_success 'avoid ambiguous track' '
index 2d67a40fc16385b8bee37968f4058b094a174a98..1d82f79ee07e8f9317bc23c49cdf941af36ce3ff 100755 (executable)
@@ -693,7 +693,11 @@ test_expect_success 'create note from non-existing note with "git notes add -c"
        git add a10 &&
        test_tick &&
        git commit -m 10th &&
-       test_must_fail MSG="yet another note" git notes add -c deadbeef &&
+       (
+               MSG="yet another note" &&
+               export MSG &&
+               test_must_fail git notes add -c deadbeef
+       ) &&
        test_must_fail git notes list HEAD
 '
 
index 47ca88fc5231a5e0689b43a35eb660285a73190d..9f03ce699e8f4c3c654065deae675d1a7b259c74 100755 (executable)
@@ -637,13 +637,19 @@ test_expect_success 'set up commits with funny messages' '
        git commit -a -m "end with slash\\" &&
        echo >>file1 &&
        test_tick &&
+       git commit -a -m "something (\000) that looks like octal" &&
+       echo >>file1 &&
+       test_tick &&
+       git commit -a -m "something (\n) that looks like a newline" &&
+       echo >>file1 &&
+       test_tick &&
        git commit -a -m "another commit"
 '
 
 test_expect_success 'rebase-i history with funny messages' '
        git rev-list A..funny >expect &&
        test_tick &&
-       FAKE_LINES="1 2" git rebase -i A &&
+       FAKE_LINES="1 2 3 4" git rebase -i A &&
        git rev-list A.. >actual &&
        test_cmp expect actual
 '
diff --git a/t/t3418-rebase-continue.sh b/t/t3418-rebase-continue.sh
new file mode 100755 (executable)
index 0000000..3b0d273
--- /dev/null
@@ -0,0 +1,43 @@
+#!/bin/sh
+
+test_description='git rebase --continue tests'
+
+. ./test-lib.sh
+
+. "$TEST_DIRECTORY"/lib-rebase.sh
+
+set_fake_editor
+
+test_expect_success 'setup' '
+       test_commit "commit-new-file-F1" F1 1 &&
+       test_commit "commit-new-file-F2" F2 2 &&
+
+       git checkout -b topic HEAD^ &&
+       test_commit "commit-new-file-F2-on-topic-branch" F2 22 &&
+
+       git checkout master
+'
+
+test_expect_success 'interactive rebase --continue works with touched file' '
+       rm -fr .git/rebase-* &&
+       git reset --hard &&
+       git checkout master &&
+
+       FAKE_LINES="edit 1" git rebase -i HEAD^ &&
+       test-chmtime =-60 F1 &&
+       git rebase --continue
+'
+
+test_expect_success 'non-interactive rebase --continue works with touched file' '
+       rm -fr .git/rebase-* &&
+       git reset --hard &&
+       git checkout master &&
+
+       test_must_fail git rebase --onto master master topic &&
+       echo "Resolved" >F2 &&
+       git add F2 &&
+       test-chmtime =-60 F1 &&
+       git rebase --continue
+'
+
+test_done
index 6f031af9f35e4d6350e8e6dd4619d55c66214aa6..7d7140db380225bfffd3b64c125e2599b6be77c2 100755 (executable)
@@ -260,4 +260,32 @@ test_expect_success '"add non-existent" should fail' '
        ! (git ls-files | grep "non-existent")
 '
 
+test_expect_success 'git add --dry-run of existing changed file' "
+       echo new >>track-this &&
+       git add --dry-run track-this >actual 2>&1 &&
+       echo \"add 'track-this'\" | test_cmp - actual
+"
+
+test_expect_success 'git add --dry-run of non-existing file' "
+       echo ignored-file >>.gitignore &&
+       test_must_fail git add --dry-run track-this ignored-file >actual 2>&1 &&
+       echo \"fatal: pathspec 'ignored-file' did not match any files\" | test_cmp - actual
+"
+
+cat >expect.err <<\EOF
+The following paths are ignored by one of your .gitignore files:
+ignored-file
+Use -f if you really want to add them.
+fatal: no files added
+EOF
+cat >expect.out <<\EOF
+add 'track-this'
+EOF
+
+test_expect_success 'git add --dry-run --ignore-missing of non-existing file' '
+       test_must_fail git add --dry-run --ignore-missing track-this ignored-file >actual.out 2>actual.err &&
+       test_cmp expect.out actual.out &&
+       test_cmp expect.err actual.err
+'
+
 test_done
index 504884b9f8fab3bfa34e3dc97d3dc7aad297e626..b0c2a2c3aea811ec023423bdb486de5412fa79c5 100755 (executable)
@@ -128,7 +128,7 @@ test_expect_success 'push fails for non-fast-forward refs unmatched by remote he
 
        # push master too; this ensures there is at least one '"'push'"' command to
        # the remote helper and triggers interaction with the helper.
-       !(git push -v origin +master master:retsam >output 2>&1) &&
+       test_must_fail git push -v origin +master master:retsam >output 2>&1 &&
 
        grep "^ + [a-f0-9]*\.\.\.[a-f0-9]* *master -> master (forced update)$" output &&
        grep "^ ! \[rejected\] *master -> retsam (non-fast-forward)$" output &&
index d9f27859932c33e126fa64c5c1fb80963dabb97a..9bda97058499ecab88dc6de7551d7909e1ad5a2e 100755 (executable)
@@ -86,25 +86,28 @@ test_expect_success 'submodule add' '
        test_cmp empty untracked
 '
 
-test_expect_success 'submodule add to .gitignored path' '
-       echo "refs/heads/master" >expect &&
-       >empty &&
-
+test_expect_success 'submodule add to .gitignored path fails' '
        (
                cd addtest-ignore &&
+               cat <<-\EOF >expect &&
+               The following path is ignored by one of your .gitignore files:
+               submod
+               Use -f if you really want to add it.
+               EOF
                # Does not use test_commit due to the ignore
                echo "*" > .gitignore &&
                git add --force .gitignore &&
                git commit -m"Ignore everything" &&
-               git submodule add "$submodurl" submod &&
-               git submodule init
-       ) &&
+               ! git submodule add "$submodurl" submod >actual 2>&1 &&
+               test_cmp expect actual
+       )
+'
 
-       rm -f heads head untracked &&
-       inspect addtest/submod ../.. &&
-       test_cmp expect heads &&
-       test_cmp expect head &&
-       test_cmp empty untracked
+test_expect_success 'submodule add to .gitignored path with --force' '
+       (
+               cd addtest-ignore &&
+               git submodule add --force "$submodurl" submod
+       )
 '
 
 test_expect_success 'submodule add --branch' '
index db8371cb170c5924512a5626681f485ea3cf6884..e8f21d577ce4da474e2a9545a667ff5dc6dc145f 100644 (file)
@@ -127,14 +127,13 @@ do
        -v|--v|--ve|--ver|--verb|--verbo|--verbos|--verbose)
                verbose=t; shift ;;
        -q|--q|--qu|--qui|--quie|--quiet)
-               quiet=t; shift ;;
+               # Ignore --quiet under a TAP::Harness. Saying how many tests
+               # passed without the ok/not ok details is always an error.
+               test -z "$HARNESS_ACTIVE" && quiet=t; shift ;;
        --with-dashes)
                with_dashes=t; shift ;;
        --no-color)
                color=; shift ;;
-       --no-python)
-               # noop now...
-               shift ;;
        --va|--val|--valg|--valgr|--valgri|--valgrin|--valgrind)
                valgrind=t; verbose=t; shift ;;
        --tee)
@@ -636,7 +635,7 @@ test_done () {
        GIT_EXIT_OK=t
        test_results_dir="$TEST_DIRECTORY/test-results"
        mkdir -p "$test_results_dir"
-       test_results_path="$test_results_dir/${0%.sh}-$$"
+       test_results_path="$test_results_dir/${0%.sh}-$$.counts"
 
        echo "total $test_count" >> $test_results_path
        echo "success $test_success" >> $test_results_path