Sync with 1.6.2.4
authorJunio C Hamano <gitster@pobox.com>
Mon, 20 Apr 2009 00:36:22 +0000 (17:36 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 20 Apr 2009 00:38:40 +0000 (17:38 -0700)
Signed-off-by: Junio C Hamano <gitster@pobox.com>
1  2 
Documentation/RelNotes-1.6.3.txt
Documentation/config.txt
Makefile
index ca38decb3713cda76f5a6e6624e43abe5cc031c2,0000000000000000000000000000000000000000..b53e7b86e73a6a3c6e86e8290d08714c58d36fe2
mode 100644,000000..100644
--- /dev/null
@@@ -1,189 -1,0 +1,182 @@@
- * pruning reflog entries that are unreachable from the tip of the ref
-   during "git reflog prune" (hence "git gc") was very inefficient.
 +GIT v1.6.3 Release Notes
 +========================
 +
 +With the next major release, "git push" into a branch that is
 +currently checked out will be refused by default.  You can choose
 +what should happen upon such a push by setting the configuration
 +variable receive.denyCurrentBranch in the receiving repository.
 +
 +To ease the transition plan, the receiving repository of such a
 +push running this release will issue a big warning when the
 +configuration variable is missing.  Please refer to:
 +
 +  http://git.or.cz/gitwiki/GitFaq#non-bare
 +  http://thread.gmane.org/gmane.comp.version-control.git/107758/focus=108007
 +
 +for more details on the reason why this change is needed and the
 +transition plan.
 +
 +For a similar reason, "git push $there :$killed" to delete the branch
 +$killed in a remote repository $there, if $killed branch is the current
 +branch pointed at by its HEAD, gets a large warning.  You can choose what
 +should happen upon such a push by setting the configuration variable
 +receive.denyDeleteCurrent in the receiving repository.
 +
 +When the user does not tell "git push" what to push, it has always
 +pushed matching refs.  For some people it is unexpected, and a new
 +configuration variable push.default has been introduced to allow
 +changing a different default behaviour.  To advertise the new feature,
 +a big warning is issued if this is not configured and a git push without
 +arguments is attempted.
 +
 +
 +Updates since v1.6.2
 +--------------------
 +
 +(subsystems)
 +
 +* various git-svn updates.
 +
 +(performance)
 +
 +* many uses of lstat(2) in the codepath for "git checkout" have been
 +  optimized out.
 +
- * "git-add -p" now supports "q"uit action.
 +(usability, bells and whistles)
 +
 +* Boolean configuration variable yes/no can be written as on/off.
 +
 +* rsync:/path/to/repo can be used to run git over rsync for local
 +  repositories.  It may not be useful in practice; meant primarily for
 +  testing.
 +
 +* http transport learned to prompt and use password when fetching from or
 +  pushing to http://user@host.xz/ URL.
 +
 +* (msysgit) progress output that is sent over the sideband protocol can
 +  be handled appropriately in Windows console.
 +
 +* "--pretty=<style>" option to the log family of commands can now be
 +  spelled as "--format=<style>".  In addition, --format=%formatstring
 +  is a short-hand for --pretty=tformat:%formatstring.
 +
 +* "--oneline" is a synonym for "--pretty=oneline --abbrev-commit".
 +
 +* "--graph" to the "git log" family can draw the commit ancestry graph
 +  in colors.
 +
 +* If you realize that you botched the patch when you are editing hunks
 +  with the 'edit' action in git-add -i/-p, you can abort the editor to
 +  tell git not to apply it.
 +
 +* The number of commits shown in "you are ahead/behind your upstream"
 +  messages given by "git checkout" and "git status" used to count merge
 +  commits; now it doesn't.
 +
 +* @{-1} is a new way to refer to the last branch you were on introduced in
 +  1.6.2, but the initial implementation did not teach this to a few
 +  commands.  Now the syntax works with "branch -m @{-1} newname".
 +
- * git-fast-export choked when seeing a tag that does not point at commit.
 +* git-archive learned --output=<file> option.
 +
 +* git-archive takes attributes from the tree being archived; strictly
 +  speaking, this is an incompatible behaviour change, but is a good one.
 +  Use --worktree-attributes option to allow it to read attributes from
 +  the work tree as before (deprecated git-tar tree command always reads
 +  attributes from the work tree).
 +
 +* git-bisect shows not just the number of remaining commits whose goodness
 +  is unknown, but also shows the estimated number of remaining rounds.
 +
 +* You can give --date=<format> option to git-blame.
 +
 +* "git-branch -r" shows HEAD symref that points at a remote branch in
 +  interest of each tracked remote repository.
 +
 +* "git-branch -v -v" is a new way to get list of names for branches and the
 +  "upstream" branch for them.
 +
 +* git-config learned -e option to open an editor to edit the config file
 +  directly.
 +
 +* git-clone runs post-checkout hook when run without --no-checkout.
 +
 +* git-difftool is now part of the officially supported command, primarily
 +  maintained by David Aguilar.
 +
- O=v1.6.3-rc0-74-g9824a38
 +* git-for-each-ref learned a new "upstream" token.
 +
 +* git-format-patch can be told to use attachment with a new configuration,
 +  format.attach.
 +
 +* git-format-patch can be told to produce deep or shallow message threads.
 +
 +* git-format-patch can be told to always add sign-off with a configuration
 +  variable.
 +
 +* git-format-patch learned format.headers configuration to add extra
 +  header fields to the output.  This behaviour is similar to the existing
 +  --add-header=<header> option of the command.
 +
 +* git-format-patch gives human readable names to the attached files, when
 +  told to send patches as attachments.
 +
 +* git-grep learned to highlight the found substrings in color.
 +
 +* git-imap-send learned to work around Thunderbird's inability to easily
 +  disable format=flowed with a new configuration, imap.preformattedHTML.
 +
 +* git-rebase can be told to rebase the series even if your branch is a
 +  descendant of the commit you are rebasing onto with --force-rebase
 +  option.
 +
 +* git-rebase can be told to report diffstat with the --stat option.
 +
 +* Output from git-remote command has been vastly improved.
 +
 +* "git remote update --prune $remote" updates from the named remote and
 +  then prunes stale tracking branches.
 +
 +* git-send-email learned --confirm option to review the Cc: list before
 +  sending the messages out.
 +
 +(developers)
 +
 +* Test scripts can be run under valgrind.
 +
 +* Test scripts can be run with installed git.
 +
 +* Makefile learned 'coverage' option to run the test suites with
 +  coverage tracking enabled.
 +
 +* Building the manpages with docbook-xsl between 1.69.1 and 1.71.1 now
 +  requires setting DOCBOOK_SUPPRESS_SP to work around a docbook-xsl bug.
 +  This workaround used to be enabled by default, but causes problems
 +  with newer versions of docbook-xsl.  In addition, there are a few more
 +  knobs you can tweak to work around issues with various versions of the
 +  docbook-xsl package.  See comments in Documentation/Makefile for details.
 +
 +Fixes since v1.6.2
 +------------------
 +
 +All of the fixes in v1.6.2.X maintenance series are included in this
 +release, unless otherwise noted.
 +
 +Here are fixes that this release has, but have not been backported to
 +v1.6.2.X series.
 +
 +* "git-apply" rejected a patch that swaps two files (i.e. renames A to B
 +  and B to A at the same time).  May need to be backported by cherry
 +  picking d8c81df and then 7fac0ee).
 +
 +* The initial checkout did not read the attributes from the .gitattribute
 +  file that is being checked out.
 +
 +* git-gc spent excessive amount of time to decide if an object appears
 +  in a locally existing pack (if needed, backport by merging 69e020a).
 +
 +---
 +exec >/var/tmp/1
++O=v1.6.3-rc1-1-gea10b60
 +echo O=$(git describe master)
 +git shortlog --no-merges $O..master ^maint
diff --combined Documentation/config.txt
index 5ffd14141abdec3bf5cb39cc6ebee129ab447a33,6af58ff3aa9766a545079740978d85da82b3c3cf..35056e1a9cd44af119f98465cd7c4cabb9ba0c33
@@@ -25,7 -25,7 +25,7 @@@ blank lines are ignored
  The file consists of sections and variables.  A section begins with
  the name of the section in square brackets and continues until the next
  section begins.  Section names are not case sensitive.  Only alphanumeric
 -characters, '`-`' and '`.`' are allowed in section names.  Each variable
 +characters, `-` and `.` are allowed in section names.  Each variable
  must belong to some section, which means that there must be section
  header before first setting of a variable.
  
@@@ -39,7 -39,7 +39,7 @@@ in the section header, like in example 
  --------
  
  Subsection names can contain any characters except newline (doublequote
 -'`"`' and backslash have to be escaped as '`\"`' and '`\\`',
 +`"` and backslash have to be escaped as `\"` and `\\`,
  respectively) and are case sensitive.  Section header cannot span multiple
  lines.  Variables may belong directly to a section or to a given subsection.
  You can have `[section]` if you have `[section "subsection"]`, but you
@@@ -53,7 -53,7 +53,7 @@@ All the other lines are recognized as s
  'name = value'.  If there is no equal sign on the line, the entire line
  is taken as 'name' and the variable is recognized as boolean "true".
  The variable names are case-insensitive and only alphanumeric
 -characters and '`-`' are allowed.  There can be more than one value
 +characters and `-` are allowed.  There can be more than one value
  for a given variable; we say then that variable is multivalued.
  
  Leading and trailing whitespace in a variable value is discarded.
@@@ -61,7 -61,7 +61,7 @@@ Internal whitespace within a variable v
  
  The values following the equals sign in variable assign are all either
  a string, an integer, or a boolean.  Boolean values may be given as yes/no,
 -0/1 or true/false.  Case is not significant in boolean values, when
 +0/1, true/false or on/off.  Case is not significant in boolean values, when
  converting value to the canonical form using '--bool' type specifier;
  'git-config' will ensure that the output is "true" or "false".
  
@@@ -69,15 -69,15 +69,15 @@@ String values may be entirely or partia
  You need to enclose variable value in double quotes if you want to
  preserve leading or trailing whitespace, or if variable value contains
  beginning of comment characters (if it contains '#' or ';').
 -Double quote '`"`' and backslash '`\`' characters in variable value must
 -be escaped: use '`\"`' for '`"`' and '`\\`' for '`\`'.
 +Double quote `"` and backslash `\` characters in variable value must
 +be escaped: use `\"` for `"` and `\\` for `\`.
  
 -The following escape sequences (beside '`\"`' and '`\\`') are recognized:
 -'`\n`' for newline character (NL), '`\t`' for horizontal tabulation (HT, TAB)
 -and '`\b`' for backspace (BS).  No other char escape sequence, nor octal
 +The following escape sequences (beside `\"` and `\\`) are recognized:
 +`\n` for newline character (NL), `\t` for horizontal tabulation (HT, TAB)
 +and `\b` for backspace (BS).  No other char escape sequence, nor octal
  char sequences are valid.
  
 -Variable value ending in a '`\`' is continued on the next line in the
 +Variable value ending in a `\` is continued on the next line in the
  customary UNIX fashion.
  
  Some variables may require special value format.
@@@ -221,11 -221,6 +221,11 @@@ core.gitProxy:
  Can be overridden by the 'GIT_PROXY_COMMAND' environment variable
  (which always applies universally, without the special "for"
  handling).
 ++
 +The special string `none` can be used as the proxy command to
 +specify that no proxy be used for a given domain pattern.
 +This is useful for excluding servers inside a firewall from
 +proxy use, while defaulting to a common proxy for external domains.
  
  core.ignoreStat::
        If true, commands which modify both the working tree and the index
@@@ -295,8 -290,10 +295,10 @@@ core.sharedRepository:
        group-shareable. When 'umask' (or 'false'), git will use permissions
        reported by umask(2). When '0xxx', where '0xxx' is an octal number,
        files in the repository will have this mode value. '0xxx' will override
-       user's umask value, and thus, users with a safe umask (0077) can use
-       this option. Examples: '0660' is equivalent to 'group'. '0640' is a
+       user's umask value (whereas the other options will only override
+       requested parts of the user's umask value). Examples: '0660' will make
+       the repo read/write-able for the owner and group, but inaccessible to
+       others (equivalent to 'group' unless umask is e.g. '0022'). '0640' is a
        repository that is group-readable but not group-writable.
        See linkgit:git-init[1]. False by default.
  
@@@ -387,9 -384,9 +389,9 @@@ core.pager:
        to override git's default settings this way, you need
        to be explicit.  For example, to disable the S option
        in a backward compatible manner, set `core.pager`
 -      to "`less -+$LESS -FRX`".  This will be passed to the
 +      to `less -+$LESS -FRX`.  This will be passed to the
        shell by git, which will translate the final command to
 -      "`LESS=FRSX less -+FRSX -FRX`".
 +      `LESS=FRSX less -+FRSX -FRX`.
  
  core.whitespace::
        A comma separated list of common whitespace problems to
@@@ -473,14 -470,10 +475,14 @@@ branch.autosetuprebase:
        This option defaults to never.
  
  branch.<name>.remote::
 -      When in branch <name>, it tells 'git-fetch' which remote to fetch.
 -      If this option is not given, 'git-fetch' defaults to remote "origin".
 +      When in branch <name>, it tells 'git-fetch' and 'git-push' which
 +      remote to fetch from/push to.  It defaults to `origin` if no remote is
 +      configured. `origin` is also used if you are not on any branch.
  
  branch.<name>.merge::
 +      Defines, together with branch.<name>.remote, the upstream branch
 +      for the given branch. It tells 'git-fetch'/'git-pull' which
 +      branch to merge and can also affect 'git-push' (see push.default).
        When in branch <name>, it tells 'git-fetch' the default
        refspec to be marked for merging in FETCH_HEAD. The value is
        handled like the remote part of a refspec, and must match a
@@@ -557,25 -550,6 +559,25 @@@ color.diff.<slot>:
        whitespace errors). The values of these variables may be specified as
        in color.branch.<slot>.
  
 +color.grep::
 +      When set to `always`, always highlight matches.  When `false` (or
 +      `never`), never.  When set to `true` or `auto`, use color only
 +      when the output is written to the terminal.  Defaults to `false`.
 +
 +color.grep.external::
 +      The string value of this variable is passed to an external 'grep'
 +      command as a command line option if match highlighting is turned
 +      on.  If set to an empty string, no option is passed at all,
 +      turning off coloring for external 'grep' calls; this is the default.
 +      For GNU grep, set it to `--color=always` to highlight matches even
 +      when a pager is used.
 +
 +color.grep.match::
 +      Use customized color for matches.  The value of this variable
 +      may be specified as in color.branch.<slot>.  It is passed using
 +      the environment variables 'GREP_COLOR' and 'GREP_COLORS' when
 +      calling an external 'grep'.
 +
  color.interactive::
        When set to `always`, always use colors for interactive prompts
        and displays (such as those used by "git-add --interactive").
@@@ -667,27 -641,6 +669,27 @@@ diff.suppressBlankEmpty:
        A boolean to inhibit the standard behavior of printing a space
        before each empty output line. Defaults to false.
  
 +diff.tool::
 +      Controls which diff tool is used.  `diff.tool` overrides
 +      `merge.tool` when used by linkgit:git-difftool[1] and has
 +      the same valid values as `merge.tool` minus "tortoisemerge"
 +      and plus "kompare".
 +
 +difftool.<tool>.path::
 +      Override the path for the given tool.  This is useful in case
 +      your tool is not in the PATH.
 +
 +difftool.<tool>.cmd::
 +      Specify the command to invoke the specified diff tool.
 +      The specified command is evaluated in shell with the following
 +      variables available:  'LOCAL' is set to the name of the temporary
 +      file containing the contents of the diff pre-image and 'REMOTE'
 +      is set to the name of the temporary file containing the contents
 +      of the diff post-image.
 +
 +difftool.prompt::
 +      Prompt before each invocation of the diff tool.
 +
  diff.wordRegex::
        A POSIX Extended Regular Expression used to determine what is a "word"
        when performing word-by-word difference calculations.  Character
@@@ -726,23 -679,6 +728,23 @@@ format.pretty:
        See linkgit:git-log[1], linkgit:git-show[1],
        linkgit:git-whatchanged[1].
  
 +format.thread::
 +      The default threading style for 'git-format-patch'.  Can be
 +      either a boolean value, `shallow` or `deep`.  'Shallow'
 +      threading makes every mail a reply to the head of the series,
 +      where the head is chosen from the cover letter, the
 +      `\--in-reply-to`, and the first patch mail, in this order.
 +      'Deep' threading makes every mail a reply to the previous one.
 +      A true boolean value is the same as `shallow`, and a false
 +      value disables threading.
 +
 +format.signoff::
 +    A boolean value which lets you enable the `-s/--signoff` option of
 +    format-patch by default. *Note:* Adding the Signed-off-by: line to a
 +    patch should be a conscious act and means that you certify you have
 +    the rights to submit this work under the same open source license.
 +    Please see the 'SubmittingPatches' document for further discussion.
 +
  gc.aggressiveWindow::
        The window size parameter used in the delta compression
        algorithm used by 'git-gc --aggressive'.  This defaults
@@@ -1217,7 -1153,7 +1219,7 @@@ pager.<cmd>:
        particular git subcommand when writing to a tty.  If
        `\--paginate` or `\--no-pager` is specified on the command line,
        it takes precedence over this option.  To disable pagination for
 -      all commands, set `core.pager` or 'GIT_PAGER' to "`cat`".
 +      all commands, set `core.pager` or `GIT_PAGER` to `cat`.
  
  pull.octopus::
        The default merge strategy to use when pulling multiple branches
  pull.twohead::
        The default merge strategy to use when pulling a single branch.
  
 +push.default::
 +      Defines the action git push should take if no refspec is given
 +      on the command line, no refspec is configured in the remote, and
 +      no refspec is implied by any of the options given on the command
 +      line. Possible values are:
 ++
 +* `nothing` do not push anything.
 +* `matching` push all matching branches.
 +  All branches having the same name in both ends are considered to be
 +  matching. This is the default.
 +* `tracking` push the current branch to its upstream branch.
 +* `current` push the current branch to a branch of the same name.
 +
 +rebase.stat::
 +      Whether to show a diffstat of what changed upstream since the last
 +      rebase. False by default.
 +
  receive.fsckObjects::
        If it is set to true, git-receive-pack will check all received
        objects. It will abort in the case of a malformed object or a
diff --combined Makefile
index 57f9f2625431b4ab89cb2e17fb866dd4f29b8905,a23e27013999ce900913456ff980af2103c7974f..6e0838b03ad1e00a7c3eec730d12f02b7b2a1162
+++ b/Makefile
@@@ -126,12 -126,6 +126,12 @@@ all:
  # randomly break unless your underlying filesystem supports those sub-second
  # times (my ext3 doesn't).
  #
 +# Define USE_ST_TIMESPEC if your "struct stat" uses "st_ctimespec" instead of
 +# "st_ctim"
 +#
 +# Define NO_NSEC if your "struct stat" does not have "st_ctim.tv_nsec"
 +# available.  This automatically turns USE_NSEC off.
 +#
  # Define USE_STDEV below if you want git to care about the underlying device
  # change being considered an inode change from the update-index perspective.
  #
  # Define NO_PERL_MAKEMAKER if you cannot use Makefiles generated by perl's
  # MakeMaker (e.g. using ActiveState under Cygwin).
  #
 +# Define NO_PERL if you do not want Perl scripts or libraries at all.
 +#
  # Define NO_TCLTK if you do not want Tcl/Tk GUI.
  #
  # The TCL_PATH variable governs the location of the Tcl interpreter
@@@ -265,28 -257,14 +265,28 @@@ SPARSE_FLAGS = -D__BIG_ENDIAN__ -D__pow
  BASIC_CFLAGS =
  BASIC_LDFLAGS =
  
 +# Guard against environment variables
 +BUILTIN_OBJS =
 +BUILT_INS =
 +COMPAT_CFLAGS =
 +COMPAT_OBJS =
 +LIB_H =
 +LIB_OBJS =
 +PROGRAMS =
 +SCRIPT_PERL =
 +SCRIPT_SH =
 +TEST_PROGRAMS =
 +
  SCRIPT_SH += git-am.sh
  SCRIPT_SH += git-bisect.sh
 +SCRIPT_SH += git-difftool--helper.sh
  SCRIPT_SH += git-filter-branch.sh
  SCRIPT_SH += git-lost-found.sh
  SCRIPT_SH += git-merge-octopus.sh
  SCRIPT_SH += git-merge-one-file.sh
  SCRIPT_SH += git-merge-resolve.sh
  SCRIPT_SH += git-mergetool.sh
 +SCRIPT_SH += git-mergetool--lib.sh
  SCRIPT_SH += git-parse-remote.sh
  SCRIPT_SH += git-pull.sh
  SCRIPT_SH += git-quiltimport.sh
@@@ -300,7 -278,6 +300,7 @@@ SCRIPT_SH += git-submodule.s
  SCRIPT_SH += git-web--browse.sh
  
  SCRIPT_PERL += git-add--interactive.perl
 +SCRIPT_PERL += git-difftool.perl
  SCRIPT_PERL += git-archimport.perl
  SCRIPT_PERL += git-cvsexportcommit.perl
  SCRIPT_PERL += git-cvsimport.perl
@@@ -319,7 -296,6 +319,6 @@@ EXTRA_PROGRAMS 
  # ... and all the rest that could be moved out of bindir to gitexecdir
  PROGRAMS += $(EXTRA_PROGRAMS)
  PROGRAMS += git-fast-import$X
- PROGRAMS += git-fetch-pack$X
  PROGRAMS += git-hash-object$X
  PROGRAMS += git-index-pack$X
  PROGRAMS += git-merge-index$X
@@@ -328,7 -304,6 +327,6 @@@ PROGRAMS += git-mktag$
  PROGRAMS += git-mktree$X
  PROGRAMS += git-pack-redundant$X
  PROGRAMS += git-patch-id$X
- PROGRAMS += git-send-pack$X
  PROGRAMS += git-shell$X
  PROGRAMS += git-show-index$X
  PROGRAMS += git-unpack-file$X
@@@ -358,10 -333,7 +356,10 @@@ BUILT_INS += git-whatchanged$
  ALL_PROGRAMS = $(PROGRAMS) $(SCRIPTS)
  
  # what 'all' will build but not install in gitexecdir
 -OTHER_PROGRAMS = git$X gitweb/gitweb.cgi
 +OTHER_PROGRAMS = git$X
 +ifndef NO_PERL
 +OTHER_PROGRAMS += gitweb/gitweb.cgi
 +endif
  
  # Set paths to tools early so that they can be used for version tests.
  ifndef SHELL_PATH
@@@ -440,7 -412,6 +438,7 @@@ LIB_OBJS += archive-tar.
  LIB_OBJS += archive-zip.o
  LIB_OBJS += attr.o
  LIB_OBJS += base85.o
 +LIB_OBJS += bisect.o
  LIB_OBJS += blob.o
  LIB_OBJS += branch.o
  LIB_OBJS += bundle.o
@@@ -541,7 -512,6 +539,7 @@@ BUILTIN_OBJS += builtin-add.
  BUILTIN_OBJS += builtin-annotate.o
  BUILTIN_OBJS += builtin-apply.o
  BUILTIN_OBJS += builtin-archive.o
 +BUILTIN_OBJS += builtin-bisect--helper.o
  BUILTIN_OBJS += builtin-blame.o
  BUILTIN_OBJS += builtin-branch.o
  BUILTIN_OBJS += builtin-bundle.o
@@@ -685,7 -655,6 +683,7 @@@ ifeq ($(uname_S),Darwin
        endif
        NO_MEMMEM = YesPlease
        THREADED_DELTA_SEARCH = YesPlease
 +      USE_ST_TIMESPEC = YesPlease
  endif
  ifeq ($(uname_S),SunOS)
        NEEDS_SOCKET = YesPlease
@@@ -735,7 -704,6 +733,7 @@@ ifeq ($(uname_S),FreeBSD
        BASIC_CFLAGS += -I/usr/local/include
        BASIC_LDFLAGS += -L/usr/local/lib
        DIR_HAS_BSD_GROUP_SEMANTICS = YesPlease
 +      USE_ST_TIMESPEC = YesPlease
        THREADED_DELTA_SEARCH = YesPlease
        ifeq ($(shell expr "$(uname_R)" : '4\.'),2)
                PTHREAD_LIBS = -pthread
@@@ -764,7 -732,6 +762,7 @@@ ifeq ($(uname_S),AIX
        NO_MEMMEM = YesPlease
        NO_MKDTEMP = YesPlease
        NO_STRLCPY = YesPlease
 +      NO_NSEC = YesPlease
        FREAD_READS_DIRECTORIES = UnfortunatelyYes
        INTERNAL_QSORT = UnfortunatelyYes
        NEEDS_LIBICONV=YesPlease
@@@ -807,6 -774,7 +805,6 @@@ ifneq (,$(findstring CYGWIN,$(uname_S))
        COMPAT_OBJS += compat/cygwin.o
  endif
  ifneq (,$(findstring MINGW,$(uname_S)))
 -      NO_MMAP = YesPlease
        NO_PREAD = YesPlease
        NO_OPENSSL = YesPlease
        NO_CURL = YesPlease
        RUNTIME_PREFIX = YesPlease
        NO_POSIX_ONLY_PROGRAMS = YesPlease
        NO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease
 +      NO_NSEC = YesPlease
 +      USE_WIN32_MMAP = YesPlease
        COMPAT_CFLAGS += -D__USE_MINGW_ACCESS -DNOGDI -Icompat -Icompat/regex -Icompat/fnmatch
        COMPAT_CFLAGS += -DSNPRINTF_SIZE_CORR=1
        COMPAT_CFLAGS += -DSTRIP_EXTENSION=\".exe\"
@@@ -952,15 -918,6 +950,15 @@@ endi
  ifdef NO_ST_BLOCKS_IN_STRUCT_STAT
        BASIC_CFLAGS += -DNO_ST_BLOCKS_IN_STRUCT_STAT
  endif
 +ifdef USE_NSEC
 +      BASIC_CFLAGS += -DUSE_NSEC
 +endif
 +ifdef USE_ST_TIMESPEC
 +      BASIC_CFLAGS += -DUSE_ST_TIMESPEC
 +endif
 +ifdef NO_NSEC
 +      BASIC_CFLAGS += -DNO_NSEC
 +endif
  ifdef NO_C99_FORMAT
        BASIC_CFLAGS += -DNO_C99_FORMAT
  endif
@@@ -1008,11 -965,6 +1006,11 @@@ endi
  ifdef NO_MMAP
        COMPAT_CFLAGS += -DNO_MMAP
        COMPAT_OBJS += compat/mmap.o
 +else
 +      ifdef USE_WIN32_MMAP
 +              COMPAT_CFLAGS += -DUSE_WIN32_MMAP
 +              COMPAT_OBJS += compat/win32mmap.o
 +      endif
  endif
  ifdef NO_PREAD
        COMPAT_CFLAGS += -DNO_PREAD
@@@ -1114,10 -1066,6 +1112,10 @@@ ifeq ($(TCLTK_PATH),
  NO_TCLTK=NoThanks
  endif
  
 +ifeq ($(PERL_PATH),)
 +NO_PERL=NoThanks
 +endif
 +
  QUIET_SUBDIR0  = +$(MAKE) -C # space to separate -C and subdir
  QUIET_SUBDIR1  =
  
@@@ -1192,9 -1140,7 +1190,9 @@@ ifndef NO_TCLT
        $(QUIET_SUBDIR0)git-gui $(QUIET_SUBDIR1) gitexecdir='$(gitexec_instdir_SQ)' all
        $(QUIET_SUBDIR0)gitk-git $(QUIET_SUBDIR1) all
  endif
 +ifndef NO_PERL
        $(QUIET_SUBDIR0)perl $(QUIET_SUBDIR1) PERL_PATH='$(PERL_PATH_SQ)' prefix='$(prefix_SQ)' all
 +endif
        $(QUIET_SUBDIR0)templates $(QUIET_SUBDIR1)
  
  please_set_SHELL_PATH_to_a_more_modern_shell:
@@@ -1207,7 -1153,6 +1205,7 @@@ strip: $(PROGRAMS) git$
  
  git.o: git.c common-cmds.h GIT-CFLAGS
        $(QUIET_CC)$(CC) -DGIT_VERSION='"$(GIT_VERSION)"' \
 +              '-DGIT_HTML_PATH="$(htmldir_SQ)"' \
                $(ALL_CFLAGS) -c $(filter %.c,$^)
  
  git$X: git.o $(BUILTIN_OBJS) $(GITLIBS)
@@@ -1242,7 -1187,6 +1240,7 @@@ $(patsubst %.sh,%,$(SCRIPT_SH)) : % : %
        chmod +x $@+ && \
        mv $@+ $@
  
 +ifndef NO_PERL
  $(patsubst %.perl,%,$(SCRIPT_PERL)): perl/perl.mak
  
  perl/perl.mak: GIT-CFLAGS perl/Makefile perl/Makefile.PL
@@@ -1302,15 -1246,6 +1300,15 @@@ git-instaweb: git-instaweb.sh gitweb/gi
            $@.sh > $@+ && \
        chmod +x $@+ && \
        mv $@+ $@
 +else # NO_PERL
 +$(patsubst %.perl,%,$(SCRIPT_PERL)) git-instaweb: % : unimplemented.sh
 +      $(QUIET_GEN)$(RM) $@ $@+ && \
 +      sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
 +          -e 's|@@REASON@@|NO_PERL=$(NO_PERL)|g' \
 +          unimplemented.sh >$@+ && \
 +      chmod +x $@+ && \
 +      mv $@+ $@
 +endif # NO_PERL
  
  configure: configure.ac
        $(QUIET_GEN)$(RM) $@ $<+ && \
@@@ -1426,8 -1361,6 +1424,8 @@@ GIT-CFLAGS: .FORCE-GIT-CFLAG
  GIT-BUILD-OPTIONS: .FORCE-GIT-BUILD-OPTIONS
        @echo SHELL_PATH=\''$(subst ','\'',$(SHELL_PATH_SQ))'\' >$@
        @echo TAR=\''$(subst ','\'',$(subst ','\'',$(TAR)))'\' >>$@
 +      @echo NO_CURL=\''$(subst ','\'',$(subst ','\'',$(NO_CURL)))'\' >>$@
 +      @echo NO_PERL=\''$(subst ','\'',$(subst ','\'',$(NO_PERL)))'\' >>$@
  
  ### Detect Tck/Tk interpreter path changes
  ifndef NO_TCLTK
@@@ -1630,11 -1563,9 +1628,11 @@@ clean
        $(RM) -r $(GIT_TARNAME) .doc-tmp-dir
        $(RM) $(GIT_TARNAME).tar.gz git-core_$(GIT_VERSION)-*.tar.gz
        $(RM) $(htmldocs).tar.gz $(manpages).tar.gz
 -      $(RM) gitweb/gitweb.cgi
        $(MAKE) -C Documentation/ clean
 +ifndef NO_PERL
 +      $(RM) gitweb/gitweb.cgi
        $(MAKE) -C perl clean
 +endif
        $(MAKE) -C templates/ clean
        $(MAKE) -C t/ clean
  ifndef NO_TCLTK
@@@ -1707,27 -1638,3 +1705,27 @@@ check-docs:
  check-builtins::
        ./check-builtins.sh
  
 +### Test suite coverage testing
 +#
 +.PHONY: coverage coverage-clean coverage-build coverage-report
 +
 +coverage:
 +      $(MAKE) coverage-build
 +      $(MAKE) coverage-report
 +
 +coverage-clean:
 +      rm -f *.gcda *.gcno
 +
 +COVERAGE_CFLAGS = $(CFLAGS) -O0 -ftest-coverage -fprofile-arcs
 +COVERAGE_LDFLAGS = $(CFLAGS)  -O0 -lgcov
 +
 +coverage-build: coverage-clean
 +      $(MAKE) CFLAGS="$(COVERAGE_CFLAGS)" LDFLAGS="$(COVERAGE_LDFLAGS)" all
 +      $(MAKE) CFLAGS="$(COVERAGE_CFLAGS)" LDFLAGS="$(COVERAGE_LDFLAGS)" \
 +              -j1 test
 +
 +coverage-report:
 +      gcov -b *.c
 +      grep '^function.*called 0 ' *.c.gcov \
 +              | sed -e 's/\([^:]*\)\.gcov: *function \([^ ]*\) called.*/\1: \2/' \
 +              | tee coverage-untested-functions