diff --git a/git/mingw64/share/doc/connect/manual.html b/git/mingw64/share/doc/connect/manual.html new file mode 100644 index 0000000000000000000000000000000000000000..50cd2a38561687d63b9385d09fe18847954498c3 --- /dev/null +++ b/git/mingw64/share/doc/connect/manual.html @@ -0,0 +1,1420 @@ + + + + + +SSH Proxy Command — connect.c + + + + + +
+
+
+

connect.c is a simple relaying command to make network connection +via SOCKS and https proxy. It is mainly intended to be used as proxy +command of OpenSSH. You can make SSH session beyond the firewall with +this command,

+

Features of connect.c are:

+
    +
  • +

    +Supports SOCKS (version 4/4a/5) and https CONNECT method. +

    +
  • +
  • +

    +Supports NO-AUTH and USERPASS authentication of SOCKS5 +

    +
  • +
  • +

    +You can input password from tty, ssh-askpass or environment variable. +

    +
  • +
  • +

    +Run on UNIX or Windows platform. +

    +
  • +
  • +

    +You can compile with various C compiler (cc, gcc, Visual C, Borland C. etc.) +

    +
  • +
  • +

    +Simple and general program independent from OpenSSH. +

    +
  • +
  • +

    +You can also relay local socket stream instead of standard I/O. +

    +
  • +
+

You can download source code +(connect.c) +on the project page.

+

Pre-compiled binary for MS Windows is also available on +download page.

+
+
+

What is proxy command?

+
+

OpenSSH development team decides to stop supporting SOCKS and any +other tunneling mechanism. It was aimed to separate complexity to +support various mechanism of proxying from core code. And they +recommends more flexible mechanism: ProxyCommand option instead.

+

Proxy command mechanism is delegation of network stream +communication. If ProxyCommand options is specified, SSH invoke +specified external command and talk with standard I/O of thid +command. Invoked command undertakes network communication with +relaying to/from standard input/output including iniitial +communication or negotiation for proxying. Thus, ssh can split out +proxying code into external command.

+

The connect.c program was made for this purpose.

+
+

How to Use

+
+

Get Source

+

You can get source code from project download page. +Pre-compiled MS Windows binary is also available there.

+

Compile and Install

+

In most environment, you can compile connect.c simply. On UNIX +environment, you can use cc or gcc. On Windows environment, you can +use Microsoft Visual C, Borland C or Cygwin gcc.

+
+
+UNIX cc +
+
+

+cc connect.c -o connect +

+
+
+UNIX gcc +
+
+

+gcc connect.c -o connect +

+
+
+Solaris +
+
+

+gcc connect.c -o connect -lnsl -lsocket -lresolv +

+
+
+Microsoft Visual C/C++ +
+
+

+cl connect.c wsock32.lib advapi32.lib +

+
+
+Borland C +
+
+

+bcc32 connect.c wsock32.lib advapi32.lib +

+
+
+Cygwin gcc +
+
+

+gcc connect.c -o connect +

+
+
+Mac OS/Darwin +
+
+

+gcc connect.c -o connect -lresolv +

+
+
+

To install connect command, simply copy compiled binary to directory +in your PATH (ex. /usr/local/bin). Like this:

+
+
+
$ cp connect /usr/local/bin
+
+

Modify your ~/.ssh/config

+

Modify your ~/.ssh/config file to use connect command as proxy +command. For the case of SOCKS server is running on firewall host +socks.local.net with port 1080, you can add ProxyCommand option in +~/.ssh/config, like this:

+
+
+
Host remote.outside.net
+  ProxyCommand connect -S socks.local.net %h %p
+
+

%h and %p will be replaced on invoking proxy command with target +hostname and port specified to SSH command.

+

If you hate writing many entries of remote hosts, following example +may help you.

+
+
+
## Outside of the firewall, use connect command with SOCKS conenction.
+Host *
+  ProxyCommand connect -S socks.local.net %h %p
+
+## Inside of the firewall, use connect command with direct connection.
+Host *.local.net
+  ProxyCommand connect %h %p
+
+

If you want to use http proxy, use -H option instead of -S option +in examle above, like this:

+
+
+
## Outside of the firewall, with HTTP proxy
+Host *
+  ProxyCommand connect -H proxy.local.net:8080 %h %p
+
+## Inside of the firewall, direct
+Host *.local.net
+  ProxyCommand connect %h %p
+
+

Use SSH

+

After editing your ~/.ssh/config file, you are ready to use ssh. You +can execute ssh without any special options as if remote host is IP +reachable host. Following is an example to execute hostname command on +host remote.outside.net.

+
+
+
local$ ssh remote.outside.net hostname
+Hello, this is remote.outside.net
+remote$
+
+

Have trouble?

+

If you have trouble, execute connect command from command line with -d +option to see what is happened. Some debug message may appear and +reports progress. This information may tell you what is wrong. In this +example, error has occurred on authentication stage of SOCKS5 +protocol.

+
+
+
$ connect -d -S socks.local.net unknown.remote.outside.net 110
+DEBUG: relay_method = SOCKS (2)
+DEBUG: relay_host=socks.local.net
+DEBUG: relay_port=1080
+DEBUG: relay_user=gotoh
+DEBUG: socks_version=5
+DEBUG: socks_resolve=REMOTE (2)
+DEBUG: local_type=stdio
+DEBUG: dest_host=unknown.remote.outside.net
+DEBUG: dest_port=110
+DEBUG: Program is $Revision: 1.20 $
+DEBUG: connecting to xxx.xxx.xxx.xxx:1080
+DEBUG: begin_socks_relay()
+DEBUG: atomic_out()  [4 bytes]
+DEBUG: >>> 05 02 00 02
+DEBUG: atomic_in() [2 bytes]
+DEBUG: <<< 05 02
+DEBUG: auth method: USERPASS
+DEBUG: atomic_out()  [some bytes]
+DEBUG: >>> xx xx xx xx ...
+DEBUG: atomic_in() [2 bytes]
+DEBUG: <<< 01 01
+ERROR: Authentication faield.
+FATAL: failed to begin relaying via SOCKS.
+
+
+

More Detail

+
+

Command line usage is here:

+
+
+
usage:  connect [-dnhs45] [-R resolve] [-p local-port] [-w sec]
+                [-H [user@]proxy-server[:port]]
+                [-S [user@]socks-server[:port]]
+                host port
+
+

host and port is target hostname and port-number to connect.

+
+
+-H [user@]server[:port] +
+
+

+ Specify hostname and port number of http proxy server to + relay. If port is omitted, 80 is used. +

+
+
+-h +
+
+

+ Use HTTP proxy via proxy server sepcified by environment variable + HTTP_PROXY. +

+
+
+-S [_user_@]server\[:_port_] +
+
+

+ Specify hostname and port number of SOCKS server to + relay. Like -H option, port number can be omit and default is 1080. +

+
+
+-s +
+
+

+ Use SOCKS proxy via SOCKS server sepcified by environment variable + SOCKS5_SERVER. +

+
+
+-4 +
+
+

+Use SOCKS version 4 protocol. + This option must be used with -S. +

+
+
+-5 +
+
+

+Use SOCKS version 5 protocol. + This option must be used with -S. +

+
+
+-R method +
+
+

+The method to resolve hostname. 3 keywords (local, + remote, both) or dot-notation IP address is allowed. Keyword + both means; "Try local first, then remote". If dot-notation IP + address is specified, use this host as nameserver (UNIX + only). Default is remote for SOCKS5 or local for others. On SOCKS4 + protocol, remote resolving method (remote and both) use protocol + version 4a. +

+
+
+-p port +
+
+

+Accept on local TCP port and relay it instead of standard input +and output. With this option, program will terminate when remote or +local TCP session is closed. +

+
+
+-w timeout +
+
+

+Timeout seconds for connecting to remote host. +

+
+
+-a auth +
+
+

+option specifiys user intended authentication methods +separated by comma. Currently userpass and none are +supported. Default is userpass. You can also specifying this parameter +by the environment variable SOCKS5_AUTH. +

+
+
+

-d: Run with debug message output. If you fail to connect, use this +option to see what is done.

+

As additional feature, +you can omit port argument when program name is special format +containing port number itself like "connect-25". For example:

+
+
+
$ ln -s connect connect-25
+$ ./connect-25 smtphost.outside.net
+220 smtphost.outside.net ESMTP Sendmail
+QUIT
+221 2.0.0 smtphost.remote.net closing connection
+$
+
+

This example means that the command name "connect-25" indicates port +number 25 so you can omit 2nd argument (and used if specified +explicitly). +This is usefull for the application which invokes only with hostname +argument.

+

Specifying user name via environment variables

+

There are 5 environemnt variables to specify user name without command +line option. This mechanism is usefull for the user who using another +user name different from system account.

+
+
+SOCKS5_USER +
+
+

+ Used for SOCKS v5 access. +

+
+
+SOCKS4_USER +
+
+

+ Used for SOCKS v4 access. +

+
+
+SOCKS_USER +
+
+

+ Used for SOCKS v5 or v4 access and varaibles above are not defined. +

+
+
+HTTP_PROXY_USER +
+
+

+ Used for HTTP proxy access. +

+
+
+CONNECT_USER +
+
+

+ Used for all type of access if all above are not defined. +

+
+
+

Following table describes how user name is determined. Left most number is order to check. If variable is not defined, check next variable, and so on.

+
+ +++++ + + + + + + + + + + + + + + + + + + + + + + + + + +

SOCKS v5

SOCKS v4

HTTP proxy

1

SOCKS5_USER

SOCKS4_USER

HTTP_PROXY_USER

2

SOCKS_USER

3

CONNECT_USER

4

(query user name to system)

+
+

Specifying password via environment variables

+

There are 5 environemnt variables to specify password. If you use this +feature, please note that it is not secure way.

+
+
+SOCKS5_PASSWD +
+
+

+ Used for SOCKS v5 access. This variables is compatible with NEC SOCKS implementation. +

+
+
+SOCKS5_PASSWORD +
+
+

+ Used for SOCKS v5 access if SOCKS5_PASSWD is not defined. +

+
+
+SOCKS_PASSWORD +
+
+

+ Used for SOCKS v5 (or v4) access all above is not defined. +

+
+
+HTTP_PROXY_PASSWORD +
+
+

+ Used for HTTP proxy access. +

+
+
+CONNECT_PASSWORD +
+
+

+ Used for all type of access if all above are not defined. +

+
+
+

Following table describes how password is determined. Left most number +is order to check. If variable is not defined, check next variable, +and so on. Finally ask to user interactively using external program or +tty input.

+
+ ++++ + + + + + + + + + + + + + + + + + + + + + + + +

SOCKS v5

HTTP proxy

1

SOCKS5_PASSWD

HTTP_PROXY_PASSWORD

2

SOCKS_PASSWORD

3

CONNECT_PASSWORD

4

(ask to user interactively)

+
+
+

Limitations

+
+

SOCKS5 authentication

+

Only NO-AUTH and USER/PASSWORD authentications are supported. GSSAPI +authentication (RFC 1961) and other draft authentications (CHAP, EAP, +MAF, etc.) is not supported.

+

HTTP authentication

+

BASIC authentication is supported but DIGEST authentication is not.

+

Switching proxy server on event

+

There is no mechanism to switch proxy server regarding to PC +environment. This limitation might be bad news for mobile user. Since +I do not want to make this program complex, I do not want to support +although this feature is already requested. Please advice me if there +is good idea of detecting environment to swich and simple way to +specify conditioned directive of servers.

+

One tricky workaround exists. It is replacing ~/.ssh/config file by +script on ppp up/down.

+

There’s another example of wrapper script (contributed by Darren +Tucker). This script costs executing ifconfig and grep to detect +current environment, but it works. Note that you should modify +addresses if you use it.

+
+
+
#!/bin/sh
+## ~/bin/myconnect --- Proxy server switching wrapper
+
+if ifconfig eth0 |grep "inet addr:192\.168\.1" >/dev/null; then
+        opts="-S 192.168.1.1:1080"
+elif ifconfig eth0 |grep "inet addr:10\." >/dev/null; then
+        opts="-H 10.1.1.1:80"
+else
+        opts="-s"
+fi
+exec /usr/local/bin/connect $opts $@
+
+
+

Tips

+
+

Proxying socket connection

+

In usual, connect.c relays network connection to/from standard +input/output. By specifying -p option, however, connect.c relays local +network stream instead of standard input/output. With this option, +connect command waits connection from other program, then start +relaying between both network stream.

+

This feature may be useful for the program which is hard to SOCKSify.

+

Use with ssh-askpass command

+

connect.c ask you password when authentication is required. If you +are using on tty/pty terminal, connect can input from terminal with +prompt. But you can also use ssh-askpass program to input password. If +you are graphical environment like X Window or MS Windows, and program +does not have tty/pty, and environment variable SSH_ASKPASS is +specified, then connect.c invoke command specified by environment +variable SSH_ASKPASS to input password. ssh-askpass program might be +installed if you are using OpenSSH on UNIX environment. On Windows +environment, pre-compiled binary is available from here.

+

This feature is limited on window system environment.

+

And also useful on Emacs on MS Windows (NT Emacs or Meadow). It is +hard to send passphrase to connect command (and also ssh) because +external command is invoked on hidden terminal and do I/O with this +terminal. Using ssh-askpass avoids this problem.

+

Use for Network Stream of Emacs

+

Although connect.c is made for OpenSSH, it is generic and independent +from OpenSSH. So we can use this for other purpose. For example, you +can use this command in Emacs to open network connection with remote +host over the firewall via SOCKS or HTTP proxy without SOCKSifying +Emacs itself.

+ +

With this code, you can use relay-open-network-stream function instead +of open-network-stream to make network connection. See top comments of +the source for more detail.

+

Remote resolver

+

If you are SOCKS4 user on UNIX environment, you might want specify +nameserver to resolve remote hostname. You can do it specifying -R +option followed by IP address of resolver.

+

Hopping Connection via SSH

+

Conbination of ssh and connect command have more interesting +usage. Following command makes indirect connection to host2:port from +your current host via host1.

+
+
+
$ ssh host1 connect host2 port
+
+

This method is useful for the situations like:

+
    +
  • +

    +You are outside of organizasion now, but you want to access an + internal host barriered by firewall. +

    +
  • +
  • +

    +You want to use some service which is allowed only from some limited hosts. +

    +
  • +
+

For example, I want to use local NetNews service in my office from +home. I cannot make NNTP session directly because NNTP host is +barriered by firewall. Fortunately, I have ssh account on internal +host and allowed using SOCKS5 on firewall from outside. So I use +following command to connect to NNTP service.

+
+
+
$ ssh host1 connect news 119
+200 news.my-office.com InterNetNews NNRP server INN 2.3.2 ready (posting ok).
+quit
+205 .
+$
+
+

By combinating hopping connection and relay.el, I can read NetNews +using Wanderlust on Emacs at home.

+
+
+
                        |
+    External (internet) | Internal (office)
+                        |
++------+           +----------+          +-------+           +-----------+
+| HOME |           | firewall |          | host1 |           | NNTP host |
++------+           +----------+          +-------+           +-----------+
+ emacs <-------------- ssh ---------------> sshd <-- connect --> nntpd
+       <-- connect --> socksd <-- SOCKS -->
+
+

As an advanced example, you can use SSH hopping as fetchmail’s plug-in +program to access via secure tunnel. This method requires that connect +program is insatalled on remote host. There’s example of .fetchmailrc +bellow. When fetchmail access to mail-server, you will login to remote +host using SSH then execute connect program on remote host to relay +conversation with pop server. Thus fetchmail can retrieve mails in +secure.

+
+
+
poll mail-server
+  protocol pop3
+  plugin "ssh %h connect localhost %p"
+  username "username"
+  password "password"
+
+
+

Break The More Restricted Wall

+
+

If firewall does not provide SOCKS nor HTTPS other than port 443, you +cannot break the wall in usual way. But if you have you own host which +is accessible from internet, you can make ssh connection to your own +host by configuring sshd as waiting at port 443 instead of standard +22. By this, you can login to your own host via port 443. Once you +have logged-in to extenal home machine, you can execute connect as +second hop to make connection from your own host to final target host, +like this:

+
+
+
internal$ cat ~/.ssh/config
+Host home
+    ProxyCommand connect -H firewall:8080 %h 443
+
+Host server # internal
+    ProxyCommand ssh home connect %h %p
+
+internal$ ssh home
+You are logged in to home!
+home# exit
+internal$ ssh server
+You are logged in to server!
+server# exit
+internal$
+
+

This way is similar to "Hopping connection via SSH" except configuring +outer sshd as waiting at port 443 (https). This means that you have a +capability to break the strongly restricted wall if you have own host +out side of the wall.

+
+
+
                        |
+      Internal (office) | External (internet)
+                        |
++--------+         +----------+                 +------+          +--------+
+| office |         | firewall |                 | home |          | server |
++--------+         +----------+                 +------+          +--------+
+   <------------------ ssh --------------------->sshd:443
+    <-- connect --> http-proxy <-- https:443 -->                      any
+                                                 connect <-- tcp -->  port
+
+
+ + + +
+
Note
+
If you wanna use this, you should give up hosting https + service at port 443 on you external host home.
+
+
+

F.Y.I.

+
+

Difference between SOCKS versions

+

SOCKS version 4 is first popular implementation which is documented +here. Since this +protocol provide IP address based requesting, client program should +resolve name of outer host by itself. Version 4a (documented +here) is +enhanced to allow request by hostname instead of IP address.

+

SOCKS version 5 is re-designed protocol stands on experience of +version 4 and 4a. There is no compativility with previous +versions. Instead, there’s some improvement: IPv6 support, request by +hostname, UDP proxying, etc.

+

Configuration to use HTTPS

+

Many http proxy servers implementation supports https CONNECT method +(SLL). You might add configuration to allow using https. For the +example of DeleGate (DeleGate is a +multi-purpose application level gateway, or a proxy server) , you +should add https to REMITTABLE parameter to allow HTTP-Proxy like +this:

+
+
+
delegated -Pxxxx ...... REMITTABLE='+,https' ...
+
+

For the case of Squid, you should allow target ports via https by ACL, +and so on.

+

SOCKS5 Servers

+
+
+NEC SOCKS Reference Implementation +
+
+

+ Reference implementation of SOKCS server and library. +

+
+
+Dante +
+
+

+ Dante is free implementation of SOKCS server and library. Many + enhancements and modulalized. +

+
+
+DeleGate +
+
+

+ DeleGate is multi function proxy service provider. DeleGate 5.x.x + or earlier can be SOCKS4 server, and 6.x.x can be SOCKS5 and + SOCKS4 server. and 7.7.0 or later can be SOCKS5 and SOCKS4a + server. +

+
+
+

Specifications

+
+
+socks4.protocol.txt +
+
+

+ SOCKS: A protocol for TCP proxy across firewalls +

+
+
+socks4a.protocol.txt +
+
+

+ SOCKS 4A: A Simple Extension to SOCKS 4 Protocol +

+
+
+RFC 1928 +
+
+

+ SOCKS Protocol Version 5 +

+
+
+RFC 1929 +
+
+

+ Username/Password Authentication for SOCKS V5 +

+
+
+RFC 2616 +
+
+

+ Hypertext Transfer Protocol — HTTP/1.1 +

+
+
+RFC 2617 +
+
+

+ HTTP Authentication: Basic and Digest Access Authentication +

+
+
+
+ +

Similars

+
+
+Proxy Tunnel +
+
+

+Proxying command using https CONNECT. +

+
+
+stunnel +
+
+

+Proxy through an https tunnel (Perl script) +

+
+
+
+
+

+ + + diff --git a/git/mingw64/share/doc/connect/manual.txt b/git/mingw64/share/doc/connect/manual.txt new file mode 100644 index 0000000000000000000000000000000000000000..86730a07909d137b46bb81b9c31308fdacc75f62 --- /dev/null +++ b/git/mingw64/share/doc/connect/manual.txt @@ -0,0 +1,625 @@ +SSH Proxy Command -- connect.c +============================== + +`connect.c` is a simple relaying command to make network connection +via SOCKS and https proxy. It is mainly intended to be used as proxy +command of OpenSSH. You can make SSH session beyond the firewall with +this command, + +Features of `connect.c` are: + +* Supports SOCKS (version 4/4a/5) and https CONNECT method. +* Supports NO-AUTH and USERPASS authentication of SOCKS5 +* You can input password from tty, `ssh-askpass` or environment variable. +* Run on UNIX or Windows platform. +* You can compile with various C compiler (cc, gcc, Visual C, Borland C. etc.) +* Simple and general program independent from OpenSSH. +* You can also relay local socket stream instead of standard I/O. + +You can download source code +(http://bitbucket.org/gotoh/connect/raw/tip/connect.c[connect.c]) +on the http://bitbucket.org/gotoh/connect/[project page]. + +Pre-compiled binary for MS Windows is also available on +http://bitbucket.org/gotoh/connect/downloads/[download page]. + + +What is proxy command? +---------------------- + +OpenSSH development team decides to stop supporting SOCKS and any +other tunneling mechanism. It was aimed to separate complexity to +support various mechanism of proxying from core code. And they +recommends more flexible mechanism: ProxyCommand option instead. + +Proxy command mechanism is delegation of network stream +communication. If ProxyCommand options is specified, SSH invoke +specified external command and talk with standard I/O of thid +command. Invoked command undertakes network communication with +relaying to/from standard input/output including iniitial +communication or negotiation for proxying. Thus, ssh can split out +proxying code into external command. + +The `connect.c` program was made for this purpose. + +How to Use +---------- + +Get Source +~~~~~~~~~~ + +You can get source code from http://bitbucket.org/gotoh/connect/downloads/[project download page]. +Pre-compiled MS Windows binary is also available there. + + +Compile and Install +~~~~~~~~~~~~~~~~~~~ +In most environment, you can compile `connect.c` simply. On UNIX +environment, you can use cc or gcc. On Windows environment, you can +use Microsoft Visual C, Borland C or Cygwin gcc. + +UNIX cc:: `cc connect.c -o connect` +UNIX gcc:: `gcc connect.c -o connect` +Solaris:: `gcc connect.c -o connect -lnsl -lsocket -lresolv` +Microsoft Visual C/C++:: `cl connect.c wsock32.lib advapi32.lib` +Borland C:: `bcc32 connect.c wsock32.lib advapi32.lib` +Cygwin gcc:: `gcc connect.c -o connect` +Mac OS/Darwin:: `gcc connect.c -o connect -lresolv` + + +To install connect command, simply copy compiled binary to directory +in your `PATH` (ex. `/usr/local/bin`). Like this: + +---- +$ cp connect /usr/local/bin +---- + +Modify your `~/.ssh/config` +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Modify your `~/.ssh/config` file to use connect command as proxy +command. For the case of SOCKS server is running on firewall host +socks.local.net with port 1080, you can add `ProxyCommand` option in +`~/.ssh/config`, like this: + +---- +Host remote.outside.net + ProxyCommand connect -S socks.local.net %h %p +---- + +`%h` and `%p` will be replaced on invoking proxy command with target +hostname and port specified to SSH command. + +If you hate writing many entries of remote hosts, following example +may help you. + +---- +## Outside of the firewall, use connect command with SOCKS conenction. +Host * + ProxyCommand connect -S socks.local.net %h %p + +## Inside of the firewall, use connect command with direct connection. +Host *.local.net + ProxyCommand connect %h %p +---- + +If you want to use http proxy, use `-H` option instead of `-S` option +in examle above, like this: + +---- +## Outside of the firewall, with HTTP proxy +Host * + ProxyCommand connect -H proxy.local.net:8080 %h %p + +## Inside of the firewall, direct +Host *.local.net + ProxyCommand connect %h %p +---- + + +Use SSH +~~~~~~~ + +After editing your `~/.ssh/config` file, you are ready to use ssh. You +can execute ssh without any special options as if remote host is IP +reachable host. Following is an example to execute hostname command on +host `remote.outside.net`. + +---- +local$ ssh remote.outside.net hostname +Hello, this is remote.outside.net +remote$ +---- + + +Have trouble? +~~~~~~~~~~~~~ + +If you have trouble, execute connect command from command line with `-d` +option to see what is happened. Some debug message may appear and +reports progress. This information may tell you what is wrong. In this +example, error has occurred on authentication stage of SOCKS5 +protocol. + +---- +$ connect -d -S socks.local.net unknown.remote.outside.net 110 +DEBUG: relay_method = SOCKS (2) +DEBUG: relay_host=socks.local.net +DEBUG: relay_port=1080 +DEBUG: relay_user=gotoh +DEBUG: socks_version=5 +DEBUG: socks_resolve=REMOTE (2) +DEBUG: local_type=stdio +DEBUG: dest_host=unknown.remote.outside.net +DEBUG: dest_port=110 +DEBUG: Program is $Revision: 1.20 $ +DEBUG: connecting to xxx.xxx.xxx.xxx:1080 +DEBUG: begin_socks_relay() +DEBUG: atomic_out() [4 bytes] +DEBUG: >>> 05 02 00 02 +DEBUG: atomic_in() [2 bytes] +DEBUG: <<< 05 02 +DEBUG: auth method: USERPASS +DEBUG: atomic_out() [some bytes] +DEBUG: >>> xx xx xx xx ... +DEBUG: atomic_in() [2 bytes] +DEBUG: <<< 01 01 +ERROR: Authentication faield. +FATAL: failed to begin relaying via SOCKS. +---- + + +More Detail +----------- + +Command line usage is here: + +---- +usage: connect [-dnhs45] [-R resolve] [-p local-port] [-w sec] + [-H [user@]proxy-server[:port]] + [-S [user@]socks-server[:port]] + host port +---- + +host and port is target hostname and port-number to connect. + + +`-H` [user@]server[:port]:: + Specify hostname and port number of http proxy server to + relay. If port is omitted, 80 is used. + +`-h`:: + Use HTTP proxy via proxy server sepcified by environment variable + `HTTP_PROXY`. + +`-S` \[_user_@]_server_\[:_port_]:: + Specify hostname and port number of SOCKS server to + relay. Like `-H` option, port number can be omit and default is 1080. + +`-s`:: + Use SOCKS proxy via SOCKS server sepcified by environment variable + `SOCKS5_SERVER`. + + +`-4`:: Use SOCKS version 4 protocol. + This option must be used with `-S`. +`-5`:: Use SOCKS version 5 protocol. + This option must be used with `-S`. + +`-R` _method_:: The method to resolve hostname. 3 keywords (`local`, + `remote`, `both`) or dot-notation IP address is allowed. Keyword + both means; _"Try local first, then remote"_. If dot-notation IP + address is specified, use this host as nameserver (UNIX + only). Default is remote for SOCKS5 or local for others. On SOCKS4 + protocol, remote resolving method (remote and both) use protocol + version 4a. + +`-p` _port_:: Accept on local TCP port and relay it instead of standard input +and output. With this option, program will terminate when remote or +local TCP session is closed. + +`-w` _timeout_:: Timeout seconds for connecting to remote host. + +`-a` _auth_:: option specifiys user intended authentication methods +separated by comma. Currently `userpass` and `none` are +supported. Default is userpass. You can also specifying this parameter +by the environment variable `SOCKS5_AUTH`. + +`-d`: Run with debug message output. If you fail to connect, use this +option to see what is done. + +As additional feature, +you can omit port argument when program name is special format +containing port number itself like "connect-25". For example: + +---- +$ ln -s connect connect-25 +$ ./connect-25 smtphost.outside.net +220 smtphost.outside.net ESMTP Sendmail +QUIT +221 2.0.0 smtphost.remote.net closing connection +$ +---- + +This example means that the command name "connect-25" indicates port +number 25 so you can omit 2nd argument (and used if specified +explicitly). +This is usefull for the application which invokes only with hostname +argument. + + +Specifying user name via environment variables +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +There are 5 environemnt variables to specify user name without command +line option. This mechanism is usefull for the user who using another +user name different from system account. + +`SOCKS5_USER`:: + Used for SOCKS v5 access. +`SOCKS4_USER`:: + Used for SOCKS v4 access. +`SOCKS_USER`:: + Used for SOCKS v5 or v4 access and varaibles above are not defined. +`HTTP_PROXY_USER`:: + Used for HTTP proxy access. +`CONNECT_USER`:: + Used for all type of access if all above are not defined. + +Following table describes how user name is determined. Left most number is order to check. If variable is not defined, check next variable, and so on. + +[width="50%"] +|==== +| | SOCKS v5 | SOCKS v4 | HTTP proxy +| 1 | `SOCKS5_USER` | `SOCKS4_USER` .2+^| `HTTP_PROXY_USER` +| 2 2+^| `SOCKS_USER` +| 3 3+^| `CONNECT_USER` +| 4 3+^| (query user name to system) +|==== + + +Specifying password via environment variables +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +There are 5 environemnt variables to specify password. If you use this +feature, please note that it is not secure way. + +`SOCKS5_PASSWD`:: + Used for SOCKS v5 access. This variables is compatible with NEC SOCKS implementation. +`SOCKS5_PASSWORD`:: + Used for SOCKS v5 access if `SOCKS5_PASSWD` is not defined. +`SOCKS_PASSWORD`:: + Used for SOCKS v5 (or v4) access all above is not defined. +`HTTP_PROXY_PASSWORD`:: + Used for HTTP proxy access. +`CONNECT_PASSWORD`:: + Used for all type of access if all above are not defined. + +Following table describes how password is determined. Left most number +is order to check. If variable is not defined, check next variable, +and so on. Finally ask to user interactively using external program or +tty input. + +[width="50%"] +|==== +| | SOCKS v5 | HTTP proxy +| 1 | `SOCKS5_PASSWD` .2+^| `HTTP_PROXY_PASSWORD` +| 2 | `SOCKS_PASSWORD` +| 3 2+^| `CONNECT_PASSWORD` +| 4 2+^| (ask to user interactively) +|==== + + +Limitations +----------- + +SOCKS5 authentication +~~~~~~~~~~~~~~~~~~~~~ + +Only NO-AUTH and USER/PASSWORD authentications are supported. GSSAPI +authentication (RFC 1961) and other draft authentications (CHAP, EAP, +MAF, etc.) is not supported. + + +HTTP authentication +~~~~~~~~~~~~~~~~~~~ + +BASIC authentication is supported but DIGEST authentication is not. + + +Switching proxy server on event +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +There is no mechanism to switch proxy server regarding to PC +environment. This limitation might be bad news for mobile user. Since +I do not want to make this program complex, I do not want to support +although this feature is already requested. Please advice me if there +is good idea of detecting environment to swich and simple way to +specify conditioned directive of servers. + +One tricky workaround exists. It is replacing `~/.ssh/config` file by +script on ppp up/down. + +There's another example of wrapper script (contributed by Darren +Tucker). This script costs executing ifconfig and grep to detect +current environment, but it works. Note that you should modify +addresses if you use it. + +---- +#!/bin/sh +## ~/bin/myconnect --- Proxy server switching wrapper + +if ifconfig eth0 |grep "inet addr:192\.168\.1" >/dev/null; then + opts="-S 192.168.1.1:1080" +elif ifconfig eth0 |grep "inet addr:10\." >/dev/null; then + opts="-H 10.1.1.1:80" +else + opts="-s" +fi +exec /usr/local/bin/connect $opts $@ +---- + + +Tips +---- + +Proxying socket connection +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +In usual, `connect.c` relays network connection to/from standard +input/output. By specifying -p option, however, `connect.c` relays local +network stream instead of standard input/output. With this option, +connect command waits connection from other program, then start +relaying between both network stream. + +This feature may be useful for the program which is hard to SOCKSify. + + +Use with ssh-askpass command +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +`connect.c` ask you password when authentication is required. If you +are using on tty/pty terminal, connect can input from terminal with +prompt. But you can also use ssh-askpass program to input password. If +you are graphical environment like X Window or MS Windows, and program +does not have tty/pty, and environment variable `SSH_ASKPASS` is +specified, then `connect.c` invoke command specified by environment +variable SSH_ASKPASS to input password. ssh-askpass program might be +installed if you are using OpenSSH on UNIX environment. On Windows +environment, pre-compiled binary is available from here. + +This feature is limited on window system environment. + +And also useful on Emacs on MS Windows (NT Emacs or Meadow). It is +hard to send passphrase to connect command (and also ssh) because +external command is invoked on hidden terminal and do I/O with this +terminal. Using ssh-askpass avoids this problem. + + +Use for Network Stream of Emacs +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Although `connect.c` is made for OpenSSH, it is generic and independent +from OpenSSH. So we can use this for other purpose. For example, you +can use this command in Emacs to open network connection with remote +host over the firewall via SOCKS or HTTP proxy without SOCKSifying +Emacs itself. + +There is sample code: +http://bitbucket.org/gotoh/connect/src/tip/relay.el + +With this code, you can use `relay-open-network-stream` function instead +of `open-network-stream` to make network connection. See top comments of +the source for more detail. + + +Remote resolver +~~~~~~~~~~~~~~~ + +If you are SOCKS4 user on UNIX environment, you might want specify +nameserver to resolve remote hostname. You can do it specifying `-R` +option followed by IP address of resolver. + + +Hopping Connection via SSH +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Conbination of ssh and connect command have more interesting +usage. Following command makes indirect connection to host2:port from +your current host via host1. + +---- +$ ssh host1 connect host2 port +---- + +This method is useful for the situations like: + +* You are outside of organizasion now, but you want to access an + internal host barriered by firewall. + +* You want to use some service which is allowed only from some limited hosts. + +For example, I want to use local NetNews service in my office from +home. I cannot make NNTP session directly because NNTP host is +barriered by firewall. Fortunately, I have ssh account on internal +host and allowed using SOCKS5 on firewall from outside. So I use +following command to connect to NNTP service. + +---- +$ ssh host1 connect news 119 +200 news.my-office.com InterNetNews NNRP server INN 2.3.2 ready (posting ok). +quit +205 . +$ +---- + +By combinating hopping connection and relay.el, I can read NetNews +using http://www.gohome.org/wl/[Wanderlust] on Emacs at home. + +---- + | + External (internet) | Internal (office) + | ++------+ +----------+ +-------+ +-----------+ +| HOME | | firewall | | host1 | | NNTP host | ++------+ +----------+ +-------+ +-----------+ + emacs <-------------- ssh ---------------> sshd <-- connect --> nntpd + <-- connect --> socksd <-- SOCKS --> +---- + +As an advanced example, you can use SSH hopping as fetchmail's plug-in +program to access via secure tunnel. This method requires that connect +program is insatalled on remote host. There's example of .fetchmailrc +bellow. When fetchmail access to mail-server, you will login to remote +host using SSH then execute connect program on remote host to relay +conversation with pop server. Thus fetchmail can retrieve mails in +secure. + +---- +poll mail-server + protocol pop3 + plugin "ssh %h connect localhost %p" + username "username" + password "password" +---- + + +Break The More Restricted Wall +------------------------------ + +If firewall does not provide SOCKS nor HTTPS other than port 443, you +cannot break the wall in usual way. But if you have you own host which +is accessible from internet, you can make ssh connection to your own +host by configuring sshd as waiting at port 443 instead of standard +22. By this, you can login to your own host via port 443. Once you +have logged-in to extenal home machine, you can execute connect as +second hop to make connection from your own host to final target host, +like this: + +---- +internal$ cat ~/.ssh/config +Host home + ProxyCommand connect -H firewall:8080 %h 443 + +Host server # internal + ProxyCommand ssh home connect %h %p + +internal$ ssh home +You are logged in to home! +home# exit +internal$ ssh server +You are logged in to server! +server# exit +internal$ +---- + +This way is similar to "Hopping connection via SSH" except configuring +outer sshd as waiting at port 443 (https). This means that you have a +capability to break the strongly restricted wall if you have own host +out side of the wall. + +---- + | + Internal (office) | External (internet) + | ++--------+ +----------+ +------+ +--------+ +| office | | firewall | | home | | server | ++--------+ +----------+ +------+ +--------+ + <------------------ ssh --------------------->sshd:443 + <-- connect --> http-proxy <-- https:443 --> any + connect <-- tcp --> port +---- + +NOTE: If you wanna use this, you should give up hosting https + service at port 443 on you external host 'home'. + + +F.Y.I. +------ + +Difference between SOCKS versions +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +SOCKS version 4 is first popular implementation which is documented +http://www.socks.nec.com/protocol/socks4.protocol[here]. Since this +protocol provide IP address based requesting, client program should +resolve name of outer host by itself. Version 4a (documented +http://www.socks.nec.com/protocol/socks4a.protocol[here]) is +enhanced to allow request by hostname instead of IP address. + +SOCKS version 5 is re-designed protocol stands on experience of +version 4 and 4a. There is no compativility with previous +versions. Instead, there's some improvement: IPv6 support, request by +hostname, UDP proxying, etc. + + +Configuration to use HTTPS +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Many http proxy servers implementation supports https CONNECT method +(SLL). You might add configuration to allow using https. For the +example of http://www.delegate.org/delegate/[DeleGate] (DeleGate is a +multi-purpose application level gateway, or a proxy server) , you +should add https to REMITTABLE parameter to allow HTTP-Proxy like +this: + +---- +delegated -Pxxxx ...... REMITTABLE='+,https' ... +---- + +For the case of Squid, you should allow target ports via https by ACL, +and so on. + + +SOCKS5 Servers +~~~~~~~~~~~~~~ + +http://www.socks.nec.com/refsoftware.html[NEC SOCKS Reference Implementation]:: + Reference implementation of SOKCS server and library. + +http://www.inet.no/dante/index.html[Dante]:: + Dante is free implementation of SOKCS server and library. Many + enhancements and modulalized. + +http://www.delegate.org/delegate/[DeleGate]:: + DeleGate is multi function proxy service provider. DeleGate 5.x.x + or earlier can be SOCKS4 server, and 6.x.x can be SOCKS5 and + SOCKS4 server. and 7.7.0 or later can be SOCKS5 and SOCKS4a + server. + + +Specifications +~~~~~~~~~~~~~~ + +http://www.socks.nec.com/protocol/socks4.protocol[socks4.protocol.txt]:: + SOCKS: A protocol for TCP proxy across firewalls +http://www.socks.nec.com/protocol/socks4a.protocol[socks4a.protocol.txt]:: + SOCKS 4A: A Simple Extension to SOCKS 4 Protocol +http://www.socks.nec.com/rfc/rfc1928.txt[RFC 1928]:: + SOCKS Protocol Version 5 +http://www.socks.nec.com/rfc/rfc1929.txt[RFC 1929]:: + Username/Password Authentication for SOCKS V5 +http://www.ietf.org/rfc/rfc2616.txt[RFC 2616]:: + Hypertext Transfer Protocol -- HTTP/1.1 +http://www.ietf.org/rfc/rfc2617.txt[RFC 2617]:: + HTTP Authentication: Basic and Digest Access Authentication + + +Related Links +~~~~~~~~~~~~~ + +* http://www.openssh.org/[OpenSSH Home] +* http://www.ssh.com/[Proprietary SSH] +* http://www.taiyo.co.jp/~gotoh/ssh/openssh-socks.html[Using OpenSSH through a SOCKS compatible PROXY on your LAN] (J. Grant) + + +Similars +~~~~~~~~ + +http://proxytunnel.sourceforge.net/[Proxy Tunnel]:: Proxying command using https CONNECT. +http://www.snurgle.org/~griffon/ssh-https-tunnel[stunnel]:: Proxy through an https tunnel (Perl script) + + +// This document is rescured from the document +// in the internet web cache. +// Original date of this document is 2004-09-06. diff --git a/git/mingw64/share/doc/expat/AUTHORS b/git/mingw64/share/doc/expat/AUTHORS new file mode 100644 index 0000000000000000000000000000000000000000..99475bb1b2efae732a3d5da2ad6fe53f81434989 --- /dev/null +++ b/git/mingw64/share/doc/expat/AUTHORS @@ -0,0 +1,10 @@ +Expat is brought to you by: + +Clark Cooper +Fred L. Drake, Jr. +Greg Stein +James Clark +Karl Waclawek +Rhodri James +Sebastian Pipping +Steven Solie diff --git a/git/mingw64/share/doc/expat/changelog b/git/mingw64/share/doc/expat/changelog new file mode 100644 index 0000000000000000000000000000000000000000..2b3704a69b77dd5abc5889b541569893a2b50488 --- /dev/null +++ b/git/mingw64/share/doc/expat/changelog @@ -0,0 +1,1926 @@ + __ __ _ + ___\ \/ /_ __ __ _| |_ + / _ \\ /| '_ \ / _` | __| + | __// \| |_) | (_| | |_ + \___/_/\_\ .__/ \__,_|\__| + |_| XML parser + +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!! Expat is UNDERSTAFFED and WITHOUT FUNDING. !! +!! ~~~~~~~~~~~~ !! +!! The following topics need *additional skilled C developers* to progress !! +!! in a timely manner or at all (loosely ordered by descending priority): !! +!! _______________________ !! +!! - teaming up on fixing the UNFIXED SECURITY ISSUES listed at: !! +!! """"""""""""""""""""""" !! +!! https://github.com/libexpat/libexpat/issues/1160 !! +!! !! +!! - teaming up on researching and fixing future security reports and !! +!! ClusterFuzz findings with few-days-max response times in communication !! +!! in order to (1) have a sound fix ready before the end of a 90 days !! +!! grace period and (2) in a sustainable manner, !! +!! !! +!! - implementing and auto-testing XML 1.0r5 support !! +!! (needs discussion before pull requests), !! +!! !! +!! For details, please reach out via e-mail to sebastian@pipping.org so we !! +!! can schedule a voice call on the topic, in English or German. !! +!! !! +!! THANK YOU! Sebastian Pipping -- Berlin, 2026-03-17 !! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +Release 2.7.5 Tue March 17 2026 + Security fixes: + #1158 CVE-2026-32776 -- Fix NULL function pointer dereference for + empty external parameter entities; it takes use of both + functions XML_ExternalEntityParserCreate and + XML_SetParamEntityParsing for an application to be + vulnerable. + #1161 #1162 CVE-2026-32777 -- Protect from XML_TOK_INSTANCE_START + infinite loop in function entityValueProcessor; it takes + use of both functions XML_ExternalEntityParserCreate and + XML_SetParamEntityParsing for an application to be + vulnerable. + #1163 CVE-2026-32778 -- Fix NULL dereference in function setContext + on retry after an earlier ouf-of-memory condition; it takes + use of function XML_ParserCreateNS or XML_ParserCreate_MM + for an application to be vulnerable. + #1160 Three more unfixed vulnerabilities left + + Other changes: + #1146 #1147 Autotools: Fix condition for symbol versioning check, in + particular when compiling with slibtool (not libtool) + #1156 Address Cppcheck >=2.20.0 warnings + #1153 tests: Make test_buffer_can_grow_to_max work for MinGW on + Ubuntu 24.04 + #1157 #1159 Version info bumped from 12:2:11 (libexpat*.so.1.11.2) + to 12:3:11 (libexpat*.so.1.11.3); see https://verbump.de/ + for what these numbers do + + Infrastructure: + #1148 CI: Fix FreeBSD and Solaris CI + #1149 CI: Bump to WASI SDK 30 + #1153 CI: Adapt to breaking changes with Ubuntu 22.04 + #1156 CI: Adapt to breaking changes in Cppcheck + + Special thanks to: + Berkay Eren Ürün + Christian Ng + Fabio Scaccabarozzi + Francesco Bertolaccini + Mark Brand + Rhodri James + and + AddressSanitizer + Buttercup + OSS-Fuzz / ClusterFuzz + Trail of Bits + +Release 2.7.4 Sat January 31 2026 + Security fixes: + #1131 CVE-2026-24515 -- Function XML_ExternalEntityParserCreate + failed to copy the encoding handler data passed to + XML_SetUnknownEncodingHandler from the parent to the new + subparser. This can cause a NULL dereference (CWE-476) from + external entities that declare use of an unknown encoding. + The expected impact is denial of service. It takes use of + both functions XML_ExternalEntityParserCreate and + XML_SetUnknownEncodingHandler for an application to be + vulnerable. + #1075 CVE-2026-25210 -- Add missing check for integer overflow + related to buffer size determination in function doContent + + Bug fixes: + #1073 lib: Fix missing undoing of group size expansion in doProlog + failure cases + #1107 xmlwf: Fix a memory leak + #1104 WASI: Fix format specifiers for 32bit WASI SDK + + Other changes: + #1105 lib: Fix strict aliasing + #1106 lib: Leverage feature "flexible array member" of C99 + #1051 lib: Swap (size_t)(-1) for C99 equivalent SIZE_MAX + #1109 lib|xmlwf: Return NULL instead of 0 for pointers + #1068 lib|Windows: Clean up use of macro _MSC_EXTENSIONS with MSVC + #1112 lib: Remove unused import + #1110 xmlwf: Warn about XXE in --help output (and man page) + #1102 #1103 WASI: Stop using getpid + #1113 #1130 Autotools: Drop file expat.m4 that provided obsolete Autoconf + macro AM_WITH_EXPAT + #1123 Autotools: Limit -Wno-pedantic-ms-format to MinGW + #1129 #1134 .. + #1087 Autotools|macOS: Sync CMake templates with CMake 4.0 + #1139 #1140 Autotools|CMake: Introduce off-by-default symbol versioning + The related build system flags are: + - For Autotools, configure with --enable-symbol-versioning + - For CMake, configure with -DEXPAT_SYMBOL_VERSIONING=ON + Please double-check for consequences before activating + this inside distro packaging. Bug reports welcome! + #1117 Autotools|CMake: Remove libbsd support + #1105 Autotools|CMake: Stop using -fno-strict-aliasing, and use + -Wstrict-aliasing=3 instead + #1124 Autotools|CMake: Prefer command gsed (GNU sed) over sed + (e.g. for Solaris) inside fix-xmltest-log.sh + #1067 CMake: Detect and warn about unusable check_c_compiler_flag + #1137 CMake: Drop support for CMake <3.17 + #1138 CMake|Windows: Fix libexpat.def.cmake version comments + + #1086 #1110 docs: Add warning about external reference handlers and XXE + #1066 docs: Be explicit that parent parsers need to outlive + subparsers + #1089 .. + #1090 #1091 .. + #1092 #1093 .. + #1094 #1098 .. + #1115 #1116 docs: Misc non-content improvements to doc/reference.html + #1132 #1133 Version info bumped from 12:1:11 (libexpat*.so.1.11.1) + to 12:2:11 (libexpat*.so.1.11.2); see https://verbump.de/ + for what these numbers do + + Infrastructure: + #1119 #1121 Document guidelines for contributing to Expat + #1120 Introduce a pull request template + #1074 CI: Stop using about-to-be-removed image "macos-13" + #1083 #1088 CI: Mitigate random Wine crashes + #1104 CI: Cover compilation with WASI SDK + #1116 CI: Enforce clean doc XML formatting + #1124 .. + #1135 #1136 CI: Cover Solaris 11.4 + #1125 CI: Extend CI coverage of FreeBSD + #1139 #1140 CI: Cover symbol versioning + #1114 xmlwf: Reformat helpgen code (using Black 25.12.0) + #1071 .gitignore: Add files CPackConfig.cmake and + CPackSourceConfig.cmake + + Special thanks to: + Alfonso Gregory + Bénédikt Tran + Gordon Messmer + Hanno Böck + Jakub Kulík + Matthew Fernandez + Neil Pang + Rosen Penev + and + Artiphishell Inc. + +Release 2.7.3 Wed September 24 2025 + Security fixes: + #1046 #1048 Fix alignment of internal allocations for some non-amd64 + architectures (e.g. sparc32); fixes up on the fix to + CVE-2025-59375 from #1034 (of Expat 2.7.2 and related + backports) + #1059 Fix a class of false positives where input should have been + rejected with error XML_ERROR_ASYNC_ENTITY; regression from + CVE-2024-8176 fix pull request #973 (of Expat 2.7.0 and + related backports). Please check the added unit tests for + example documents. + + Other changes: + #1043 Prove and regression-proof absence of integer overflow + from function expat_realloc + #1062 Remove "harmless" cast that truncated a size_t to unsigned + #1049 Autotools: Remove "ln -s" discovery + #1054 docs: Be consistent with use of floating point around + XML_SetAllocTrackerMaximumAmplification + #1056 docs: Make it explicit that XML_GetCurrentColumnNumber + starts at 0 + #1057 docs: Better integrate the effect of the activation + thresholds + #1058 docs: Fix an in-comment typo in expat.h + #1045 docs: Fix a typo in README.md + #1041 docs: Improve change log of release 2.7.2 + #1053 xmlwf: Resolve use of functions XML_GetErrorLineNumber + and XML_GetErrorColumnNumber + #1032 Windows: Normalize .bat files to CRLF line endings + #1060 #1061 Version info bumped from 12:0:11 (libexpat*.so.1.11.0) + to 12:1:11 (libexpat*.so.1.11.1); see https://verbump.de/ + for what these numbers do + + Infrastructure: + #1047 #1050 CI: Cleanup UndefinedBehaviorSanitizer fatality + #1044 CI|Linux: Stop aborting at first job failure + #1052 CI|FreeBSD: Upgrade to FreeBSD 15.0 + #1039 CI|FreeBSD: Do not install CMake meta-package + + Special thanks to: + Bénédikt Tran + Berkay Eren Ürün + Daniel Engberg + Hanno Böck + Matthew Fernandez + Rolf Eike Beer + Sam James + Tim Bray + and + Clang/GCC UndefinedBehaviorSanitizer + OSS-Fuzz / ClusterFuzz + Z3 Theorem Prover + +Release 2.7.2 Tue September 16 2025 + Security fixes: + #1018 #1034 CVE-2025-59375 -- Disallow use of disproportional amounts of + dynamic memory from within an Expat parser (e.g. previously + a ~250 KiB sized document was able to cause allocation of + ~800 MiB from the heap, i.e. an "amplification" of factor + ~3,300); once a threshold (that defaults to 64 MiB) is + reached, a maximum amplification factor (that defaults to + 100.0) is enforced, and violating documents are rejected + with an out-of-memory error. + There are two new API functions to fine-tune this new + behavior: + - XML_SetAllocTrackerActivationThreshold + - XML_SetAllocTrackerMaximumAmplification . + If you ever need to increase these defaults for non-attack + XML payload, please file a bug report with libexpat. + There is also a new environment variable + EXPAT_MALLOC_DEBUG=(0|1|2) to control the verbosity + of allocations debugging at runtime, disabled by default. + Known impact is (reliable and easy) denial of service: + CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H/E:H/RL:O/RC:C + (Base Score: 7.5, Temporal Score: 7.2) + Please note that a layer of compression around XML can + significantly reduce the minimum attack payload size. + Distributors intending to backport (or cherry-pick) the + fix need to copy 99% of the related pull request, not just + the "lib: Implement tracking of dynamic memory allocations" + commit, to not end up with a state that literally does both + too much and too little at the same time. Appending ".diff" + to the pull request URL could be of help. + + Other changes: + #1008 #1017 Autotools|macOS: Sync CMake templates with CMake 3.31 + #1007 CMake: Drop support for CMake <3.15 + #1004 CMake: Fix off_t detection for -Werror + #1007 CMake|Windows: Fix -DEXPAT_MSVC_STATIC_CRT=ON + #1013 Windows: Drop support for Visual Studio <=16.0/2019 + #1026 xmlwf: Mention supported environment variables in + --help output + #1024 xmlwf: Fix (internal) help generator + #1034 docs: Promote the contract to call function + XML_FreeContentModel when registering a custom + element declaration handler (via a call to function + XML_SetElementDeclHandler) + #1027 docs: Add missing

..

wrap + #994 docs: Drop AppVeyor badge + #1000 tests: Fix portable_strndup + #1036 Drop casts around malloc/free/realloc that C99 does not need + #1010 Replace empty for loops with while loops + #1011 Add const with internal XmlInitUnknownEncodingNS + #14 #1037 Drop an OpenVMS support leftover + #999 #1001 Address more clang-tidy warnings + #1030 #1038 Version info bumped from 11:2:10 (libexpat*.so.1.10.2) + to 12:0:11 (libexpat*.so.1.11.0); see https://verbump.de/ + for what these numbers do + + Infrastructure: + #1003 CI: Cover compilation on FreeBSD + #1009 #1035 CI: Upgrade Clang from 19 to 21 + #1031 CI: Make calling Cppcheck without --suppress=objectIndex + and --suppress=unknownMacro possible + #1013 CI|Windows: Get off of deprecated image "windows-2019" + #1008 #1017 .. + #1023 #1025 CI: Adapt to breaking changes in GitHub Actions + + Special thanks to: + Alexander Bluhm + Neil Pang + Theo Buehler + and + GNU Time + OSS-Fuzz / ClusterFuzz + Perl XML::Parser + +Release 2.7.1 Thu March 27 2025 + Bug fixes: + #980 #989 Restore event pointer behavior from Expat 2.6.4 + (that the fix to CVE-2024-8176 changed in 2.7.0); + affected API functions are: + - XML_GetCurrentByteCount + - XML_GetCurrentByteIndex + - XML_GetCurrentColumnNumber + - XML_GetCurrentLineNumber + - XML_GetInputContext + + Other changes: + #976 #977 Autotools: Integrate files "fuzz/xml_lpm_fuzzer.{cpp,proto}" + with Automake that were missing from 2.7.0 release tarballs + #983 #984 Fix printf format specifiers for 32bit Emscripten + #992 docs: Promote OpenSSF Best Practices self-certification + #978 tests/benchmark: Resolve mistaken double close + #986 Address Frama-C warnings + #990 #993 Version info bumped from 11:1:10 (libexpat*.so.1.10.1) + to 11:2:10 (libexpat*.so.1.10.2); see https://verbump.de/ + for what these numbers do + + Infrastructure: + #982 CI: Start running Perl XML::Parser integration tests + #987 CI: Enforce Clang Static Analyzer clean code + #991 CI: Re-enable warning clang-analyzer-valist.Uninitialized + for clang-tidy + #981 CI: Cover compilation with musl + #983 #984 CI: Cover compilation with 32bit Emscripten + #976 #977 CI: Protect against fuzzer files missing from future + release archives + + Special thanks to: + Berkay Eren Ürün + Matthew Fernandez + and + Perl XML::Parser + +Release 2.7.0 Thu March 13 2025 + Security fixes: + #893 #973 CVE-2024-8176 -- Fix crash from chaining a large number + of entities caused by stack overflow by resolving use of + recursion, for all three uses of entities: + - general entities in character data ("&g1;") + - general entities in attribute values ("") + - parameter entities ("%p1;") + Known impact is (reliable and easy) denial of service: + CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H/E:H/RL:O/RC:C + (Base Score: 7.5, Temporal Score: 7.2) + Please note that a layer of compression around XML can + significantly reduce the minimum attack payload size. + + Other changes: + #935 #937 Autotools: Make generated CMake files look for + libexpat.@SO_MAJOR@.dylib on macOS + #925 Autotools: Sync CMake templates with CMake 3.29 + #945 #962 #966 CMake: Drop support for CMake <3.13 + #942 CMake: Small fuzzing related improvements + #921 docs: Add missing documentation of error code + XML_ERROR_NOT_STARTED that was introduced with 2.6.4 + #941 docs: Document need for C++11 compiler for use from C++ + #959 tests/benchmark: Fix a (harmless) TOCTTOU + #944 Windows: Fix installer target location of file xmlwf.xml + for CMake + #953 Windows: Address warning -Wunknown-warning-option + about -Wno-pedantic-ms-format from LLVM MinGW + #971 Address Cppcheck warnings + #969 #970 Mass-migrate links from http:// to https:// + #947 #958 .. + #974 #975 Document changes since the previous release + #974 #975 Version info bumped from 11:0:10 (libexpat*.so.1.10.0) + to 11:1:10 (libexpat*.so.1.10.1); see https://verbump.de/ + for what these numbers do + + Infrastructure: + #926 tests: Increase robustness + #927 #932 .. + #930 #933 tests: Increase test coverage + #617 #950 .. + #951 #952 .. + #954 #955 .. Fuzzing: Add new fuzzer "xml_lpm_fuzzer" based on + #961 Google's libprotobuf-mutator ("LPM") + #957 Fuzzing|CI: Start producing fuzzing code coverage reports + #936 CI: Pass -q -q for LCOV >=2.1 in coverage.sh + #942 CI: Small fuzzing related improvements + #139 #203 .. + #791 #946 CI: Make GitHub Actions build using MSVC on Windows and + produce 32bit and 64bit Windows binaries + #956 CI: Get off of about-to-be-removed Ubuntu 20.04 + #960 #964 CI: Start uploading to Coverity Scan for static analysis + #972 CI: Stop loading DTD from the internet to address flaky CI + #971 CI: Adapt to breaking changes in Cppcheck + + Special thanks to: + Alexander Gieringer + Berkay Eren Ürün + Hanno Böck + Jann Horn + Mark Brand + Sebastian Andrzej Siewior + Snild Dolkow + Thomas Pröll + Tomas Korbar + valord577 + and + Google Project Zero + Linutronix + Red Hat + Siemens + +Release 2.6.4 Wed November 6 2024 + Security fixes: + #915 CVE-2024-50602 -- Fix crash within function XML_ResumeParser + from a NULL pointer dereference by disallowing function + XML_StopParser to (stop or) suspend an unstarted parser. + A new error code XML_ERROR_NOT_STARTED was introduced to + properly communicate this situation. // CWE-476 CWE-754 + + Other changes: + #903 CMake: Add alias target "expat::expat" + #905 docs: Document use via CMake >=3.18 with FetchContent + and SOURCE_SUBDIR and its consequences + #902 tests: Reduce use of global parser instance + #904 tests: Resolve duplicate handler + #317 #918 tests: Improve tests on doctype closing (ex CVE-2019-15903) + #914 Fix signedness of format strings + #915 For use from C++, expat.h started requiring C++11 due to + use of C99 features + #919 #920 Version info bumped from 10:3:9 (libexpat*.so.1.9.3) + to 11:0:10 (libexpat*.so.1.10.0); see https://verbump.de/ + for what these numbers do + + Infrastructure: + #907 CI: Upgrade Clang from 18 to 19 + #913 CI: Drop macos-12 and add macos-15 + #910 CI: Adapt to breaking changes in GitHub Actions + #898 Add missing entries to .gitignore + + Special thanks to: + Hanno Böck + José Eduardo Gutiérrez Conejo + José Ricardo Cardona Quesada + +Release 2.6.3 Wed September 4 2024 + Security fixes: + #887 #890 CVE-2024-45490 -- Calling function XML_ParseBuffer with + len < 0 without noticing and then calling XML_GetBuffer + will have XML_ParseBuffer fail to recognize the problem + and XML_GetBuffer corrupt memory. + With the fix, XML_ParseBuffer now complains with error + XML_ERROR_INVALID_ARGUMENT just like sibling XML_Parse + has been doing since Expat 2.2.1, and now documented. + Impact is denial of service to potentially artitrary code + execution. + #888 #891 CVE-2024-45491 -- Internal function dtdCopy can have an + integer overflow for nDefaultAtts on 32-bit platforms + (where UINT_MAX equals SIZE_MAX). + Impact is denial of service to potentially artitrary code + execution. + #889 #892 CVE-2024-45492 -- Internal function nextScaffoldPart can + have an integer overflow for m_groupSize on 32-bit + platforms (where UINT_MAX equals SIZE_MAX). + Impact is denial of service to potentially artitrary code + execution. + + Other changes: + #851 #879 Autotools: Sync CMake templates with CMake 3.28 + #853 Autotools: Always provide path to find(1) for portability + #861 Autotools: Ensure that the m4 directory always exists. + #870 Autotools: Simplify handling of SIZEOF_VOID_P + #869 Autotools: Support non-GNU sed + #856 Autotools|CMake: Fix main() to main(void) + #865 Autotools|CMake: Fix compile tests for HAVE_SYSCALL_GETRANDOM + #863 Autotools|CMake: Stop requiring dos2unix + #854 #855 CMake: Fix check for symbols size_t and off_t + #864 docs|tests: Convert README to Markdown and update + #741 Windows: Drop support for Visual Studio <=15.0/2017 + #886 Drop needless XML_DTD guards around is_param access + #885 Fix typo in a code comment + #894 #896 Version info bumped from 10:2:9 (libexpat*.so.1.9.2) + to 10:3:9 (libexpat*.so.1.9.3); see https://verbump.de/ + for what these numbers do + + Infrastructure: + #880 Readme: Promote the call for help + #868 CI: Fix various issues + #849 CI: Allow triggering GitHub Actions workflows manually + #851 #872 .. + #873 #879 CI: Adapt to breaking changes in GitHub Actions + + Special thanks to: + Alexander Bluhm + Berkay Eren Ürün + Dag-Erling Smørgrav + Ferenc Géczi + TaiYou + +Release 2.6.2 Wed March 13 2024 + Security fixes: + #839 #842 CVE-2024-28757 -- Prevent billion laughs attacks with + isolated use of external parsers. Please see the commit + message of commit 1d50b80cf31de87750103656f6eb693746854aa8 + for details. + + Bug fixes: + #839 #841 Reject direct parameter entity recursion + and avoid the related undefined behavior + + Other changes: + #847 Autotools: Fix build for DOCBOOK_TO_MAN containing spaces + #837 Add missing #821 and #824 to 2.6.1 change log + #838 #843 Version info bumped from 10:1:9 (libexpat*.so.1.9.1) + to 10:2:9 (libexpat*.so.1.9.2); see https://verbump.de/ + for what these numbers do + + Special thanks to: + Philippe Antoine + Tomas Korbar + and + Clang UndefinedBehaviorSanitizer + OSS-Fuzz / ClusterFuzz + +Release 2.6.1 Thu February 29 2024 + Bug fixes: + #817 Make tests independent of CPU speed, and thus more robust + #828 #836 Expose billion laughs API with XML_DTD defined and + XML_GE undefined, regression from 2.6.0 + + Other changes: + #829 Hide test-only code behind new internal macro + #833 Autotools: Reject expat_config.h.in defining SIZEOF_VOID_P + #821 #824 Autotools: Fix "make clean" for case: + ./configure --without-docbook && make clean all + #819 Address compiler warnings + #832 #834 Version info bumped from 10:0:9 (libexpat*.so.1.9.0) + to 10:1:9 (libexpat*.so.1.9.1); see https://verbump.de/ + for what these numbers do + + Infrastructure: + #818 CI: Adapt to breaking changes in clang-format + + Special thanks to: + David Hall + Snild Dolkow + +Release 2.6.0 Tue February 6 2024 + Security fixes: + #789 #814 CVE-2023-52425 -- Fix quadratic runtime issues with big tokens + that can cause denial of service, in partial where + dealing with compressed XML input. Applications + that parsed a document in one go -- a single call to + functions XML_Parse or XML_ParseBuffer -- were not affected. + The smaller the chunks/buffers you use for parsing + previously, the bigger the problem prior to the fix. + Backporters should be careful to no omit parts of + pull request #789 and to include earlier pull request #771, + in order to not break the fix. + #777 CVE-2023-52426 -- Fix billion laughs attacks for users + compiling *without* XML_DTD defined (which is not common). + Users with XML_DTD defined have been protected since + Expat >=2.4.0 (and that was CVE-2013-0340 back then). + + Bug fixes: + #753 Fix parse-size-dependent "invalid token" error for + external entities that start with a byte order mark + #780 Fix NULL pointer dereference in setContext via + XML_ExternalEntityParserCreate for compilation with + XML_DTD undefined + #812 #813 Protect against closing entities out of order + + Other changes: + #723 Improve support for arc4random/arc4random_buf + #771 #788 Improve buffer growth in XML_GetBuffer and XML_Parse + #761 #770 xmlwf: Support --help and --version + #759 #770 xmlwf: Support custom buffer size for XML_GetBuffer and read + #744 xmlwf: Improve language and URL clickability in help output + #673 examples: Add new example "element_declarations.c" + #764 Be stricter about macro XML_CONTEXT_BYTES at build time + #765 Make inclusion to expat_config.h consistent + #726 #727 Autotools: configure.ac: Support --disable-maintainer-mode + #678 #705 .. + #706 #733 #792 Autotools: Sync CMake templates with CMake 3.26 + #795 Autotools: Make installation of shipped man page doc/xmlwf.1 + independent of docbook2man availability + #815 Autotools|CMake: Add missing -DXML_STATIC to pkg-config file + section "Cflags.private" in order to fix compilation + against static libexpat using pkg-config on Windows + #724 #751 Autotools|CMake: Require a C99 compiler + (a de-facto requirement already since Expat 2.2.2 of 2017) + #793 Autotools|CMake: Fix PACKAGE_BUGREPORT variable + #750 #786 Autotools|CMake: Make test suite require a C++11 compiler + #749 CMake: Require CMake >=3.5.0 + #672 CMake: Lowercase off_t and size_t to help a bug in Meson + #746 CMake: Sort xmlwf sources alphabetically + #785 CMake|Windows: Fix generation of DLL file version info + #790 CMake: Build tests/benchmark/benchmark.c as well for + a build with -DEXPAT_BUILD_TESTS=ON + #745 #757 docs: Document the importance of isFinal + adjust tests + accordingly + #736 docs: Improve use of "NULL" and "null" + #713 docs: Be specific about version of XML (XML 1.0r4) + and version of C (C99); (XML 1.0r5 will need a sponsor.) + #762 docs: reference.html: Promote function XML_ParseBuffer more + #779 docs: reference.html: Add HTML anchors to XML_* macros + #760 docs: reference.html: Upgrade to OK.css 1.2.0 + #763 #739 docs: Fix typos + #696 docs|CI: Use HTTPS URLs instead of HTTP at various places + #669 #670 .. + #692 #703 .. + #733 #772 Address compiler warnings + #798 #800 Address clang-tidy warnings + #775 #776 Version info bumped from 9:10:8 (libexpat*.so.1.8.10) + to 10:0:9 (libexpat*.so.1.9.0); see https://verbump.de/ + for what these numbers do + + Infrastructure: + #700 #701 docs: Document security policy in file SECURITY.md + #766 docs: Improve parse buffer variables in-code documentation + #674 #738 .. + #740 #747 .. + #748 #781 #782 Refactor coverage and conformance tests + #714 #716 Refactor debug level variables to unsigned long + #671 Improve handling of empty environment variable value + in function getDebugLevel (without visible user effect) + #755 #774 .. + #758 #783 .. + #784 #787 tests: Improve test coverage with regard to parse chunk size + #660 #797 #801 Fuzzing: Improve fuzzing coverage + #367 #799 Fuzzing|CI: Start running OSS-Fuzz fuzzing regression tests + #698 #721 CI: Resolve some Travis CI leftovers + #669 CI: Be robust towards absence of Git tags + #693 #694 CI: Set permissions to "contents: read" for security + #709 CI: Pin all GitHub Actions to specific commits for security + #739 CI: Reject spelling errors using codespell + #798 CI: Enforce clang-tidy clean code + #773 #808 .. + #809 #810 CI: Upgrade Clang from 15 to 18 + #796 CI: Start using Clang's Control Flow Integrity sanitizer + #675 #720 #722 CI: Adapt to breaking changes in GitHub Actions Ubuntu images + #689 CI: Adapt to breaking changes in Clang/LLVM Debian packaging + #763 CI: Adapt to breaking changes in codespell + #803 CI: Adapt to breaking changes in Cppcheck + + Special thanks to: + Ivan Galkin + Joyce Brum + Philippe Antoine + Rhodri James + Snild Dolkow + spookyahell + Steven Garske + and + Clang AddressSanitizer + Clang UndefinedBehaviorSanitizer + codespell + GCC Farm Project + OSS-Fuzz + Sony Mobile + +Release 2.5.0 Tue October 25 2022 + Security fixes: + #616 #649 #650 CVE-2022-43680 -- Fix heap use-after-free after overeager + destruction of a shared DTD in function + XML_ExternalEntityParserCreate in out-of-memory situations. + Expected impact is denial of service or potentially + arbitrary code execution. + + Bug fixes: + #612 #645 Fix corruption from undefined entities + #613 #654 Fix case when parsing was suspended while processing nested + entities + #616 #652 #653 Stop leaking opening tag bindings after a closing tag + mismatch error where a parser is reset through + XML_ParserReset and then reused to parse + #656 CMake: Fix generation of pkg-config file + #658 MinGW|CMake: Fix static library name + + Other changes: + #663 Protect header expat_config.h from multiple inclusion + #666 examples: Make use of XML_GetBuffer and be more + consistent across examples + #648 Address compiler warnings + #667 #668 Version info bumped from 9:9:8 to 9:10:8; + see https://verbump.de/ for what these numbers do + + Special thanks to: + Jann Horn + Mark Brand + Osyotr + Rhodri James + and + Google Project Zero + +Release 2.4.9 Tue September 20 2022 + Security fixes: + #629 #640 CVE-2022-40674 -- Heap use-after-free vulnerability in + function doContent. Expected impact is denial of service + or potentially arbitrary code execution. + + Bug fixes: + #634 MinGW: Fix mis-compilation for -D__USE_MINGW_ANSI_STDIO=0 + #614 docs: Fix documentation on effect of switch XML_DTD on + symbol visibility in doc/reference.html + + Other changes: + #638 MinGW: Make fix-xmltest-log.sh drop more Wine bug output + #596 #625 Autotools: Sync CMake templates with CMake 3.22 + #608 CMake: Migrate from use of CMAKE_*_POSTFIX to + dedicated variables EXPAT_*_POSTFIX to stop affecting + other projects + #597 #599 Windows|CMake: Add missing -DXML_STATIC to test runners + and fuzzers + #512 #621 Windows|CMake: Render .def file from a template to fix + linking with -DEXPAT_DTD=OFF and/or -DEXPAT_ATTR_INFO=ON + #611 #621 MinGW|CMake: Apply MSVC .def file when linking + #622 #624 MinGW|CMake: Sync library name with GNU Autotools, + i.e. produce libexpat-1.dll rather than libexpat.dll + by default. Filename libexpat.dll.a is unaffected. + #632 MinGW|CMake: Set missing variable CMAKE_RC_COMPILER in + toolchain file "cmake/mingw-toolchain.cmake" to avoid + error "windres: Command not found" on e.g. Ubuntu 20.04 + #597 #627 CMake: Unify inconsistent use of set() and option() in + context of public build time options to take need for + set(.. FORCE) in projects using Expat by means of + add_subdirectory(..) off Expat's users' shoulders + #626 #641 Stop exporting API symbols when building a static library + #644 Resolve use of deprecated "fgrep" by "grep -F" + #620 CMake: Make documentation on variables a bit more consistent + #636 CMake: Drop leading whitespace from a #cmakedefine line in + file expat_config.h.cmake + #594 xmlwf: Fix harmless variable mix-up in function nsattcmp + #592 #593 #610 Address Cppcheck warnings + #643 Address Clang 15 compiler warnings + #642 #644 Version info bumped from 9:8:8 to 9:9:8; + see https://verbump.de/ for what these numbers do + + Infrastructure: + #597 #598 CI: Windows: Start covering MSVC 2022 + #619 CI: macOS: Migrate off deprecated macOS 10.15 + #632 CI: Linux: Make migration off deprecated Ubuntu 18.04 work + #643 CI: Upgrade Clang from 14 to 15 + #637 apply-clang-format.sh: Add support for BSD find + #633 coverage.sh: Exclude MinGW headers + #635 coverage.sh: Fix name collision for -funsigned-char + + Special thanks to: + David Faure + Felix Wilhelm + Frank Bergmann + Rhodri James + Rosen Penev + Thijs Schreijer + Vincent Torri + and + Google Project Zero + +Release 2.4.8 Mon March 28 2022 + Other changes: + #587 pkg-config: Move "-lm" to section "Libs.private" + #587 CMake|MSVC: Fix pkg-config section "Libs" + #55 #582 CMake|macOS: Start using linker arguments + "-compatibility_version " and + "-current_version " in a way compatible with + GNU Libtool + #590 #591 Version info bumped from 9:7:8 to 9:8:8; + see https://verbump.de/ for what these numbers do + + Infrastructure: + #589 CI: Upgrade Clang from 13 to 14 + + Special thanks to: + evpobr + Kai Pastor + Sam James + +Release 2.4.7 Fri March 4 2022 + Bug fixes: + #572 #577 Relax fix to CVE-2022-25236 (introduced with release 2.4.5) + with regard to all valid URI characters (RFC 3986), + i.e. the following set (excluding whitespace): + ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz + 0123456789 % -._~ :/?#[]@ !$&'()*+,;= + + Other changes: + #555 #570 #581 CMake|Windows: Store Expat version in the DLL + #577 Document consequences of namespace separator choices not just + in doc/reference.html but also in header + #577 Document Expat's lack of validation of namespace URIs against + RFC 3986, and that the XML 1.0r4 specification doesn't + require Expat to validate namespace URIs, and that Expat + may do more in that regard in future releases. + If you find need for strict RFC 3986 URI validation on + application level today, https://uriparser.github.io/ may + be of interest. + #579 Fix documentation of XML_EndDoctypeDeclHandler in + #575 Document that a call to XML_FreeContentModel can be done at + a later time from outside the element declaration handler + #574 Make hardcoded namespace URIs easier to find in code + #573 Update documentation on use of XML_POOR_ENTOPY on Solaris + #569 #571 tests: Resolve use of macros NAN and INFINITY for GNU G++ + 4.8.2 on Solaris. + #578 #580 Version info bumped from 9:6:8 to 9:7:8; + see https://verbump.de/ for what these numbers do + + Special thanks to: + Jeffrey Walton + Johnny Jazeix + Thijs Schreijer + +Release 2.4.6 Sun February 20 2022 + Bug fixes: + #566 Fix a regression introduced by the fix for CVE-2022-25313 + in release 2.4.5 that affects applications that (1) + call function XML_SetElementDeclHandler and (2) are + parsing XML that contains nested element declarations + (e.g. ""). + + Other changes: + #567 #568 Version info bumped from 9:5:8 to 9:6:8; + see https://verbump.de/ for what these numbers do + + Special thanks to: + Matt Sergeant + Samanta Navarro + Sergei Trofimovich + and + NixOS + Perl XML::Parser + +Release 2.4.5 Fri February 18 2022 + Security fixes: + #562 CVE-2022-25235 -- Passing malformed 2- and 3-byte UTF-8 + sequences (e.g. from start tag names) to the XML + processing application on top of Expat can cause + arbitrary damage (e.g. code execution) depending + on how invalid UTF-8 is handled inside the XML + processor; validation was not their job but Expat's. + Exploits with code execution are known to exist. + #561 CVE-2022-25236 -- Passing (one or more) namespace separator + characters in "xmlns[:prefix]" attribute values + made Expat send malformed tag names to the XML + processor on top of Expat which can cause + arbitrary damage (e.g. code execution) depending + on such unexpectable cases are handled inside the XML + processor; validation was not their job but Expat's. + Exploits with code execution are known to exist. + #558 CVE-2022-25313 -- Fix stack exhaustion in doctype parsing + that could be triggered by e.g. a 2 megabytes + file with a large number of opening braces. + Expected impact is denial of service or potentially + arbitrary code execution. + #560 CVE-2022-25314 -- Fix integer overflow in function copyString; + only affects the encoding name parameter at parser creation + time which is often hardcoded (rather than user input), + takes a value in the gigabytes to trigger, and a 64-bit + machine. Expected impact is denial of service. + #559 CVE-2022-25315 -- Fix integer overflow in function storeRawNames; + needs input in the gigabytes and a 64-bit machine. + Expected impact is denial of service or potentially + arbitrary code execution. + + Other changes: + #557 #564 Version info bumped from 9:4:8 to 9:5:8; + see https://verbump.de/ for what these numbers do + + Special thanks to: + Ivan Fratric + Samanta Navarro + and + Google Project Zero + JetBrains + +Release 2.4.4 Sun January 30 2022 + Security fixes: + #550 CVE-2022-23852 -- Fix signed integer overflow + (undefined behavior) in function XML_GetBuffer + (that is also called by function XML_Parse internally) + for when XML_CONTEXT_BYTES is defined to >0 (which is both + common and default). + Impact is denial of service or more. + #551 CVE-2022-23990 -- Fix unsigned integer overflow in function + doProlog triggered by large content in element type + declarations when there is an element declaration handler + present (from a prior call to XML_SetElementDeclHandler). + Impact is denial of service or more. + + Bug fixes: + #544 #545 xmlwf: Fix a memory leak on output file opening error + + Other changes: + #546 Autotools: Fix broken CMake support under Cygwin + #554 Windows: Add missing files to the installer to fix + compilation with CMake from installed sources + #552 #554 Version info bumped from 9:3:8 to 9:4:8; + see https://verbump.de/ for what these numbers do + + Special thanks to: + Carlo Bramini + hwt0415 + Roland Illig + Samanta Navarro + and + Clang LeakSan and the Clang team + +Release 2.4.3 Sun January 16 2022 + Security fixes: + #531 #534 CVE-2021-45960 -- Fix issues with left shifts by >=29 places + resulting in + a) realloc acting as free + b) realloc allocating too few bytes + c) undefined behavior + depending on architecture and precise value + for XML documents with >=2^27+1 prefixed attributes + on a single XML tag a la + "" + where XML_ParserCreateNS is used to create the parser + (which needs argument "-n" when running xmlwf). + Impact is denial of service, or more. + #532 #538 CVE-2021-46143 (ZDI-CAN-16157) -- Fix integer overflow + on variable m_groupSize in function doProlog leading + to realloc acting as free. + Impact is denial of service or more. + #539 CVE-2022-22822 to CVE-2022-22827 -- Prevent integer overflows + near memory allocation at multiple places. Mitre assigned + a dedicated CVE for each involved internal C function: + - CVE-2022-22822 for function addBinding + - CVE-2022-22823 for function build_model + - CVE-2022-22824 for function defineAttribute + - CVE-2022-22825 for function lookup + - CVE-2022-22826 for function nextScaffoldPart + - CVE-2022-22827 for function storeAtts + Impact is denial of service or more. + + Other changes: + #535 CMake: Make call to file(GENERATE [..]) work for CMake <3.19 + #541 Autotools|CMake: MinGW: Make run.sh(.in) work for Cygwin + and MSYS2 by not going through Wine on these platforms + #527 #528 Address compiler warnings + #533 #543 Version info bumped from 9:2:8 to 9:3:8; + see https://verbump.de/ for what these numbers do + + Infrastructure: + #536 CI: Check for realistic minimum CMake version + #529 #539 CI: Cover compilation with -m32 + #529 CI: Store coverage reports as artifacts for download + #528 CI: Upgrade Clang from 11 to 13 + + Special thanks to: + An anonymous whitehat + Christopher Degawa + J. Peter Mugaas + Tyson Smith + and + GCC Farm Project + Trend Micro Zero Day Initiative + +Release 2.4.2 Sun December 19 2021 + Other changes: + #509 #510 Link againgst libm for function "isnan" + #513 #514 Include expat_config.h as early as possible + #498 Autotools: Include files with release archives: + - buildconf.sh + - fuzz/*.c + #507 #519 Autotools: Sync CMake templates with CMake 3.20 + #495 #524 CMake: MinGW: Fix pkg-config section "Libs" for + - non-release build types (e.g. -DCMAKE_BUILD_TYPE=Debug) + - multi-config CMake generators (e.g. Ninja Multi-Config) + #502 #503 docs: Document that function XML_GetBuffer may return NULL + when asking for a buffer of 0 (zero) bytes size + #522 #523 docs: Fix return value docs for both + XML_SetBillionLaughsAttackProtection* functions + #525 #526 Version info bumped from 9:1:8 to 9:2:8; + see https://verbump.de/ for what these numbers do + + Special thanks to: + Donghee Na + Joergen Ibsen + Kai Pastor + +Release 2.4.1 Sun May 23 2021 + Bug fixes: + #488 #490 Autotools: Fix installed header expat_config.h for multilib + systems; regression introduced in 2.4.0 by pull request #486 + + Other changes: + #491 #492 Version info bumped from 9:0:8 to 9:1:8; + see https://verbump.de/ for what these numbers do + + Special thanks to: + Gentoo's QA check "multilib_check_headers" + +Release 2.4.0 Sun May 23 2021 + Security fixes: + #34 #466 #484 CVE-2013-0340/CWE-776 -- Protect against billion laughs attacks + (denial-of-service; flavors targeting CPU time or RAM or both, + leveraging general entities or parameter entities or both) + by tracking and limiting the input amplification factor + ( := ( + ) / ). + By conservative default, amplification up to a factor of 100.0 + is tolerated and rejection only starts after 8 MiB of output bytes + (= + ) have been processed. + The fix adds the following to the API: + - A new error code XML_ERROR_AMPLIFICATION_LIMIT_BREACH to + signals this specific condition. + - Two new API functions .. + - XML_SetBillionLaughsAttackProtectionMaximumAmplification and + - XML_SetBillionLaughsAttackProtectionActivationThreshold + .. to further tighten billion laughs protection parameters + when desired. Please see file "doc/reference.html" for details. + If you ever need to increase the defaults for non-attack XML + payload, please file a bug report with libexpat. + - Two new XML_FEATURE_* constants .. + - that can be queried using the XML_GetFeatureList function, and + - that are shown in "xmlwf -v" output. + - Two new environment variable switches .. + - EXPAT_ACCOUNTING_DEBUG=(0|1|2|3) and + - EXPAT_ENTITY_DEBUG=(0|1) + .. for runtime debugging of accounting and entity processing. + Specific behavior of these values may change in the future. + - Two new command line arguments "-a FACTOR" and "-b BYTES" + for xmlwf to further tighten billion laughs protection + parameters when desired. + If you ever need to increase the defaults for non-attack XML + payload, please file a bug report with libexpat. + + Bug fixes: + #332 #470 For (non-default) compilation with -DEXPAT_MIN_SIZE=ON (CMake) + or CPPFLAGS=-DXML_MIN_SIZE (GNU Autotools): Fix segfault + for UTF-16 payloads containing CDATA sections. + #485 #486 Autotools: Fix generated CMake files for non-64bit and + non-Linux platforms (e.g. macOS and MinGW in particular) + that were introduced with release 2.3.0 + + Other changes: + #468 #469 xmlwf: Improve help output and the xmlwf man page + #463 xmlwf: Improve maintainability through some refactoring + #477 xmlwf: Fix man page DocBook validity + #456 Autotools: Sync CMake templates with CMake 3.18 + #458 #459 CMake: Support absolute paths for both CMAKE_INSTALL_LIBDIR + and CMAKE_INSTALL_INCLUDEDIR + #471 #481 CMake: Add support for standard variable BUILD_SHARED_LIBS + #457 Unexpose symbol _INTERNAL_trim_to_complete_utf8_characters + #467 Resolve macro HAVE_EXPAT_CONFIG_H + #472 Delete unused legacy helper file "conftools/PrintPath" + #473 #483 Improve attribution + #464 #465 #477 doc/reference.html: Fix XHTML validity + #475 #478 doc/reference.html: Replace the 90s look by OK.css + #479 Version info bumped from 8:0:7 to 9:0:8 + due to addition of new symbols and error codes; + see https://verbump.de/ for what these numbers do + + Infrastructure: + #456 CI: Enable periodic runs + #457 CI: Start covering the list of exported symbols + #474 CI: Isolate coverage task + #476 #482 CI: Adapt to breaking changes in image "ubuntu-18.04" + #477 CI: Cover well-formedness and DocBook/XHTML validity + of doc/reference.html and doc/xmlwf.xml + + Special thanks to: + Dimitry Andric + Eero Helenius + Nick Wellnhofer + Rhodri James + Tomas Korbar + Yury Gribov + and + Clang LeakSan + JetBrains + OSS-Fuzz + +Release 2.3.0 Thu March 25 2021 + Bug fixes: + #438 When calling XML_ParseBuffer without a prior successful call to + XML_GetBuffer as a user, no longer trigger undefined behavior + (by adding an integer to a NULL pointer) but rather return + XML_STATUS_ERROR and set the error code to (new) code + XML_ERROR_NO_BUFFER. Found by UBSan (UndefinedBehaviorSanitizer) + of Clang 11 (but not Clang 9). + #444 xmlwf: Exit status 2 was used for both: + - malformed input files (documented) and + - invalid command-line arguments (undocumented). + The case of invalid command-line arguments now + has its own exit status 4, resolving the ambiguity. + + Other changes: + #439 xmlwf: Add argument -k to allow continuing after + non-fatal errors + #439 xmlwf: Add section about exit status to the -h help output + #422 #426 #447 Windows: Drop support for Visual Studio <=14.0/2015 + #434 Windows: CMake: Detect unsupported Visual Studio at + configure time (rather than at compile time) + #382 #428 testrunner: Make verbose mode (argument "-v") report + about passed tests, and make default mode report about + failures, as well. + #442 CMake: Call "enable_language(CXX)" prior to tinkering + with CMAKE_CXX_* variables + #448 Document use of libexpat from a CMake-based project + #451 Autotools: Install CMake files as generated by CMake 3.19.6 + so that users with "find_package(expat [..] CONFIG [..])" + are served on distributions that are *not* using the CMake + build system inside for libexpat packaging + #436 #437 Autotools: Drop obsolescent macro AC_HEADER_STDC + #450 #452 Autotools: Resolve use of obsolete macro AC_CONFIG_HEADER + #441 Address compiler warnings + #443 Version info bumped from 7:12:6 to 8:0:7 + due to addition of error code XML_ERROR_NO_BUFFER + (see https://verbump.de/ for what these numbers do) + + Infrastructure: + #435 #446 Replace Travis CI by GitHub Actions + + Special thanks to: + Alexander Richardson + Oleksandr Popovych + Thomas Beutlich + Tim Bray + and + Clang LeakSan, Clang 11 UBSan and the Clang team + +Release 2.2.10 Sat October 3 2020 + Bug fixes: + #390 #395 #398 Fix undefined behavior during parsing caused by + pointer arithmetic with NULL pointers + #404 #405 Fix reading uninitialized variable during parsing + #406 xmlwf: Add missing check for malloc NULL return + + Other changes: + #396 Windows: Drop support for Visual Studio <=8.0/2005 + #409 Windows: Add missing file "Changes" to the installer + to fix compilation with CMake from installed sources + #403 xmlwf: Document exit codes in xmlwf manpage and + exit with code 3 (rather than code 1) for output errors + when used with "-d DIRECTORY" + #356 #359 MinGW: Provide declaration of rand_s for mingwrt <5.3.0 + #383 #392 Autotools: Use -Werror while configure tests the compiler + for supported compile flags to avoid false positives + #383 #393 #394 Autotools: Improve handling of user (C|CPP|CXX|LD)FLAGS, + e.g. ensure that they have the last word over flags added + while running ./configure + #360 CMake: Create libexpatw.{dll,so} and expatw.pc (with emphasis + on suffix "w") with -DEXPAT_CHAR_TYPE=(ushort|wchar_t) + #360 CMake: Detect and deny unsupported build combinations + involving -DEXPAT_CHAR_TYPE=(ushort|wchar_t) + #360 CMake: Install pre-compiled shipped xmlwf.1 manpage in case + of -DEXPAT_BUILD_DOCS=OFF + #375 #380 #419 CMake: Fix use of Expat by means of add_subdirectory + #407 #408 CMake: Keep expat target name constant at "expat" + (i.e. refrain from using the target name to control + build artifact filenames) + #385 CMake: Fix compilation with -DEXPAT_SHARED_LIBS=OFF for + Windows + CMake: Expose man page compilation as target "xmlwf-manpage" + #413 #414 CMake: Introduce option EXPAT_BUILD_PKGCONFIG + to control generation of pkg-config file "expat.pc" + #424 CMake: Add minimalistic support for building binary packages + with CMake target "package"; based on CPack + #366 CMake: Add option -DEXPAT_OSSFUZZ_BUILD=(ON|OFF) with + default OFF to build fuzzer code against OSS-Fuzz and + related environment variable LIB_FUZZING_ENGINE + #354 Fix testsuite for -DEXPAT_DTD=OFF and -DEXPAT_NS=OFF, each + #354 #355 .. + #356 #412 Address compiler warnings + #368 #369 Address pngcheck warnings with doc/*.png images + #425 Version info bumped from 7:11:6 to 7:12:6 + + Special thanks to: + asavah + Ben Wagner + Bhargava Shastry + Frank Landgraf + Jeffrey Walton + Joe Orton + Kleber Tarcísio + Ma Lin + Maciej Sroczyński + Mohammed Khajapasha + Vadim Zeitlin + and + Cppcheck 2.0 and the Cppcheck team + +Release 2.2.9 Wed September 25 2019 + Other changes: + examples: Drop executable bits from elements.c + #349 Windows: Change the name of the Windows DLLs from expat*.dll + to libexpat*.dll once more (regression from 2.2.8, first + fixed in 1.95.3, issue #61 on SourceForge today, + was issue #432456 back then); needs a fix due + case-insensitive file systems on Windows and the fact that + Perl's XML::Parser::Expat compiles into Expat.dll. + #347 Windows: Only define _CRT_RAND_S if not defined + Version info bumped from 7:10:6 to 7:11:6 + + Special thanks to: + Ben Wagner + +Release 2.2.8 Fri September 13 2019 + Security fixes: + #317 #318 CVE-2019-15903 -- Fix heap overflow triggered by + XML_GetCurrentLineNumber (or XML_GetCurrentColumnNumber), + and deny internal entities closing the doctype; + fixed in commit c20b758c332d9a13afbbb276d30db1d183a85d43 + + Bug fixes: + #240 Fix cases where XML_StopParser did not have any effect + when called from inside of an end element handler + #341 xmlwf: Fix exit code for operation without "-d DIRECTORY"; + previously, only "-d DIRECTORY" would give you a proper + exit code: + # xmlwf -d . <<<'' 2>/dev/null ; echo $? + 2 + # xmlwf <<<'' 2>/dev/null ; echo $? + 0 + Now both cases return exit code 2. + + Other changes: + #299 #302 Windows: Replace LoadLibrary hack to access + unofficial API function SystemFunction036 (RtlGenRandom) + by using official API function rand_s (needs WinXP+) + #325 Windows: Drop support for Visual Studio <=7.1/2003 + and document supported compilers in README.md + #286 Windows: Remove COM code from xmlwf; in case it turns + out needed later, there will be a dedicated repository + below https://github.com/libexpat/ for that code + #322 Windows: Remove explicit MSVC solution and project files. + You can generate Visual Studio solution files through + CMake, e.g.: cmake -G"Visual Studio 15 2017" . + #338 xmlwf: Make "xmlwf -h" help output more friendly + #339 examples: Improve elements.c + #244 #264 Autotools: Add argument --enable-xml-attr-info + #239 #301 Autotools: Add arguments + --with-getrandom + --without-getrandom + --with-sys-getrandom + --without-sys-getrandom + #312 #343 Autotools: Fix linking issues with "./configure LD=clang" + Autotools: Fix "make run-xmltest" for out-of-source builds + #329 #336 CMake: Pull all options from Expat <=2.2.7 into namespace + prefix EXPAT_ with the exception of DOCBOOK_TO_MAN: + - BUILD_doc -> EXPAT_BUILD_DOCS (plural) + - BUILD_examples -> EXPAT_BUILD_EXAMPLES + - BUILD_shared -> EXPAT_SHARED_LIBS + - BUILD_tests -> EXPAT_BUILD_TESTS + - BUILD_tools -> EXPAT_BUILD_TOOLS + - DOCBOOK_TO_MAN -> DOCBOOK_TO_MAN (unchanged) + - INSTALL -> EXPAT_ENABLE_INSTALL + - MSVC_USE_STATIC_CRT -> EXPAT_MSVC_STATIC_CRT + - USE_libbsd -> EXPAT_WITH_LIBBSD + - WARNINGS_AS_ERRORS -> EXPAT_WARNINGS_AS_ERRORS + - XML_CONTEXT_BYTES -> EXPAT_CONTEXT_BYTES + - XML_DEV_URANDOM -> EXPAT_DEV_URANDOM + - XML_DTD -> EXPAT_DTD + - XML_NS -> EXPAT_NS + - XML_UNICODE -> EXPAT_CHAR_TYPE=ushort (!) + - XML_UNICODE_WCHAR_T -> EXPAT_CHAR_TYPE=wchar_t (!) + #244 #264 CMake: Add argument -DEXPAT_ATTR_INFO=(ON|OFF), + default OFF + #326 CMake: Add argument -DEXPAT_LARGE_SIZE=(ON|OFF), + default OFF + #328 CMake: Add argument -DEXPAT_MIN_SIZE=(ON|OFF), + default OFF + #239 #277 CMake: Add arguments + -DEXPAT_WITH_GETRANDOM=(ON|OFF|AUTO), default AUTO + -DEXPAT_WITH_SYS_GETRANDOM=(ON|OFF|AUTO), default AUTO + #326 CMake: Install expat_config.h to include directory + #326 CMake: Generate and install configuration files for + future find_package(expat [..] CONFIG [..]) + CMake: Now produces a summary of applied configuration + CMake: Require C++ compiler only when tests are enabled + #330 CMake: Fix compilation for 16bit character types, + i.e. ex -DXML_UNICODE=ON (and ex -DXML_UNICODE_WCHAR_T=ON) + #265 CMake: Fix linking with MinGW + #330 CMake: Add full support for MinGW; to enable, use + -DCMAKE_TOOLCHAIN_FILE=[expat]/cmake/mingw-toolchain.cmake + #330 CMake: Port "make run-xmltest" from GNU Autotools to CMake + #316 CMake: Windows: Make binary postfix match MSVC + Old: expat[d].lib + New: expat[w][d][MD|MT].lib + CMake: Migrate files from Windows to Unix line endings + #308 CMake: Integrate OSS-Fuzz fuzzers, option + -DEXPAT_BUILD_FUZZERS=(ON|OFF), default OFF + #14 Drop an OpenVMS support leftover + #235 #268 .. + #270 #310 .. + #313 #331 #333 Address compiler warnings + #282 #283 .. + #284 #285 Address cppcheck warnings + #294 #295 Address Clang Static Analyzer warnings + #24 #293 Mass-apply clang-format 9 (and ensure conformance during CI) + Version info bumped from 7:9:6 to 7:10:6 + + Special thanks to: + David Loffredo + Joonun Jang + Kishore Kunche + Marco Maggi + Mitch Phillips + Mohammed Khajapasha + Rolf Ade + xantares + Zhongyuan Zhou + +Release 2.2.7 Wed June 19 2019 + Security fixes: + #186 #262 CVE-2018-20843 -- Fix extraction of namespace prefixes from + XML names; XML names with multiple colons could end up in + the wrong namespace, and take a high amount of RAM and CPU + resources while processing, opening the door to + use for denial-of-service attacks + + Other changes: + #195 #197 Autotools/CMake: Utilize -fvisibility=hidden to stop + exporting non-API symbols + #227 Autotools: Add --without-examples and --without-tests + #228 Autotools: Modernize configure.ac + #245 #246 Autotools: Fix check for -fvisibility=hidden for Clang + #247 #248 Autotools: Fix compilation for lack of docbook2x-man + #236 #258 Autotools: Produce .tar.{gz,lz,xz} release archives + #212 CMake: Make libdir of pkgconfig expat.pc support multilib + #158 #263 CMake: Build man page in PROJECT_BINARY_DIR not _SOURCE_DIR + #219 Remove fallback to bcopy, assume that memmove(3) exists + #257 Use portable "/usr/bin/env bash" shebang (e.g. for OpenBSD) + #243 Windows: Fix syntax of .def module definition files + Version info bumped from 7:8:6 to 7:9:6 + + Special thanks to: + Benjamin Peterson + Caolán McNamara + Hanno Böck + KangLin + Kishore Kunche + Marco Maggi + Rhodri James + Sebastian Dröge + userwithuid + Yury Gribov + +Release 2.2.6 Sun August 12 2018 + Bug fixes: + #170 #206 Avoid doing arithmetic with NULL pointers in XML_GetBuffer + #204 #205 Fix 2.2.5 regression with suspend-resume while parsing + a document like '' + + Other changes: + #165 #168 Autotools: Fix docbook-related configure syntax error + #166 Autotools: Avoid grep option `-q` for Solaris + #167 Autotools: Support + ./configure DOCBOOK_TO_MAN="xmlto man --skip-validation" + #159 #167 Autotools: Support DOCBOOK_TO_MAN command which produces + xmlwf.1 rather than XMLWF.1; also covers case insensitive + file systems + #181 Autotools: Drop -rpath option passed to libtool + #188 Autotools: Detect and deny SGML docbook2man as ours is XML + #188 Autotools/CMake: Support command db2x_docbook2man as well + #174 CMake: Introduce option WARNINGS_AS_ERRORS, defaults to OFF + #184 #185 CMake: Introduce option MSVC_USE_STATIC_CRT, defaults to OFF + #207 #208 CMake: Introduce option XML_UNICODE and XML_UNICODE_WCHAR_T, + both defaulting to OFF + #175 CMake: Prefer check_symbol_exists over check_function_exists + #176 CMake: Create the same pkg-config file as with GNU Autotools + #178 #179 CMake: Use GNUInstallDirs module to set proper defaults for + install directories + #208 CMake: Utilize expat_config.h.cmake for XML_DEV_URANDOM + #180 Windows: Fix compilation of test suite for Visual Studio 2008 + #131 #173 #202 Address compiler warnings + #187 #190 #200 Fix miscellaneous typos + Version info bumped from 7:7:6 to 7:8:6 + + Special thanks to: + Anton Maklakov + Benjamin Peterson + Brad King + Franek Korta + Frank Rast + Joe Orton + luzpaz + Pedro Vicente + Rainer Jung + Rhodri James + Rolf Ade + Rolf Eike Beer + Thomas Beutlich + Tomasz Kłoczko + +Release 2.2.5 Tue October 31 2017 + Bug fixes: + #8 If the parser runs out of memory, make sure its internal + state reflects the memory it actually has, not the memory + it wanted to have. + #11 The default handler wasn't being called when it should for + a SYSTEM or PUBLIC doctype if an entity declaration handler + was registered. + #137 #138 Fix a case of mistakenly reported parsing success where + XML_StopParser was called from an element handler + #162 Function XML_ErrorString was returning NULL rather than + a message for code XML_ERROR_INVALID_ARGUMENT + introduced with release 2.2.1 + + Other changes: + #106 xmlwf: Add argument -N adding notation declarations + #75 #106 Test suite: Resolve expected failure cases where xmlwf + output was incomplete + #127 Windows: Fix test suite compilation + #126 #127 Windows: Fix compilation for Visual Studio 2012 + Windows: Upgrade shipped project files to Visual Studio 2017 + #33 #132 tests: Mass-fix compilation for XML_UNICODE_WCHAR_T + #129 examples: Fix compilation for XML_UNICODE_WCHAR_T + #130 benchmark: Fix compilation for XML_UNICODE_WCHAR_T + #144 xmlwf: Fix compilation for XML_UNICODE_WCHAR_T; still needs + Windows or MinGW for 2-byte wchar_t + #9 Address two Clang Static Analyzer false positives + #59 Resolve troublesome macros hiding parser struct membership + and dereferencing that pointer + #6 Resolve superfluous internal malloc/realloc switch + #153 #155 Improve docbook2x-man detection + #160 Undefine NDEBUG in the test suite (rather than rejecting it) + #161 Address compiler warnings + Version info bumped from 7:6:6 to 7:7:6 + + Special thanks to: + Benbuck Nason + Hans Wennborg + José Gutiérrez de la Concha + Pedro Monreal Gonzalez + Rhodri James + Rolf Ade + Stephen Groat + and + Core Infrastructure Initiative + +Release 2.2.4 Sat August 19 2017 + Bug fixes: + #115 Fix copying of partial characters for UTF-8 input + + Other changes: + #109 Fix "make check" for non-x86 architectures that default + to unsigned type char (-128..127 rather than 0..255) + #109 coverage.sh: Cover -funsigned-char + Autotools: Introduce --without-xmlwf argument + #65 Autotools: Replace handwritten Makefile with GNU Automake + #43 CMake: Auto-detect high quality entropy extractors, add new + option USE_libbsd=ON to use arc4random_buf of libbsd + #74 CMake: Add -fno-strict-aliasing only where supported + #114 CMake: Always honor manually set BUILD_* options + #114 CMake: Compile man page if docbook2x-man is available, only + #117 Include file tests/xmltest.log.expected in source tarball + (required for "make run-xmltest") + #117 Include (existing) Visual Studio 2013 files in source tarball + Improve test suite error output + #111 Fix some typos in documentation + Version info bumped from 7:5:6 to 7:6:6 + + Special thanks to: + Jakub Wilk + Joe Orton + Lin Tian + Rolf Eike Beer + +Release 2.2.3 Wed August 2 2017 + Security fixes: + #82 CVE-2017-11742 -- Windows: Fix DLL hijacking vulnerability + using Steve Holme's LoadLibrary wrapper for/of cURL + + Bug fixes: + #85 Fix a dangling pointer issue related to realloc + + Other changes: + Increase code coverage + #91 Linux: Allow getrandom to fail if nonblocking pool has not + yet been initialized and read /dev/urandom then, instead. + This is in line with what recent Python does. + #81 Pre-10.7/Lion macOS: Support entropy from arc4random + #86 Check that a UTF-16 encoding in an XML declaration has the + right endianness + #4 #5 #7 Recover correctly when some reallocations fail + Repair "./configure && make" for systems without any + provider of high quality entropy + and try reading /dev/urandom on those + Ensure that user-defined character encodings have converter + functions when they are needed + Fix mis-leading description of argument -c in xmlwf.1 + Rely on macro HAVE_ARC4RANDOM_BUF (rather than __CloudABI__) + for CloudABI + #100 Fix use of SIPHASH_MAIN in siphash.h + #23 Test suite: Fix memory leaks + Version info bumped from 7:4:6 to 7:5:6 + + Special thanks to: + Chanho Park + Joe Orton + Pascal Cuoq + Rhodri James + Simon McVittie + Vadim Zeitlin + Viktor Szakats + and + Core Infrastructure Initiative + +Release 2.2.2 Wed July 12 2017 + Security fixes: + #43 Protect against compilation without any source of high + quality entropy enabled, e.g. with CMake build system; + commit ff0207e6076e9828e536b8d9cd45c9c92069b895 + #60 Windows with _UNICODE: + Unintended use of LoadLibraryW with a non-wide string + resulted in failure to load advapi32.dll and degradation + in quality of used entropy when compiled with _UNICODE for + Windows; you can launch existing binaries with + EXPAT_ENTROPY_DEBUG=1 in the environment to inspect the + quality of entropy used during runtime; commits + * 95b95032f907ef1cd17ee7a9a1768010a825d61d + * 73a5a2e9c081f49f2d775cf7ced864158b68dc80 + [MOX-006] Fix non-NULL parser parameter validation in XML_Parse; + resulted in NULL dereference, previously; + commit ac256dafdffc9622ab0dc2c62fcecb0dfcfa71fe + + Bug fixes: + #69 Fix improper use of unsigned long long integer literals + + Other changes: + #73 Start requiring a C99 compiler + #49 Fix "==" Bashism in configure script + #50 Fix too eager getrandom detection for Debian GNU/kFreeBSD + #52 and macOS + #51 Address lack of stdint.h in Visual Studio 2003 to 2008 + #58 Address compile warnings + #68 Fix "./buildconf.sh && ./configure" for some versions + of Dash for /bin/sh + #72 CMake: Ease use of Expat in context of a parent project + with multiple CMakeLists.txt files + #72 CMake: Resolve mistaken executable permissions + #76 Address compile warning with -DNDEBUG (not recommended!) + #77 Address compile warning about macro redefinition + + Special thanks to: + Alexander Bluhm + Ben Boeckel + Cătălin Răceanu + Kerin Millar + László Böszörményi + S. P. Zeidler + Segev Finer + Václav Slavík + Victor Stinner + Viktor Szakats + and + Radically Open Security + +Release 2.2.1 Sat June 17 2017 + Security fixes: + CVE-2017-9233 -- External entity infinite loop DoS + Details: https://libexpat.github.io/doc/cve-2017-9233/ + Commit c4bf96bb51dd2a1b0e185374362ee136fe2c9d7f + [MOX-002] CVE-2016-9063 -- Detect integer overflow; commit + d4f735b88d9932bd5039df2335eefdd0723dbe20 + (Fixed version of existing downstream patches!) + (SF.net) #539 Fix regression from fix to CVE-2016-0718 cutting off + longer tag names; commits + * 896b6c1fd3b842f377d1b62135dccf0a579cf65d + * af507cef2c93cb8d40062a0abe43a4f4e9158fb2 + #16 * 0dbbf43fdb20f593ddf4fa1ff67288000dd4a7fd + #25 More integer overflow detection (function poolGrow); commits + * 810b74e4703dcfdd8f404e3cb177d44684775143 + * 44178553f3539ce69d34abee77a05e879a7982ac + [MOX-002] Detect overflow from len=INT_MAX call to XML_Parse; commits + * 4be2cb5afcc018d996f34bbbce6374b7befad47f + * 7e5b71b748491b6e459e5c9a1d090820f94544d8 + [MOX-005] #30 Use high quality entropy for hash initialization: + * arc4random_buf on BSD, systems with libbsd + (when configured with --with-libbsd), CloudABI + * RtlGenRandom on Windows XP / Server 2003 and later + * getrandom on Linux 3.17+ + In a way, that's still part of CVE-2016-5300. + https://github.com/libexpat/libexpat/pull/30/commits + [MOX-005] For the low quality entropy extraction fallback code, + the parser instance address can no longer leak, commit + 04ad658bd3079dd15cb60fc67087900f0ff4b083 + [MOX-003] Prevent use of uninitialised variable; commit + [MOX-004] a4dc944f37b664a3ca7199c624a98ee37babdb4b + Add missing parameter validation to public API functions + and dedicated error code XML_ERROR_INVALID_ARGUMENT: + [MOX-006] * NULL checks; commits + * d37f74b2b7149a3a95a680c4c4cd2a451a51d60a (merge/many) + * 9ed727064b675b7180c98cb3d4f75efba6966681 + * 6a747c837c50114dfa413994e07c0ba477be4534 + * Negative length (XML_Parse); commit + [MOX-002] 70db8d2538a10f4c022655d6895e4c3e78692e7f + [MOX-001] #35 Change hash algorithm to William Ahern's version of SipHash + to go further with fixing CVE-2012-0876. + https://github.com/libexpat/libexpat/pull/39/commits + + Bug fixes: + #32 Fix sharing of hash salt across parsers; + relevant where XML_ExternalEntityParserCreate is called + prior to XML_Parse, in particular (e.g. FBReader) + #28 xmlwf: Auto-disable use of memory-mapping (and parsing + as a single chunk) for files larger than ~1 GB (2^30 bytes) + rather than failing with error "out of memory" + #3 Fix double free after malloc failure in DTD code; commit + 7ae9c3d3af433cd4defe95234eae7dc8ed15637f + #17 Fix memory leak on parser error for unbound XML attribute + prefix with new namespaces defined in the same tag; + found by Google's OSS-Fuzz; commits + * 16f87daae5a16132e479e4f71862128c7a915c73 + * b47dbc9745932c160893d433220e462bd605f8cd + xmlwf on Windows: Add missing calls to CloseHandle + + New features: + #30 Introduced environment switch EXPAT_ENTROPY_DEBUG=1 + for runtime debugging of entropy extraction + + Other changes: + Increase code coverage + #33 Reject use of XML_UNICODE_WCHAR_T with sizeof(wchar_t) != 2; + XML_UNICODE_WCHAR_T was never meant to be used outside + of Windows; 4-byte wchar_t is common on Linux + (SF.net) #538 Start using -fno-strict-aliasing + (SF.net) #540 Support compilation against cloudlibc of CloudABI + Allow MinGW cross-compilation + (SF.net) #534 CMake: Introduce option "BUILD_doc" (enabled by default) + to bypass compilation of the xmlwf.1 man page + (SF.net) pr2 CMake: Introduce option "INSTALL" (enabled by default) + to bypass installation of expat files + CMake: Fix ninja support + Autotools: Add parameters --enable-xml-context [COUNT] + and --disable-xml-context; default of context of 1024 + bytes enabled unchanged + #14 Drop AmigaOS 4.x code and includes + #14 Drop ancient build systems: + * Borland C++ Builder + * OpenVMS + * Open Watcom + * Visual Studio 6.0 + * Pre-X Mac OS (MPW Makefile) + If you happen to rely on some of these, please get in + touch for joining with maintenance. + #10 Move from WIN32 to _WIN32 + #13 Fix "make run-xmltest" order instability + Address compile warnings + Bump version info from 7:2:6 to 7:3:6 + Add AUTHORS file + + Infrastructure: + #1 Migrate from SourceForge to GitHub (except downloads): + https://github.com/libexpat/ + #1 Re-create http://libexpat.org/ project website + Start utilizing Travis CI + + Special thanks to: + Andy Wang + Don Lewis + Ed Schouten + Karl Waclawek + Pascal Cuoq + Rhodri James + Sergei Nikulov + Tobias Taschner + Viktor Szakats + and + Core Infrastructure Initiative + Mozilla Foundation (MOSS Track 3: Secure Open Source) + Radically Open Security + +Release 2.2.0 Tue June 21 2016 + Security fixes: + #537 CVE-2016-0718 -- Fix crash on malformed input + CVE-2016-4472 -- Improve insufficient fix to CVE-2015-1283 / + CVE-2015-2716 introduced with Expat 2.1.1 + #499 CVE-2016-5300 -- Use more entropy for hash initialization + than the original fix to CVE-2012-0876 + #519 CVE-2012-6702 -- Resolve troublesome internal call to srand + that was introduced with Expat 2.1.0 + when addressing CVE-2012-0876 (issue #496) + + Bug fixes: + Fix uninitialized reads of size 1 + (e.g. in little2_updatePosition) + Fix detection of UTF-8 character boundaries + + Other changes: + #532 Fix compilation for Visual Studio 2010 (keyword "C99") + Autotools: Resolve use of "$<" to better support bmake + Autotools: Add QA script "qa.sh" (and make target "qa") + Autotools: Respect CXXFLAGS if given + Autotools: Fix "make run-xmltest" + Autotools: Have "make run-xmltest" check for expected output + p90 CMake: Fix static build (BUILD_shared=OFF) on Windows + #536 CMake: Add soversion, support -DNO_SONAME=yes to bypass + #323 CMake: Add suffix "d" to differentiate debug from release + CMake: Define WIN32 with CMake on Windows + Annotate memory allocators for GCC + Address all currently known compile warnings + Make sure that API symbols remain visible despite + -fvisibility=hidden + Remove executable flag from source files + Resolve COMPILED_FROM_DSP in favor of WIN32 + + Special thanks to: + Björn Lindahl + Christian Heimes + Cristian Rodríguez + Daniel Krügler + Gustavo Grieco + Karl Waclawek + László Böszörményi + Marco Grassi + Pascal Cuoq + Sergei Nikulov + Thomas Beutlich + Warren Young + Yann Droneaud + +Release 2.1.1 Sat March 12 2016 + Security fixes: + #582: CVE-2015-1283 - Multiple integer overflows in XML_GetBuffer + + Bug fixes: + #502: Fix potential null pointer dereference + #520: Symbol XML_SetHashSalt was not exported + Output of "xmlwf -h" was incomplete + + Other changes: + #503: Document behavior of calling XML_SetHashSalt with salt 0 + Minor improvements to man page xmlwf(1) + Improvements to the experimental CMake build system + libtool now invoked with --verbose + +Release 2.1.0 Sat March 24 2012 + - Security fixes: + #2958794: CVE-2012-1148 - Memory leak in poolGrow. + #2895533: CVE-2012-1147 - Resource leak in readfilemap.c. + #3496608: CVE-2012-0876 - Hash DOS attack. + #2894085: CVE-2009-3560 - Buffer over-read and crash in big2_toUtf8(). + #1990430: CVE-2009-3720 - Parser crash with special UTF-8 sequences. + - Bug Fixes: + #1742315: Harmful XML_ParserCreateNS suggestion. + #1785430: Expat build fails on linux-amd64 with gcc version>=4.1 -O3. + #1983953, 2517952, 2517962, 2649838: + Build modifications using autoreconf instead of buildconf.sh. + #2815947, #2884086: OBJEXT and EXEEXT support while building. + #2517938: xmlwf should return non-zero exit status if not well-formed. + #2517946: Wrong statement about XMLDecl in xmlwf.1 and xmlwf.sgml. + #2855609: Dangling positionPtr after error. + #2990652: CMake support. + #3010819: UNEXPECTED_STATE with a trailing "%" in entity value. + #3206497: Uninitialized memory returned from XML_Parse. + #3287849: make check fails on mingw-w64. + - Patches: + #1749198: pkg-config support. + #3010222: Fix for bug #3010819. + #3312568: CMake support. + #3446384: Report byte offsets for attr names and values. + - New Features / API changes: + Added new API member XML_SetHashSalt() that allows setting an initial + value (salt) for hash calculations. This is part of the fix for + bug #3496608 to randomize hash parameters. + When compiled with XML_ATTR_INFO defined, adds new API member + XML_GetAttributeInfo() that allows retrieving the byte + offsets for attribute names and values (patch #3446384). + Added CMake build system. + See bug #2990652 and patch #3312568. + Added run-benchmark target to Makefile.in - relies on testdata module + present in the same relative location as in the repository. + +Release 2.0.1 Tue June 5 2007 + - Fixed bugs #1515266, #1515600: The character data handler's calling + of XML_StopParser() was not handled properly; if the parser was + stopped and the handler set to NULL, the parser would segfault. + - Fixed bug #1690883: Expat failed on EBCDIC systems as it assumed + some character constants to be ASCII encoded. + - Minor cleanups of the test harness. + - Fixed xmlwf bug #1513566: "out of memory" error on file size zero. + - Fixed outline.c bug #1543233: missing a final XML_ParserFree() call. + - Fixes and improvements for Windows platform: + bugs #1409451, #1476160, #1548182, #1602769, #1717322. + - Build fixes for various platforms: + HP-UX, Tru64, Solaris 9: patch #1437840, bug #1196180. + All Unix: #1554618 (refreshed config.sub/config.guess). + #1490371, #1613457: support both, DESTDIR and INSTALL_ROOT, + without relying on GNU-Make specific features. + #1647805: Patched configure.in to work better with Intel compiler. + - Fixes to Makefile.in to have make check work correctly: + bugs #1408143, #1535603, #1536684. + - Added Open Watcom support: patch #1523242. + +Release 2.0.0 Wed Jan 11 2006 + - We no longer use the "check" library for C unit testing; we + always use the (partial) internal implementation of the API. + - Report XML_NS setting via XML_GetFeatureList(). + - Fixed headers for use from C++. + - XML_GetCurrentLineNumber() and XML_GetCurrentColumnNumber() + now return unsigned integers. + - Added XML_LARGE_SIZE switch to enable 64-bit integers for + byte indexes and line/column numbers. + - Updated to use libtool 1.5.22 (the most recent). + - Added support for AmigaOS. + - Some mostly minor bug fixes. SF issues include: #1006708, + #1021776, #1023646, #1114960, #1156398, #1221160, #1271642. + +Release 1.95.8 Fri Jul 23 2004 + - Major new feature: suspend/resume. Handlers can now request + that a parse be suspended for later resumption or aborted + altogether. See "Temporarily Stopping Parsing" in the + documentation for more details. + - Some mostly minor bug fixes, but compilation should no + longer generate warnings on most platforms. SF issues + include: #827319, #840173, #846309, #888329, #896188, #923913, + #928113, #961698, #985192. + +Release 1.95.7 Mon Oct 20 2003 + - Fixed enum XML_Status issue (reported on SourceForge many + times), so compilers that are properly picky will be happy. + - Introduced an XMLCALL macro to control the calling + convention used by the Expat API; this macro should be used + to annotate prototypes and definitions of callback + implementations in code compiled with a calling convention + other than the default convention for the host platform. + - Improved ability to build without the configure-generated + expat_config.h header. This is useful for applications + which embed Expat rather than linking in the library. + - Fixed a variety of bugs: see SF issues #458907, #609603, + #676844, #679754, #692878, #692964, #695401, #699323, #699487, + #820946. + - Improved hash table lookups. + - Added more regression tests and improved documentation. + +Release 1.95.6 Tue Jan 28 2003 + - Added XML_FreeContentModel(). + - Added XML_MemMalloc(), XML_MemRealloc(), XML_MemFree(). + - Fixed a variety of bugs: see SF issues #615606, #616863, + #618199, #653180, #673791. + - Enhanced the regression test suite. + - Man page improvements: includes SF issue #632146. + +Release 1.95.5 Fri Sep 6 2002 + - Added XML_UseForeignDTD() for improved SAX2 support. + - Added XML_GetFeatureList(). + - Defined XML_Bool type and the values XML_TRUE and XML_FALSE. + - Use an incomplete struct instead of a void* for the parser + (may not retain). + - Fixed UTF-8 decoding bug that caused legal UTF-8 to be rejected. + - Finally fixed bug where default handler would report DTD + events that were already handled by another handler. + Initial patch contributed by Darryl Miles. + - Removed unnecessary DllMain() function that caused static + linking into a DLL to be difficult. + - Added VC++ projects for building static libraries. + - Reduced line-length for all source code and headers to be + no longer than 80 characters, to help with AS/400 support. + - Reduced memory copying during parsing (SF patch #600964). + - Fixed a variety of bugs: see SF issues #580793, #434664, + #483514, #580503, #581069, #584041, #584183, #584832, #585537, + #596555, #596678, #598352, #598944, #599715, #600479, #600971. + +Release 1.95.4 Fri Jul 12 2002 + - Added support for VMS, contributed by Craig Berry. See + vms/README.vms for more information. + - Added Mac OS (classic) support, with a makefile for MPW, + contributed by Thomas Wegner and Daryle Walker. + - Added Borland C++ Builder 5 / BCC 5.5 support, contributed + by Patrick McConnell (SF patch #538032). + - Fixed a variety of bugs: see SF issues #441449, #563184, + #564342, #566334, #566901, #569461, #570263, #575168, #579196. + - Made skippedEntityHandler conform to SAX2 (see source comment) + - Re-implemented WFC: Entity Declared from XML 1.0 spec and + added a new error "entity declared in parameter entity": + see SF bug report #569461 and SF patch #578161 + - Re-implemented section 5.1 from XML 1.0 spec: + see SF bug report #570263 and SF patch #578161 + +Release 1.95.3 Mon Jun 3 2002 + - Added a project to the MSVC workspace to create a wchar_t + version of the library; the DLLs are named libexpatw.dll. + - Changed the name of the Windows DLLs from expat.dll to + libexpat.dll; this fixes SF bug #432456. + - Added the XML_ParserReset() API function. + - Fixed XML_SetReturnNSTriplet() to work for element names. + - Made the XML_UNICODE builds usable (thanks, Karl!). + - Allow xmlwf to read from standard input. + - Install a man page for xmlwf on Unix systems. + - Fixed many bugs; see SF bug reports #231864, #461380, #464837, + #466885, #469226, #477667, #484419, #487840, #494749, #496505, + #547350. Other bugs which we can't test as easily may also + have been fixed, especially in the area of build support. + +Release 1.95.2 Fri Jul 27 2001 + - More changes to make MSVC happy with the build; add a single + workspace to support both the library and xmlwf application. + - Added a Windows installer for Windows users; includes + xmlwf.exe. + - Added compile-time constants that can be used to determine the + Expat version + - Removed a lot of GNU-specific dependencies to aide portability + among the various Unix flavors. + - Fix the UTF-8 BOM bug. + - Cleaned up warning messages for several compilers. + - Added the -Wall, -Wstrict-prototypes options for GCC. + +Release 1.95.1 Sun Oct 22 15:11:36 EDT 2000 + - Changes to get expat to build under Microsoft compiler + - Removed all aborts and instead return an UNEXPECTED_STATE error. + - Fixed a bug where a stray '%' in an entity value would cause an + abort. + - Defined XML_SetEndNamespaceDeclHandler. Thanks to Darryl Miles for + finding this oversight. + - Changed default patterns in lib/Makefile.in to fit non-GNU makes + Thanks to robin@unrated.net for reporting and providing an + account to test on. + - The reference had the wrong label for XML_SetStartNamespaceDecl. + Reported by an anonymous user. + +Release 1.95.0 Fri Sep 29 2000 + - XML_ParserCreate_MM + Allows you to set a memory management suite to replace the + standard malloc,realloc, and free. + - XML_SetReturnNSTriplet + If you turn this feature on when namespace processing is in + effect, then qualified, prefixed element and attribute names + are returned as "uri|name|prefix" where '|' is whatever + separator character is used in namespace processing. + - Merged in features from perl-expat + o XML_SetElementDeclHandler + o XML_SetAttlistDeclHandler + o XML_SetXmlDeclHandler + o XML_SetEntityDeclHandler + o StartDoctypeDeclHandler takes 3 additional parameters: + sysid, pubid, has_internal_subset + o Many paired handler setters (like XML_SetElementHandler) + now have corresponding individual handler setters + o XML_GetInputContext for getting the input context of + the current parse position. + - Added reference material + - Packaged into a distribution that builds a sharable library diff --git a/git/mingw64/share/doc/git-doc/BreakingChanges.adoc b/git/mingw64/share/doc/git-doc/BreakingChanges.adoc new file mode 100644 index 0000000000000000000000000000000000000000..af59c43f42c8e684e8c689922b77a299f0d4177e --- /dev/null +++ b/git/mingw64/share/doc/git-doc/BreakingChanges.adoc @@ -0,0 +1,335 @@ += Upcoming breaking changes + +The Git project aims to ensure backwards compatibility to the best extent +possible. Minor releases will not break backwards compatibility unless there is +a very strong reason to do so, like for example a security vulnerability. + +Regardless of that, due to the age of the Git project, it is only natural to +accumulate a backlog of backwards-incompatible changes that will eventually be +required to keep the project aligned with a changing world. These changes fall +into several categories: + +* Changes to long established defaults. +* Concepts that have been replaced with a superior design. +* Concepts, commands, configuration or options that have been lacking in major + ways and that cannot be fixed and which will thus be removed without any + replacement. + +Explicitly not included in this list are fixes to minor bugs that may cause a +change in user-visible behavior. + +The Git project irregularly releases breaking versions that deliberately break +backwards compatibility with older versions. This is done to ensure that Git +remains relevant, safe and maintainable going forward. The release cadence of +breaking versions is typically measured in multiple years. We had the following +major breaking releases in the past: + +* Git 1.6.0, released in August 2008. +* Git 2.0, released in May 2014. + +We use . release numbers these days, starting from Git 2.0. For +future releases, our plan is to increment in the release number when we +make the next breaking release. Before Git 2.0, the release numbers were +1.. with the intention to increment for "usual" breaking +releases, reserving the jump to Git 2.0 for really large backward-compatibility +breaking changes. + +The intent of this document is to track upcoming deprecations for future +breaking releases. Furthermore, this document also tracks what will _not_ be +deprecated. This is done such that the outcome of discussions document both +when the discussion favors deprecation, but also when it rejects a deprecation. + +Items should have a clear summary of the reasons why we do or do not want to +make the described change that can be easily understood without having to read +the mailing list discussions. If there are alternatives to the changed feature, +those alternatives should be pointed out to our users. + +All items should be accompanied by references to relevant mailing list threads +where the deprecation was discussed. These references use message-IDs, which +can visited via + + https://lore.kernel.org/git/$message_id/ + +to see the message and its surrounding discussion. Such a reference is there to +make it easier for you to find how the project reached consensus on the +described item back then. + +This is a living document as the environment surrounding the project changes +over time. If circumstances change, an earlier decision to deprecate or change +something may need to be revisited from time to time. So do not take items on +this list to mean "it is settled, do not waste our time bringing it up again". + +== Procedure + +Discussing the desire to make breaking changes, declaring that breaking +changes are made at a certain version boundary, and recording these +decisions in this document, are necessary but not sufficient. +Because such changes are expected to be numerous, and the design and +implementation of them are expected to span over time, they have to +be deployable trivially at such a version boundary, prepared over long +time. + +The breaking changes MUST be guarded with the a compile-time switch, +WITH_BREAKING_CHANGES, to help this process. When built with it, +the resulting Git binary together with its documentation would +behave as if these breaking changes slated for the next big version +boundary are already in effect. We also have a CI job to exercise +the work-in-progress version of Git with these breaking changes. + + +== Git 3.0 + +The following subsections document upcoming breaking changes for Git 3.0. There +is no planned release date for this breaking version yet. + +Proposed changes and removals only include items which are "ready" to be done. +In other words, this is not supposed to be a wishlist of features that should +be changed to or replaced in case the alternative was implemented already. + +=== Changes + +* The default hash function for new repositories will be changed from "sha1" + to "sha256". SHA-1 has been deprecated by NIST in 2011 and is nowadays + recommended against in FIPS 140-2 and similar certifications. Furthermore, + there are practical attacks on SHA-1 that weaken its cryptographic properties: ++ + ** The SHAppening (2015). The first demonstration of a practical attack + against SHA-1 with 2^57 operations. + ** SHAttered (2017). Generation of two valid PDF files with 2^63 operations. + ** Birthday-Near-Collision (2019). This attack allows for chosen prefix + attacks with 2^68 operations. + ** Shambles (2020). This attack allows for chosen prefix attacks with 2^63 + operations. ++ +While we have protections in place against known attacks, it is expected +that more attacks against SHA-1 will be found by future research. Paired +with the ever-growing capability of hardware, it is only a matter of time +before SHA-1 will be considered broken completely. We want to be prepared +and will thus change the default hash algorithm to "sha256" for newly +initialized repositories. ++ +An important requirement for this change is that the ecosystem is ready to +support the "sha256" object format. This includes popular Git libraries, +applications and forges. ++ +There is no plan to deprecate the "sha1" object format at this point in time. ++ +Cf. <2f5de416-04ba-c23d-1e0b-83bb655829a7@zombino.com>, +<20170223155046.e7nxivfwqqoprsqj@LykOS.localdomain>, +. + +* The default storage format for references in newly created repositories will + be changed from "files" to "reftable". The "reftable" format provides + multiple advantages over the "files" format: ++ + ** It is impossible to store two references that only differ in casing on + case-insensitive filesystems with the "files" format. This issue is common + on Windows and macOS platforms. As the "reftable" backend does not use + filesystem paths to encode reference names this problem goes away. + ** Similarly, macOS normalizes path names that contain unicode characters, + which has the consequence that you cannot store two names with unicode + characters that are encoded differently with the "files" backend. Again, + this is not an issue with the "reftable" backend. + ** Deleting references with the "files" backend requires Git to rewrite the + complete "packed-refs" file. In large repositories with many references + this file can easily be dozens of megabytes in size, in extreme cases it + may be gigabytes. The "reftable" backend uses tombstone markers for + deleted references and thus does not have to rewrite all of its data. + ** Repository housekeeping with the "files" backend typically performs + all-into-one repacks of references. This can be quite expensive, and + consequently housekeeping is a tradeoff between the number of loose + references that accumulate and slow down operations that read references, + and compressing those loose references into the "packed-refs" file. The + "reftable" backend uses geometric compaction after every write, which + amortizes costs and ensures that the backend is always in a + well-maintained state. + ** Operations that write multiple references at once are not atomic with the + "files" backend. Consequently, Git may see in-between states when it reads + references while a reference transaction is in the process of being + committed to disk. + ** Writing many references at once is slow with the "files" backend because + every reference is created as a separate file. The "reftable" backend + significantly outperforms the "files" backend by multiple orders of + magnitude. + ** The reftable backend uses a binary format with prefix compression for + reference names. As a result, the format uses less space compared to the + "packed-refs" file. ++ +Users that get immediate benefit from the "reftable" backend could continue to +opt-in to the "reftable" format manually by setting the "init.defaultRefFormat" +config. But defaults matter, and we think that overall users will have a better +experience with less platform-specific quirks when they use the new backend by +default. ++ +A prerequisite for this change is that the ecosystem is ready to support the +"reftable" format. Most importantly, alternative implementations of Git like +JGit, libgit2 and Gitoxide need to support it. + +* In new repositories, the default branch name will be `main`. We have been + warning that the default name will change since 675704c74dd (init: + provide useful advice about init.defaultBranch, 2020-12-11). The new name + matches the default branch name used in new repositories by many of the + big Git forges. + +* Git will require Rust as a mandatory part of the build process. While Git + already started to adopt Rust in Git 2.49, all parts written in Rust are + optional for the time being. This includes: ++ + ** The Rust wrapper around libgit.a that is part of "contrib/" and which has + been introduced in Git 2.49. + ** Subsystems that have an alternative implementation in Rust to test + interoperability between our C and Rust codebase. + ** Newly written features that are not mission critical for a fully functional + Git client. ++ +These changes are meant as test balloons to allow distributors of Git to prepare +for Rust becoming a mandatory part of the build process. There will be multiple +milestones for the introduction of Rust: ++ +-- +1. Initially, with Git 2.52, support for Rust will be auto-detected by Meson and + disabled in our Makefile so that the project can sort out the initial + infrastructure. +2. In Git 2.55, both build systems will default-enable support for Rust. + Consequently, builds will break by default if Rust is not available on the + build host. The use of Rust can still be explicitly disabled via build + flags. +3. In Git 3.0, the build options will be removed and support for Rust is + mandatory. +-- ++ +You can explicitly ask both Meson and our Makefile-based system to enable Rust +by saying `meson configure -Drust=enabled` and `make WITH_RUST=YesPlease`, +respectively. ++ +The Git project will declare the last version before Git 3.0 to be a long-term +support release. This long-term release will receive important bug fixes for at +least four release cycles and security fixes for six release cycles. The Git +project will hand over maintainership of the long-term release to distributors +in case they need to extend the life of that long-term release even further. +Details of how this long-term release will be handed over to the community will +be discussed once the Git project decides to stop officially supporting it. ++ +We will evaluate the impact on downstream distributions before making Rust +mandatory in Git 3.0. If we see that the impact on downstream distributions +would be significant, we may decide to defer this change to a subsequent minor +release. This evaluation will also take into account our own experience with +how painful it is to keep Rust an optional component. + +=== Removals + +* Support for grafting commits has long been superseded by git-replace(1). + Grafts are inferior to replacement refs: ++ + ** Grafts are a local-only mechanism and cannot be shared across + repositories. + ** Grafts can lead to hard-to-diagnose problems when transferring objects + between repositories. ++ +The grafting mechanism has been marked as outdated since e650d0643b (docs: mark +info/grafts as outdated, 2014-03-05) and will be removed. ++ +Cf. <20140304174806.GA11561@sigill.intra.peff.net>. + +* The git-pack-redundant(1) command can be used to remove redundant pack files. + The subcommand is unusably slow and the reason why nobody reports it as a + performance bug is suspected to be the absence of users. We have nominated + the command for removal and have started to emit a user-visible warning in + c3b58472be (pack-redundant: gauge the usage before proposing its removal, + 2020-08-25) whenever the command is executed. ++ +So far there was a single complaint about somebody still using the command, but +that complaint did not cause us to reverse course. On the contrary, we have +doubled down on the deprecation and starting with 4406522b76 (pack-redundant: +escalate deprecation warning to an error, 2023-03-23), the command dies unless +the user passes the `--i-still-use-this` option. ++ +There have not been any subsequent complaints, so this command will finally be +removed. ++ +Cf. , + , + <20230323204047.GA9290@coredump.intra.peff.net>, + +* Support for storing shorthands for remote URLs in "$GIT_COMMON_DIR/branches/" + and "$GIT_COMMON_DIR/remotes/" has been long superseded by storing remotes in + the repository configuration. ++ +The mechanism has originally been introduced in f170e4b39d ([PATCH] fetch/pull: +short-hand notation for remote repositories., 2005-07-16) and was superseded by +6687f8fea2 ([PATCH] Use .git/remote/origin, not .git/branches/origin., +2005-08-20), where we switched from ".git/branches/" to ".git/remotes/". That +commit already mentions an upcoming deprecation of the ".git/branches/" +directory, and starting with a1d4aa7424 (Add repository-layout document., +2005-09-01) we have also marked this layout as deprecated. Eventually we also +started to migrate away from ".git/remotes/" in favor of config-based remotes, +and we have marked the directory as legacy in 3d3d282146 (Documentation: +Grammar correction, wording fixes and cleanup, 2011-08-23) ++ +As our documentation mentions, these directories are unlikely to be used in +modern repositories and most users aren't even aware of these mechanisms. They +have been deprecated for almost 20 years and 14 years respectively, and we are +not aware of any active users that have complained about this deprecation. +Furthermore, the ".git/branches/" directory is nowadays misleadingly named and +may cause confusion as "branches" are almost exclusively used in the context of +references. ++ +These features will be removed. + +* Support for "--stdin" option in the "name-rev" command was + deprecated (and hidden from the documentation) in the Git 2.40 + timeframe, in preference to its synonym "--annotate-stdin". Git 3.0 + removes the support for "--stdin" altogether. + +* The git-whatchanged(1) command has outlived its usefulness more than + 10 years ago, and takes more keystrokes to type than its rough + equivalent `git log --raw`. We have nominated the command for + removal, have changed the command to refuse to work unless the + `--i-still-use-this` option is given, and asked the users to report + when they do so. ++ +The command will be removed. + +* Support for `core.commentString=auto` has been deprecated and will + be removed in Git 3.0. ++ +cf. + +* Support for `core.preferSymlinkRefs=true` has been deprecated and will be + removed in Git 3.0. Writing symbolic refs as symbolic links will be phased + out in favor of using plain files using the textual representation of + symbolic refs. ++ +Symbolic references were initially always stored as a symbolic link. This was +changed in 9b143c6e15 (Teach update-ref about a symbolic ref stored in a +textfile., 2005-09-25), where a new textual symref format was introduced to +store those symbolic refs in a plain file. In 9f0bb90d16 +(core.prefersymlinkrefs: use symlinks for .git/HEAD, 2006-05-02), the Git +project switched the default to use the textual symrefs in favor of symbolic +links. ++ +The migration away from symbolic links has happened almost 20 years ago by now, +and there is no known reason why one should prefer them nowadays. Furthermore, +symbolic links are not supported on some platforms. ++ +Note that only the writing side for such symbolic links is deprecated. Reading +such symbolic links is still supported for now. + +== Superseded features that will not be deprecated + +Some features have gained newer replacements that aim to improve the design in +certain ways. The fact that there is a replacement does not automatically mean +that the old way of doing things will eventually be removed. This section tracks +those features with newer alternatives. + +* The features git-checkout(1) offers are covered by the pair of commands + git-restore(1) and git-switch(1). Because the use of git-checkout(1) is still + widespread, and it is not expected that this will change anytime soon, all + three commands will stay. ++ +This decision may get revisited in case we ever figure out that there are +almost no users of any of the commands anymore. ++ +Cf. , +, +<112b6568912a6de6672bf5592c3a718e@manjaro.org>. diff --git a/git/mingw64/share/doc/git-doc/BreakingChanges.html b/git/mingw64/share/doc/git-doc/BreakingChanges.html new file mode 100644 index 0000000000000000000000000000000000000000..3d78e9da4c3d32d3d3fba04628df38584a76ce5c --- /dev/null +++ b/git/mingw64/share/doc/git-doc/BreakingChanges.html @@ -0,0 +1,940 @@ + + + + + + + +Upcoming breaking changes + + + + + + +
+
+
+
+

The Git project aims to ensure backwards compatibility to the best extent +possible. Minor releases will not break backwards compatibility unless there is +a very strong reason to do so, like for example a security vulnerability.

+
+
+

Regardless of that, due to the age of the Git project, it is only natural to +accumulate a backlog of backwards-incompatible changes that will eventually be +required to keep the project aligned with a changing world. These changes fall +into several categories:

+
+
+
    +
  • +

    Changes to long established defaults.

    +
  • +
  • +

    Concepts that have been replaced with a superior design.

    +
  • +
  • +

    Concepts, commands, configuration or options that have been lacking in major +ways and that cannot be fixed and which will thus be removed without any +replacement.

    +
  • +
+
+
+

Explicitly not included in this list are fixes to minor bugs that may cause a +change in user-visible behavior.

+
+
+

The Git project irregularly releases breaking versions that deliberately break +backwards compatibility with older versions. This is done to ensure that Git +remains relevant, safe and maintainable going forward. The release cadence of +breaking versions is typically measured in multiple years. We had the following +major breaking releases in the past:

+
+
+
    +
  • +

    Git 1.6.0, released in August 2008.

    +
  • +
  • +

    Git 2.0, released in May 2014.

    +
  • +
+
+
+

We use <major>.<minor> release numbers these days, starting from Git 2.0. For +future releases, our plan is to increment <major> in the release number when we +make the next breaking release. Before Git 2.0, the release numbers were +1.<major>.<minor> with the intention to increment <major> for "usual" breaking +releases, reserving the jump to Git 2.0 for really large backward-compatibility +breaking changes.

+
+
+

The intent of this document is to track upcoming deprecations for future +breaking releases. Furthermore, this document also tracks what will not be +deprecated. This is done such that the outcome of discussions document both +when the discussion favors deprecation, but also when it rejects a deprecation.

+
+
+

Items should have a clear summary of the reasons why we do or do not want to +make the described change that can be easily understood without having to read +the mailing list discussions. If there are alternatives to the changed feature, +those alternatives should be pointed out to our users.

+
+
+

All items should be accompanied by references to relevant mailing list threads +where the deprecation was discussed. These references use message-IDs, which +can visited via

+
+
+
+
https://lore.kernel.org/git/$message_id/
+
+
+
+

to see the message and its surrounding discussion. Such a reference is there to +make it easier for you to find how the project reached consensus on the +described item back then.

+
+
+

This is a living document as the environment surrounding the project changes +over time. If circumstances change, an earlier decision to deprecate or change +something may need to be revisited from time to time. So do not take items on +this list to mean "it is settled, do not waste our time bringing it up again".

+
+
+
+
+

Procedure

+
+
+

Discussing the desire to make breaking changes, declaring that breaking +changes are made at a certain version boundary, and recording these +decisions in this document, are necessary but not sufficient. +Because such changes are expected to be numerous, and the design and +implementation of them are expected to span over time, they have to +be deployable trivially at such a version boundary, prepared over long +time.

+
+
+

The breaking changes MUST be guarded with the a compile-time switch, +WITH_BREAKING_CHANGES, to help this process. When built with it, +the resulting Git binary together with its documentation would +behave as if these breaking changes slated for the next big version +boundary are already in effect. We also have a CI job to exercise +the work-in-progress version of Git with these breaking changes.

+
+
+
+
+

Git 3.0

+
+
+

The following subsections document upcoming breaking changes for Git 3.0. There +is no planned release date for this breaking version yet.

+
+
+

Proposed changes and removals only include items which are "ready" to be done. +In other words, this is not supposed to be a wishlist of features that should +be changed to or replaced in case the alternative was implemented already.

+
+
+

Changes

+
+
    +
  • +

    The default hash function for new repositories will be changed from "sha1" +to "sha256". SHA-1 has been deprecated by NIST in 2011 and is nowadays +recommended against in FIPS 140-2 and similar certifications. Furthermore, +there are practical attacks on SHA-1 that weaken its cryptographic properties:

    +
    +
      +
    • +

      The SHAppening (2015). The first demonstration of a practical attack +against SHA-1 with 2^57 operations.

      +
    • +
    • +

      SHAttered (2017). Generation of two valid PDF files with 2^63 operations.

      +
    • +
    • +

      Birthday-Near-Collision (2019). This attack allows for chosen prefix +attacks with 2^68 operations.

      +
    • +
    • +

      Shambles (2020). This attack allows for chosen prefix attacks with 2^63 +operations.

      +
      +

      While we have protections in place against known attacks, it is expected +that more attacks against SHA-1 will be found by future research. Paired +with the ever-growing capability of hardware, it is only a matter of time +before SHA-1 will be considered broken completely. We want to be prepared +and will thus change the default hash algorithm to "sha256" for newly +initialized repositories.

      +
      +
      +

      An important requirement for this change is that the ecosystem is ready to +support the "sha256" object format. This includes popular Git libraries, +applications and forges.

      +
      +
      +

      There is no plan to deprecate the "sha1" object format at this point in time.

      +
      +
      +

      Cf. <2f5de416-04ba-c23d-1e0b-83bb655829a7@zombino.com>, +<20170223155046.e7nxivfwqqoprsqj@LykOS.localdomain>, +<CA+EOSBncr=4a4d8n9xS4FNehyebpmX8JiUwCsXD47EQDE+DiUQ@mail.gmail.com>.

      +
      +
    • +
    +
    +
  • +
  • +

    The default storage format for references in newly created repositories will +be changed from "files" to "reftable". The "reftable" format provides +multiple advantages over the "files" format:

    +
    +
      +
    • +

      It is impossible to store two references that only differ in casing on +case-insensitive filesystems with the "files" format. This issue is common +on Windows and macOS platforms. As the "reftable" backend does not use +filesystem paths to encode reference names this problem goes away.

      +
    • +
    • +

      Similarly, macOS normalizes path names that contain unicode characters, +which has the consequence that you cannot store two names with unicode +characters that are encoded differently with the "files" backend. Again, +this is not an issue with the "reftable" backend.

      +
    • +
    • +

      Deleting references with the "files" backend requires Git to rewrite the +complete "packed-refs" file. In large repositories with many references +this file can easily be dozens of megabytes in size, in extreme cases it +may be gigabytes. The "reftable" backend uses tombstone markers for +deleted references and thus does not have to rewrite all of its data.

      +
    • +
    • +

      Repository housekeeping with the "files" backend typically performs +all-into-one repacks of references. This can be quite expensive, and +consequently housekeeping is a tradeoff between the number of loose +references that accumulate and slow down operations that read references, +and compressing those loose references into the "packed-refs" file. The +"reftable" backend uses geometric compaction after every write, which +amortizes costs and ensures that the backend is always in a +well-maintained state.

      +
    • +
    • +

      Operations that write multiple references at once are not atomic with the +"files" backend. Consequently, Git may see in-between states when it reads +references while a reference transaction is in the process of being +committed to disk.

      +
    • +
    • +

      Writing many references at once is slow with the "files" backend because +every reference is created as a separate file. The "reftable" backend +significantly outperforms the "files" backend by multiple orders of +magnitude.

      +
    • +
    • +

      The reftable backend uses a binary format with prefix compression for +reference names. As a result, the format uses less space compared to the +"packed-refs" file.

      +
      +

      Users that get immediate benefit from the "reftable" backend could continue to +opt-in to the "reftable" format manually by setting the "init.defaultRefFormat" +config. But defaults matter, and we think that overall users will have a better +experience with less platform-specific quirks when they use the new backend by +default.

      +
      +
      +

      A prerequisite for this change is that the ecosystem is ready to support the +"reftable" format. Most importantly, alternative implementations of Git like +JGit, libgit2 and Gitoxide need to support it.

      +
      +
    • +
    +
    +
  • +
  • +

    In new repositories, the default branch name will be main. We have been +warning that the default name will change since 675704c74dd (init: +provide useful advice about init.defaultBranch, 2020-12-11). The new name +matches the default branch name used in new repositories by many of the +big Git forges.

    +
  • +
  • +

    Git will require Rust as a mandatory part of the build process. While Git +already started to adopt Rust in Git 2.49, all parts written in Rust are +optional for the time being. This includes:

    +
    +
      +
    • +

      The Rust wrapper around libgit.a that is part of "contrib/" and which has +been introduced in Git 2.49.

      +
    • +
    • +

      Subsystems that have an alternative implementation in Rust to test +interoperability between our C and Rust codebase.

      +
    • +
    • +

      Newly written features that are not mission critical for a fully functional +Git client.

      +
      +

      These changes are meant as test balloons to allow distributors of Git to prepare +for Rust becoming a mandatory part of the build process. There will be multiple +milestones for the introduction of Rust:

      +
      +
      +
      +
      +
        +
      1. +

        Initially, with Git 2.52, support for Rust will be auto-detected by Meson and +disabled in our Makefile so that the project can sort out the initial +infrastructure.

        +
      2. +
      3. +

        In Git 2.55, both build systems will default-enable support for Rust. +Consequently, builds will break by default if Rust is not available on the +build host. The use of Rust can still be explicitly disabled via build +flags.

        +
      4. +
      5. +

        In Git 3.0, the build options will be removed and support for Rust is +mandatory.

        +
      6. +
      +
      +
      +
      +
      +

      You can explicitly ask both Meson and our Makefile-based system to enable Rust +by saying meson configure -Drust=enabled and make WITH_RUST=YesPlease, +respectively.

      +
      +
      +

      The Git project will declare the last version before Git 3.0 to be a long-term +support release. This long-term release will receive important bug fixes for at +least four release cycles and security fixes for six release cycles. The Git +project will hand over maintainership of the long-term release to distributors +in case they need to extend the life of that long-term release even further. +Details of how this long-term release will be handed over to the community will +be discussed once the Git project decides to stop officially supporting it.

      +
      +
      +

      We will evaluate the impact on downstream distributions before making Rust +mandatory in Git 3.0. If we see that the impact on downstream distributions +would be significant, we may decide to defer this change to a subsequent minor +release. This evaluation will also take into account our own experience with +how painful it is to keep Rust an optional component.

      +
      +
    • +
    +
    +
  • +
+
+
+
+

Removals

+
+
    +
  • +

    Support for grafting commits has long been superseded by git-replace(1). +Grafts are inferior to replacement refs:

    +
    +
      +
    • +

      Grafts are a local-only mechanism and cannot be shared across +repositories.

      +
    • +
    • +

      Grafts can lead to hard-to-diagnose problems when transferring objects +between repositories.

      +
      +

      The grafting mechanism has been marked as outdated since e650d0643b (docs: mark +info/grafts as outdated, 2014-03-05) and will be removed.

      +
      + +
    • +
    +
    +
  • +
  • +

    The git-pack-redundant(1) command can be used to remove redundant pack files. +The subcommand is unusably slow and the reason why nobody reports it as a +performance bug is suspected to be the absence of users. We have nominated +the command for removal and have started to emit a user-visible warning in +c3b58472be (pack-redundant: gauge the usage before proposing its removal, +2020-08-25) whenever the command is executed.

    +
    +

    So far there was a single complaint about somebody still using the command, but +that complaint did not cause us to reverse course. On the contrary, we have +doubled down on the deprecation and starting with 4406522b76 (pack-redundant: +escalate deprecation warning to an error, 2023-03-23), the command dies unless +the user passes the --i-still-use-this option.

    +
    +
    +

    There have not been any subsequent complaints, so this command will finally be +removed.

    +
    + +
  • +
  • +

    Support for storing shorthands for remote URLs in "$GIT_COMMON_DIR/branches/" +and "$GIT_COMMON_DIR/remotes/" has been long superseded by storing remotes in +the repository configuration.

    +
    +

    The mechanism has originally been introduced in f170e4b39d ([PATCH] fetch/pull: +short-hand notation for remote repositories., 2005-07-16) and was superseded by +6687f8fea2 ([PATCH] Use .git/remote/origin, not .git/branches/origin., +2005-08-20), where we switched from ".git/branches/" to ".git/remotes/". That +commit already mentions an upcoming deprecation of the ".git/branches/" +directory, and starting with a1d4aa7424 (Add repository-layout document., +2005-09-01) we have also marked this layout as deprecated. Eventually we also +started to migrate away from ".git/remotes/" in favor of config-based remotes, +and we have marked the directory as legacy in 3d3d282146 (Documentation: +Grammar correction, wording fixes and cleanup, 2011-08-23)

    +
    +
    +

    As our documentation mentions, these directories are unlikely to be used in +modern repositories and most users aren’t even aware of these mechanisms. They +have been deprecated for almost 20 years and 14 years respectively, and we are +not aware of any active users that have complained about this deprecation. +Furthermore, the ".git/branches/" directory is nowadays misleadingly named and +may cause confusion as "branches" are almost exclusively used in the context of +references.

    +
    +
    +

    These features will be removed.

    +
    +
  • +
  • +

    Support for "--stdin" option in the "name-rev" command was +deprecated (and hidden from the documentation) in the Git 2.40 +timeframe, in preference to its synonym "--annotate-stdin". Git 3.0 +removes the support for "--stdin" altogether.

    +
  • +
  • +

    The git-whatchanged(1) command has outlived its usefulness more than +10 years ago, and takes more keystrokes to type than its rough +equivalent git log --raw. We have nominated the command for +removal, have changed the command to refuse to work unless the +--i-still-use-this option is given, and asked the users to report +when they do so.

    +
    +

    The command will be removed.

    +
    +
  • +
  • +

    Support for core.commentString=auto has been deprecated and will +be removed in Git 3.0.

    +
    +

    cf. <xmqqa59i45wc.fsf@gitster.g>

    +
    +
  • +
  • +

    Support for core.preferSymlinkRefs=true has been deprecated and will be +removed in Git 3.0. Writing symbolic refs as symbolic links will be phased +out in favor of using plain files using the textual representation of +symbolic refs.

    +
    +

    Symbolic references were initially always stored as a symbolic link. This was +changed in 9b143c6e15 (Teach update-ref about a symbolic ref stored in a +textfile., 2005-09-25), where a new textual symref format was introduced to +store those symbolic refs in a plain file. In 9f0bb90d16 +(core.prefersymlinkrefs: use symlinks for .git/HEAD, 2006-05-02), the Git +project switched the default to use the textual symrefs in favor of symbolic +links.

    +
    +
    +

    The migration away from symbolic links has happened almost 20 years ago by now, +and there is no known reason why one should prefer them nowadays. Furthermore, +symbolic links are not supported on some platforms.

    +
    +
    +

    Note that only the writing side for such symbolic links is deprecated. Reading +such symbolic links is still supported for now.

    +
    +
  • +
+
+
+
+
+
+

Superseded features that will not be deprecated

+
+
+

Some features have gained newer replacements that aim to improve the design in +certain ways. The fact that there is a replacement does not automatically mean +that the old way of doing things will eventually be removed. This section tracks +those features with newer alternatives.

+
+
+
    +
  • +

    The features git-checkout(1) offers are covered by the pair of commands +git-restore(1) and git-switch(1). Because the use of git-checkout(1) is still +widespread, and it is not expected that this will change anytime soon, all +three commands will stay.

    +
    +

    This decision may get revisited in case we ever figure out that there are +almost no users of any of the commands anymore.

    +
    +
    +

    Cf. <xmqqttjazwwa.fsf@gitster.g>, +<xmqqleeubork.fsf@gitster.g>, +<112b6568912a6de6672bf5592c3a718e@manjaro.org>.

    +
    +
  • +
+
+
+
+
+ + + \ No newline at end of file diff --git a/git/mingw64/share/doc/git-doc/DecisionMaking.adoc b/git/mingw64/share/doc/git-doc/DecisionMaking.adoc new file mode 100644 index 0000000000000000000000000000000000000000..b43c472ae598ed8bf5b057a5b2beb7e1b5eecc5f --- /dev/null +++ b/git/mingw64/share/doc/git-doc/DecisionMaking.adoc @@ -0,0 +1,74 @@ +Decision-Making Process in the Git Project +========================================== + +Introduction +------------ +This document describes the current decision-making process in the Git +project. It is a descriptive rather than prescriptive doc; that is, we want to +describe how things work in practice rather than explicitly recommending any +particular process or changes to the current process. + +Here we document how the project makes decisions for discussions +(with or without patches), in scale larger than an individual patch +series (which is fully covered by the SubmittingPatches document). + + +Larger Discussions (with patches) +--------------------------------- +As with discussions on an individual patch series, starting a larger-scale +discussion often begins by sending a patch or series to the list. This might +take the form of an initial design doc, with implementation following in later +iterations of the series (for example, +link:https://lore.kernel.org/git/0169ce6fb9ccafc089b74ae406db0d1a8ff8ac65.1688165272.git.steadmon@google.com/[adding unit tests] or +link:https://lore.kernel.org/git/20200420235310.94493-1-emilyshaffer@google.com/[config-based hooks]), +or it might include a full implementation from the beginning. +In either case, discussion progresses the same way for an individual patch series, +until consensus is reached or the topic is dropped. + + +Larger Discussions (without patches) +------------------------------------ +Occasionally, larger discussions might occur without an associated patch series. +These may be very large-scale technical decisions that are beyond the scope of +even a single large patch series, or they may be more open-ended, +policy-oriented discussions (examples: +link:https://lore.kernel.org/git/ZZ77NQkSuiRxRDwt@nand.local/[introducing Rust] +or link:https://lore.kernel.org/git/YHofmWcIAidkvJiD@google.com/[improving submodule UX]). +In either case, discussion progresses as described above for general patch series. + +For larger discussions without a patch series or other concrete implementation, +it may be hard to judge when consensus has been reached, as there are not any +official guidelines. If discussion stalls at this point, it may be helpful to +restart discussion with an RFC patch series (such as a partial, unfinished +implementation or proof of concept) that can be more easily debated. + +When consensus is reached that it is a good idea, the original +proposer is expected to coordinate the effort to make it happen, +with help from others who were involved in the discussion, as +needed. + +For decisions that require code changes, it is often the case that the original +proposer will follow up with a patch series, although it is also common for +other interested parties to provide an implementation (or parts of the +implementation, for very large changes). + +For non-technical decisions such as community norms or processes, it is up to +the community as a whole to implement and sustain agreed-upon changes. +The project leadership committee (PLC) may help the implementation of +policy decisions. + + +Other Discussion Venues +----------------------- +Occasionally decision proposals are presented off-list, e.g. at the semi-regular +Contributors' Summit. While higher-bandwidth face-to-face discussion is often +useful for quickly reaching consensus among attendees, generally we expect to +summarize the discussion in notes that can later be presented on-list. For an +example, see the thread +link:https://lore.kernel.org/git/AC2EB721-2979-43FD-922D-C5076A57F24B@jramsay.com.au/[Notes +from Git Contributor Summit, Los Angeles (April 5, 2020)] by James Ramsay. + +We prefer that "official" discussion happens on the list so that the full +community has opportunity to engage in discussion. This also means that the +mailing list archives contain a more-or-less complete history of project +discussions and decisions. diff --git a/git/mingw64/share/doc/git-doc/DecisionMaking.html b/git/mingw64/share/doc/git-doc/DecisionMaking.html new file mode 100644 index 0000000000000000000000000000000000000000..a32fef974b5ddf17260d50da3dd91c4cf73d1e5b --- /dev/null +++ b/git/mingw64/share/doc/git-doc/DecisionMaking.html @@ -0,0 +1,545 @@ + + + + + + + +Decision-Making Process in the Git Project + + + + + + +
+
+

Introduction

+
+
+

This document describes the current decision-making process in the Git +project. It is a descriptive rather than prescriptive doc; that is, we want to +describe how things work in practice rather than explicitly recommending any +particular process or changes to the current process.

+
+
+

Here we document how the project makes decisions for discussions +(with or without patches), in scale larger than an individual patch +series (which is fully covered by the SubmittingPatches document).

+
+
+
+
+

Larger Discussions (with patches)

+
+
+

As with discussions on an individual patch series, starting a larger-scale +discussion often begins by sending a patch or series to the list. This might +take the form of an initial design doc, with implementation following in later +iterations of the series (for example, +adding unit tests or +config-based hooks), +or it might include a full implementation from the beginning. +In either case, discussion progresses the same way for an individual patch series, +until consensus is reached or the topic is dropped.

+
+
+
+
+

Larger Discussions (without patches)

+
+
+

Occasionally, larger discussions might occur without an associated patch series. +These may be very large-scale technical decisions that are beyond the scope of +even a single large patch series, or they may be more open-ended, +policy-oriented discussions (examples: +introducing Rust +or improving submodule UX). +In either case, discussion progresses as described above for general patch series.

+
+
+

For larger discussions without a patch series or other concrete implementation, +it may be hard to judge when consensus has been reached, as there are not any +official guidelines. If discussion stalls at this point, it may be helpful to +restart discussion with an RFC patch series (such as a partial, unfinished +implementation or proof of concept) that can be more easily debated.

+
+
+

When consensus is reached that it is a good idea, the original +proposer is expected to coordinate the effort to make it happen, +with help from others who were involved in the discussion, as +needed.

+
+
+

For decisions that require code changes, it is often the case that the original +proposer will follow up with a patch series, although it is also common for +other interested parties to provide an implementation (or parts of the +implementation, for very large changes).

+
+
+

For non-technical decisions such as community norms or processes, it is up to +the community as a whole to implement and sustain agreed-upon changes. +The project leadership committee (PLC) may help the implementation of +policy decisions.

+
+
+
+
+

Other Discussion Venues

+
+
+

Occasionally decision proposals are presented off-list, e.g. at the semi-regular +Contributors' Summit. While higher-bandwidth face-to-face discussion is often +useful for quickly reaching consensus among attendees, generally we expect to +summarize the discussion in notes that can later be presented on-list. For an +example, see the thread +Notes +from Git Contributor Summit, Los Angeles (April 5, 2020) by James Ramsay.

+
+
+

We prefer that "official" discussion happens on the list so that the full +community has opportunity to engage in discussion. This also means that the +mailing list archives contain a more-or-less complete history of project +discussions and decisions.

+
+
+
+
+ + + \ No newline at end of file diff --git a/git/mingw64/share/doc/git-doc/blame-options.adoc b/git/mingw64/share/doc/git-doc/blame-options.adoc new file mode 100644 index 0000000000000000000000000000000000000000..1ae1222b6b5ffa2a87fa9d98deb7bf4849d22535 --- /dev/null +++ b/git/mingw64/share/doc/git-doc/blame-options.adoc @@ -0,0 +1,151 @@ +`-b`:: + Show blank SHA-1 for boundary commits. This can also + be controlled via the `blame.blankBoundary` config option. + +`--root`:: + Do not treat root commits as boundaries. This can also be + controlled via the `blame.showRoot` config option. + +`--show-stats`:: + Include additional statistics at the end of blame output. + +`-L ,`:: +`-L :`:: + Annotate only the line range given by `,`, + or by the function name regex __. + May be specified multiple times. Overlapping ranges are allowed. ++ +__ and __ are optional. `-L ` or `-L ,` spans from +__ to end of file. `-L ,` spans from start of file to __. ++ +include::line-range-format.adoc[] + +`-l`:: + Show long rev (Default: off). + +`-t`:: + Show raw timestamp (Default: off). + +`-S `:: + Use revisions from __ instead of calling + linkgit:git-rev-list[1]. + +`--reverse ..`:: + Walk history forward instead of backward. Instead of showing + the revision in which a line appeared, this shows the last + revision in which a line has existed. This requires a range of + revision like `..` where the path to blame exists in + __. `git blame --reverse ` is taken as `git blame + --reverse ..HEAD` for convenience. + +`--first-parent`:: + Follow only the first parent commit upon seeing a merge + commit. This option can be used to determine when a line + was introduced to a particular integration branch, rather + than when it was introduced to the history overall. + +`-p`:: +`--porcelain`:: + Show in a format designed for machine consumption. + +`--line-porcelain`:: + Show the porcelain format, but output commit information for + each line, not just the first time a commit is referenced. + Implies `--porcelain`. + +`--incremental`:: + Show the result incrementally in a format designed for + machine consumption. + +`--encoding=`:: + Specify the encoding used to output author names + and commit summaries. Setting it to `none` makes blame + output unconverted data. For more information see the + discussion about encoding in the linkgit:git-log[1] + manual page. + +`--contents `:: + Annotate using the contents from __, starting from __ + if it is specified, and `HEAD` otherwise. You may specify `-` to make + the command read from the standard input for the file contents. + +`--date `:: + Specify the format used to output dates. If `--date` is not + provided, the value of the `blame.date` config variable is + used. If the `blame.date` config variable is also not set, the + iso format is used. For supported values, see the discussion + of the `--date` option at linkgit:git-log[1]. + +`--progress`:: +`--no-progress`:: + Enable progress reporting on the standard error stream even if + not attached to a terminal. By default, progress status is + reported only when it is attached. You can't use `--progress` + together with `--porcelain` or `--incremental`. + +`-M[]`:: + Detect moved or copied lines within a file. When a commit + moves or copies a block of lines (e.g. the original file + has _A_ and then _B_, and the commit changes it to _B_ and then + _A_), the traditional `blame` algorithm notices only half of + the movement and typically blames the lines that were moved + up (i.e. _B_) to the parent and assigns blame to the lines that + were moved down (i.e. _A_) to the child commit. With this + option, both groups of lines are blamed on the parent by + running extra passes of inspection. ++ +__ is optional, but it is the lower bound on the number of +alphanumeric characters that Git must detect as moving/copying +within a file for it to associate those lines with the parent +commit. The default value is 20. + +`-C[]`:: + In addition to `-M`, detect lines moved or copied from other + files that were modified in the same commit. This is + useful when you reorganize your program and move code + around across files. When this option is given twice, + the command additionally looks for copies from other + files in the commit that creates the file. When this + option is given three times, the command additionally + looks for copies from other files in any commit. ++ +__ is optional, but it is the lower bound on the number of +alphanumeric characters that Git must detect as moving/copying +between files for it to associate those lines with the parent +commit. And the default value is 40. If there are more than one +`-C` options given, the __ argument of the last `-C` will +take effect. + +`--ignore-rev `:: + Ignore changes made by the revision when assigning blame, as if the + change never happened. Lines that were changed or added by an ignored + commit will be blamed on the previous commit that changed that line or + nearby lines. This option may be specified multiple times to ignore + more than one revision. If the `blame.markIgnoredLines` config option + is set, then lines that were changed by an ignored commit and attributed to + another commit will be marked with a `?` in the blame output. If the + `blame.markUnblamableLines` config option is set, then those lines touched + by an ignored commit that we could not attribute to another revision are + marked with a `*`. In the porcelain modes, we print `ignored` and + `unblamable` on a newline respectively. + +`--ignore-revs-file `:: + Ignore revisions listed in __, which must be in the same format as an + `fsck.skipList`. This option may be repeated, and these files will be + processed after any files specified with the `blame.ignoreRevsFile` config + option. An empty file name, `""`, will clear the list of revs from + previously processed files. + +`--color-lines`:: + Color line annotations in the default format differently if they come from + the same commit as the preceding line. This makes it easier to distinguish + code blocks introduced by different commits. The color defaults to cyan and + can be adjusted using the `color.blame.repeatedLines` config option. + +`--color-by-age`:: + Color line annotations depending on the age of the line in + the default format. The `color.blame.highlightRecent` config + option controls what color is used for each range of age. + +`-h`:: + Show help message. diff --git a/git/mingw64/share/doc/git-doc/cmds-ancillaryinterrogators.adoc b/git/mingw64/share/doc/git-doc/cmds-ancillaryinterrogators.adoc new file mode 100644 index 0000000000000000000000000000000000000000..f13a36172381dc04980875b7bd25ecfb94a4688e --- /dev/null +++ b/git/mingw64/share/doc/git-doc/cmds-ancillaryinterrogators.adoc @@ -0,0 +1,51 @@ +linkgit:git-annotate[1]:: + Annotate file lines with commit information. + +linkgit:git-blame[1]:: + Show what revision and author last modified each line of a file. + +linkgit:git-bugreport[1]:: + Collect information for user to file a bug report. + +linkgit:git-count-objects[1]:: + Count unpacked number of objects and their disk consumption. + +linkgit:git-diagnose[1]:: + Generate a zip archive of diagnostic information. + +linkgit:git-difftool[1]:: + Show changes using common diff tools. + +linkgit:git-fsck[1]:: + Verifies the connectivity and validity of the objects in the database. + +linkgit:git-help[1]:: + Display help information about Git. + +linkgit:git-instaweb[1]:: + Instantly browse your working repository in gitweb. + +linkgit:git-merge-tree[1]:: + Perform merge without touching index or working tree. + +linkgit:git-rerere[1]:: + Reuse recorded resolution of conflicted merges. + +linkgit:git-show-branch[1]:: + Show branches and their commits. + +linkgit:git-verify-commit[1]:: + Check the GPG signature of commits. + +linkgit:git-verify-tag[1]:: + Check the GPG signature of tags. + +linkgit:git-version[1]:: + Display version information about Git. + +linkgit:git-whatchanged[1]:: + Show logs with differences each commit introduces. + +linkgit:gitweb[1]:: + Git web interface (web frontend to Git repositories). + diff --git a/git/mingw64/share/doc/git-doc/cmds-ancillarymanipulators.adoc b/git/mingw64/share/doc/git-doc/cmds-ancillarymanipulators.adoc new file mode 100644 index 0000000000000000000000000000000000000000..6fa09e20aedd5af2708613e60abe5ca62b668395 --- /dev/null +++ b/git/mingw64/share/doc/git-doc/cmds-ancillarymanipulators.adoc @@ -0,0 +1,36 @@ +linkgit:git-config[1]:: + Get and set repository or global options. + +linkgit:git-fast-export[1]:: + Git data exporter. + +linkgit:git-fast-import[1]:: + Backend for fast Git data importers. + +linkgit:git-filter-branch[1]:: + Rewrite branches. + +linkgit:git-mergetool[1]:: + Run merge conflict resolution tools to resolve merge conflicts. + +linkgit:git-pack-refs[1]:: + Pack heads and tags for efficient repository access. + +linkgit:git-prune[1]:: + Prune all unreachable objects from the object database. + +linkgit:git-reflog[1]:: + Manage reflog information. + +linkgit:git-refs[1]:: + Low-level access to refs. + +linkgit:git-remote[1]:: + Manage set of tracked repositories. + +linkgit:git-repack[1]:: + Pack unpacked objects in a repository. + +linkgit:git-replace[1]:: + Create, list, delete refs to replace objects. + diff --git a/git/mingw64/share/doc/git-doc/cmds-developerinterfaces.adoc b/git/mingw64/share/doc/git-doc/cmds-developerinterfaces.adoc new file mode 100644 index 0000000000000000000000000000000000000000..810ebe5a1793f07eb4c3a72657b5226ac12730cf --- /dev/null +++ b/git/mingw64/share/doc/git-doc/cmds-developerinterfaces.adoc @@ -0,0 +1,33 @@ +linkgit:gitformat-bundle[5]:: + The bundle file format. + +linkgit:gitformat-chunk[5]:: + Chunk-based file formats. + +linkgit:gitformat-commit-graph[5]:: + Git commit-graph format. + +linkgit:gitformat-index[5]:: + Git index format. + +linkgit:gitformat-pack[5]:: + Git pack format. + +linkgit:gitformat-signature[5]:: + Git cryptographic signature formats. + +linkgit:gitprotocol-capabilities[5]:: + Protocol v0 and v1 capabilities. + +linkgit:gitprotocol-common[5]:: + Things common to various protocols. + +linkgit:gitprotocol-http[5]:: + Git HTTP-based protocols. + +linkgit:gitprotocol-pack[5]:: + How packs are transferred over-the-wire. + +linkgit:gitprotocol-v2[5]:: + Git Wire Protocol, Version 2. + diff --git a/git/mingw64/share/doc/git-doc/cmds-foreignscminterface.adoc b/git/mingw64/share/doc/git-doc/cmds-foreignscminterface.adoc new file mode 100644 index 0000000000000000000000000000000000000000..29236a05844b79c18c48f461012a63f680356da7 --- /dev/null +++ b/git/mingw64/share/doc/git-doc/cmds-foreignscminterface.adoc @@ -0,0 +1,30 @@ +linkgit:git-archimport[1]:: + Import a GNU Arch repository into Git. + +linkgit:git-cvsexportcommit[1]:: + Export a single commit to a CVS checkout. + +linkgit:git-cvsimport[1]:: + Salvage your data out of another SCM people love to hate. + +linkgit:git-cvsserver[1]:: + A CVS server emulator for Git. + +linkgit:git-imap-send[1]:: + Send a collection of patches from stdin to an IMAP folder. + +linkgit:git-p4[1]:: + Import from and submit to Perforce repositories. + +linkgit:git-quiltimport[1]:: + Applies a quilt patchset onto the current branch. + +linkgit:git-request-pull[1]:: + Generates a summary of pending changes. + +linkgit:git-send-email[1]:: + Send a collection of patches as emails. + +linkgit:git-svn[1]:: + Bidirectional operation between a Subversion repository and Git. + diff --git a/git/mingw64/share/doc/git-doc/cmds-guide.adoc b/git/mingw64/share/doc/git-doc/cmds-guide.adoc new file mode 100644 index 0000000000000000000000000000000000000000..3c0eeb3dc48bf6fe9c59be4cde807bc2f69bc4ac --- /dev/null +++ b/git/mingw64/share/doc/git-doc/cmds-guide.adoc @@ -0,0 +1,39 @@ +linkgit:gitcore-tutorial[7]:: + A Git core tutorial for developers. + +linkgit:gitcredentials[7]:: + Providing usernames and passwords to Git. + +linkgit:gitcvs-migration[7]:: + Git for CVS users. + +linkgit:gitdiffcore[7]:: + Tweaking diff output. + +linkgit:giteveryday[7]:: + A useful minimum set of commands for Everyday Git. + +linkgit:gitfaq[7]:: + Frequently asked questions about using Git. + +linkgit:gitglossary[7]:: + A Git Glossary. + +linkgit:gitnamespaces[7]:: + Git namespaces. + +linkgit:gitremote-helpers[7]:: + Helper programs to interact with remote repositories. + +linkgit:gitsubmodules[7]:: + Mounting one repository inside another. + +linkgit:gittutorial[7]:: + A tutorial introduction to Git. + +linkgit:gittutorial-2[7]:: + A tutorial introduction to Git: part two. + +linkgit:gitworkflows[7]:: + An overview of recommended workflows with Git. + diff --git a/git/mingw64/share/doc/git-doc/cmds-mainporcelain.adoc b/git/mingw64/share/doc/git-doc/cmds-mainporcelain.adoc new file mode 100644 index 0000000000000000000000000000000000000000..bc184566254c64e155f6105b6b3dfcc42a090216 --- /dev/null +++ b/git/mingw64/share/doc/git-doc/cmds-mainporcelain.adoc @@ -0,0 +1,141 @@ +linkgit:git-add[1]:: + Add file contents to the index. + +linkgit:git-am[1]:: + Apply a series of patches from a mailbox. + +linkgit:git-archive[1]:: + Create an archive of files from a named tree. + +linkgit:git-backfill[1]:: + Download missing objects in a partial clone. + +linkgit:git-bisect[1]:: + Use binary search to find the commit that introduced a bug. + +linkgit:git-branch[1]:: + List, create, or delete branches. + +linkgit:git-bundle[1]:: + Move objects and refs by archive. + +linkgit:git-checkout[1]:: + Switch branches or restore working tree files. + +linkgit:git-cherry-pick[1]:: + Apply the changes introduced by some existing commits. + +linkgit:git-citool[1]:: + Graphical alternative to git-commit. + +linkgit:git-clean[1]:: + Remove untracked files from the working tree. + +linkgit:git-clone[1]:: + Clone a repository into a new directory. + +linkgit:git-commit[1]:: + Record changes to the repository. + +linkgit:git-describe[1]:: + Give an object a human readable name based on an available ref. + +linkgit:git-diff[1]:: + Show changes between commits, commit and working tree, etc. + +linkgit:git-fetch[1]:: + Download objects and refs from another repository. + +linkgit:git-format-patch[1]:: + Prepare patches for e-mail submission. + +linkgit:git-gc[1]:: + Cleanup unnecessary files and optimize the local repository. + +linkgit:git-grep[1]:: + Print lines matching a pattern. + +linkgit:git-gui[1]:: + A portable graphical interface to Git. + +linkgit:git-history[1]:: + EXPERIMENTAL: Rewrite history. + +linkgit:git-init[1]:: + Create an empty Git repository or reinitialize an existing one. + +linkgit:git-log[1]:: + Show commit logs. + +linkgit:git-maintenance[1]:: + Run tasks to optimize Git repository data. + +linkgit:git-merge[1]:: + Join two or more development histories together. + +linkgit:git-mv[1]:: + Move or rename a file, a directory, or a symlink. + +linkgit:git-notes[1]:: + Add or inspect object notes. + +linkgit:git-pull[1]:: + Fetch from and integrate with another repository or a local branch. + +linkgit:git-push[1]:: + Update remote refs along with associated objects. + +linkgit:git-range-diff[1]:: + Compare two commit ranges (e.g. two versions of a branch). + +linkgit:git-rebase[1]:: + Reapply commits on top of another base tip. + +linkgit:git-reset[1]:: + Set `HEAD` or the index to a known state. + +linkgit:git-restore[1]:: + Restore working tree files. + +linkgit:git-revert[1]:: + Revert some existing commits. + +linkgit:git-rm[1]:: + Remove files from the working tree and from the index. + +linkgit:git-shortlog[1]:: + Summarize 'git log' output. + +linkgit:git-show[1]:: + Show various types of objects. + +linkgit:git-sparse-checkout[1]:: + Reduce your working tree to a subset of tracked files. + +linkgit:git-stash[1]:: + Stash the changes in a dirty working directory away. + +linkgit:git-status[1]:: + Show the working tree status. + +linkgit:git-submodule[1]:: + Initialize, update or inspect submodules. + +linkgit:git-survey[1]:: + EXPERIMENTAL: Measure various repository dimensions of scale. + +linkgit:git-switch[1]:: + Switch branches. + +linkgit:git-tag[1]:: + Create, list, delete or verify tags. + +linkgit:git-worktree[1]:: + Manage multiple working trees. + +linkgit:gitk[1]:: + The Git repository browser. + +linkgit:scalar[1]:: + A tool for managing large Git repositories. + diff --git a/git/mingw64/share/doc/git-doc/cmds-plumbinginterrogators.adoc b/git/mingw64/share/doc/git-doc/cmds-plumbinginterrogators.adoc new file mode 100644 index 0000000000000000000000000000000000000000..0c53dc0173a25fcda0eb61c09d2803c7bdb2cdb5 --- /dev/null +++ b/git/mingw64/share/doc/git-doc/cmds-plumbinginterrogators.adoc @@ -0,0 +1,72 @@ +linkgit:git-cat-file[1]:: + Provide contents or details of repository objects. + +linkgit:git-cherry[1]:: + Find commits yet to be applied to upstream. + +linkgit:git-diff-files[1]:: + Compares files in the working tree and the index. + +linkgit:git-diff-index[1]:: + Compare a tree to the working tree or index. + +linkgit:git-diff-pairs[1]:: + Compare the content and mode of provided blob pairs. + +linkgit:git-diff-tree[1]:: + Compares the content and mode of blobs found via two tree objects. + +linkgit:git-for-each-ref[1]:: + Output information on each ref. + +linkgit:git-for-each-repo[1]:: + Run a Git command on a list of repositories. + +linkgit:git-get-tar-commit-id[1]:: + Extract commit ID from an archive created using git-archive. + +linkgit:git-last-modified[1]:: + EXPERIMENTAL: Show when files were last modified. + +linkgit:git-ls-files[1]:: + Show information about files in the index and the working tree. + +linkgit:git-ls-remote[1]:: + List references in a remote repository. + +linkgit:git-ls-tree[1]:: + List the contents of a tree object. + +linkgit:git-merge-base[1]:: + Find as good common ancestors as possible for a merge. + +linkgit:git-name-rev[1]:: + Find symbolic names for given revs. + +linkgit:git-pack-redundant[1]:: + Find redundant pack files. + +linkgit:git-repo[1]:: + Retrieve information about the repository. + +linkgit:git-rev-list[1]:: + Lists commit objects in reverse chronological order. + +linkgit:git-rev-parse[1]:: + Pick out and massage parameters. + +linkgit:git-show-index[1]:: + Show packed archive index. + +linkgit:git-show-ref[1]:: + List references in a local repository. + +linkgit:git-unpack-file[1]:: + Creates a temporary file with a blob's contents. + +linkgit:git-var[1]:: + Show a Git logical variable. + +linkgit:git-verify-pack[1]:: + Validate packed Git archive files. + diff --git a/git/mingw64/share/doc/git-doc/cmds-plumbingmanipulators.adoc b/git/mingw64/share/doc/git-doc/cmds-plumbingmanipulators.adoc new file mode 100644 index 0000000000000000000000000000000000000000..6ea8c605ca3bfd49fc25e03bc5417e9169d4ff09 --- /dev/null +++ b/git/mingw64/share/doc/git-doc/cmds-plumbingmanipulators.adoc @@ -0,0 +1,60 @@ +linkgit:git-apply[1]:: + Apply a patch to files and/or to the index. + +linkgit:git-checkout-index[1]:: + Copy files from the index to the working tree. + +linkgit:git-commit-graph[1]:: + Write and verify Git commit-graph files. + +linkgit:git-commit-tree[1]:: + Create a new commit object. + +linkgit:git-hash-object[1]:: + Compute object ID and optionally create an object from a file. + +linkgit:git-index-pack[1]:: + Build pack index file for an existing packed archive. + +linkgit:git-merge-file[1]:: + Run a three-way file merge. + +linkgit:git-merge-index[1]:: + Run a merge for files needing merging. + +linkgit:git-mktag[1]:: + Creates a tag object with extra validation. + +linkgit:git-mktree[1]:: + Build a tree-object from ls-tree formatted text. + +linkgit:git-multi-pack-index[1]:: + Write and verify multi-pack-indexes. + +linkgit:git-pack-objects[1]:: + Create a packed archive of objects. + +linkgit:git-prune-packed[1]:: + Remove extra objects that are already in pack files. + +linkgit:git-read-tree[1]:: + Reads tree information into the index. + +linkgit:git-replay[1]:: + EXPERIMENTAL: Replay commits on a new base, works with bare repos too. + +linkgit:git-symbolic-ref[1]:: + Read, modify and delete symbolic refs. + +linkgit:git-unpack-objects[1]:: + Unpack objects from a packed archive. + +linkgit:git-update-index[1]:: + Register file contents in the working tree to the index. + +linkgit:git-update-ref[1]:: + Update the object name stored in a ref safely. + +linkgit:git-write-tree[1]:: + Create a tree object from the current index. + diff --git a/git/mingw64/share/doc/git-doc/cmds-purehelpers.adoc b/git/mingw64/share/doc/git-doc/cmds-purehelpers.adoc new file mode 100644 index 0000000000000000000000000000000000000000..b2197f288e692362a65e9184e54995a88863cf85 --- /dev/null +++ b/git/mingw64/share/doc/git-doc/cmds-purehelpers.adoc @@ -0,0 +1,54 @@ +linkgit:git-check-attr[1]:: + Display gitattributes information. + +linkgit:git-check-ignore[1]:: + Debug gitignore / exclude files. + +linkgit:git-check-mailmap[1]:: + Show canonical names and email addresses of contacts. + +linkgit:git-check-ref-format[1]:: + Ensures that a reference name is well formed. + +linkgit:git-column[1]:: + Display data in columns. + +linkgit:git-credential[1]:: + Retrieve and store user credentials. + +linkgit:git-credential-cache[1]:: + Helper to temporarily store passwords in memory. + +linkgit:git-credential-store[1]:: + Helper to store credentials on disk. + +linkgit:git-fmt-merge-msg[1]:: + Produce a merge commit message. + +linkgit:git-hook[1]:: + Run git hooks. + +linkgit:git-interpret-trailers[1]:: + Add or parse structured information in commit messages. + +linkgit:git-mailinfo[1]:: + Extracts patch and authorship from a single e-mail message. + +linkgit:git-mailsplit[1]:: + Simple UNIX mbox splitter program. + +linkgit:git-merge-one-file[1]:: + The standard helper program to use with git-merge-index. + +linkgit:git-patch-id[1]:: + Compute unique IDs for patches. + +linkgit:git-sh-i18n[1]:: + Git's i18n setup code for shell scripts. + +linkgit:git-sh-setup[1]:: + Common Git shell script setup code. + +linkgit:git-stripspace[1]:: + Remove unnecessary whitespace. + diff --git a/git/mingw64/share/doc/git-doc/cmds-synchelpers.adoc b/git/mingw64/share/doc/git-doc/cmds-synchelpers.adoc new file mode 100644 index 0000000000000000000000000000000000000000..253c5d35217dd15f394a8033c60c70cb4be19da3 --- /dev/null +++ b/git/mingw64/share/doc/git-doc/cmds-synchelpers.adoc @@ -0,0 +1,18 @@ +linkgit:git-http-fetch[1]:: + Download from a remote Git repository via HTTP. + +linkgit:git-http-push[1]:: + Push objects over HTTP/DAV to another repository. + +linkgit:git-receive-pack[1]:: + Receive what is pushed into the repository. + +linkgit:git-shell[1]:: + Restricted login shell for Git-only SSH access. + +linkgit:git-upload-archive[1]:: + Send archive back to git-archive. + +linkgit:git-upload-pack[1]:: + Send objects packed back to git-fetch-pack. + diff --git a/git/mingw64/share/doc/git-doc/cmds-synchingrepositories.adoc b/git/mingw64/share/doc/git-doc/cmds-synchingrepositories.adoc new file mode 100644 index 0000000000000000000000000000000000000000..d3ddba3b95ba0a881558d8f788d769c3c0a2bc78 --- /dev/null +++ b/git/mingw64/share/doc/git-doc/cmds-synchingrepositories.adoc @@ -0,0 +1,15 @@ +linkgit:git-daemon[1]:: + A really simple server for Git repositories. + +linkgit:git-fetch-pack[1]:: + Receive missing objects from another repository. + +linkgit:git-http-backend[1]:: + Server side implementation of Git over HTTP. + +linkgit:git-send-pack[1]:: + Push objects over Git protocol to another repository. + +linkgit:git-update-server-info[1]:: + Update auxiliary info file to help dumb servers. + diff --git a/git/mingw64/share/doc/git-doc/cmds-userinterfaces.adoc b/git/mingw64/share/doc/git-doc/cmds-userinterfaces.adoc new file mode 100644 index 0000000000000000000000000000000000000000..dae805335bbf646f03bb5baa9efe1a1fdd6261d3 --- /dev/null +++ b/git/mingw64/share/doc/git-doc/cmds-userinterfaces.adoc @@ -0,0 +1,24 @@ +linkgit:gitattributes[5]:: + Defining attributes per path. + +linkgit:gitcli[7]:: + Git command-line interface and conventions. + +linkgit:githooks[5]:: + Hooks used by Git. + +linkgit:gitignore[5]:: + Specifies intentionally untracked files to ignore. + +linkgit:gitmailmap[5]:: + Map author/committer names and/or E-Mail addresses. + +linkgit:gitmodules[5]:: + Defining submodule properties. + +linkgit:gitrepository-layout[5]:: + Git Repository Layout. + +linkgit:gitrevisions[7]:: + Specifying revisions and ranges for Git. + diff --git a/git/mingw64/share/doc/git-doc/config.adoc b/git/mingw64/share/doc/git-doc/config.adoc new file mode 100644 index 0000000000000000000000000000000000000000..bd7187c7b48e4b8204f142efe8c30da968f4d775 --- /dev/null +++ b/git/mingw64/share/doc/git-doc/config.adoc @@ -0,0 +1,568 @@ +CONFIGURATION FILE +------------------ + +The Git configuration file contains a number of variables that affect +the Git commands' behavior. The files `.git/config` and optionally +`config.worktree` (see the "CONFIGURATION FILE" section of +linkgit:git-worktree[1]) in each repository are used to store the +configuration for that repository, and `$HOME/.gitconfig` is used to +store a per-user configuration as fallback values for the `.git/config` +file. The file `/etc/gitconfig` can be used to store a system-wide +default configuration. + +The configuration variables are used by both the Git plumbing +and the porcelain commands. The variables are divided into sections, wherein +the fully qualified variable name of the variable itself is the last +dot-separated segment and the section name is everything before the last +dot. The variable names are case-insensitive, allow only alphanumeric +characters and `-`, and must start with an alphabetic character. Some +variables may appear multiple times; we say then that the variable is +multivalued. + +Syntax +~~~~~~ + +The syntax is fairly flexible and permissive. Whitespace characters, +which in this context are the space character (SP) and the horizontal +tabulation (HT), are mostly ignored. The '#' and ';' characters begin +comments to the end of line. 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 case-insensitive. Only alphanumeric +characters, `-` and `.` are allowed in section names. Each variable +must belong to some section, which means that there must be a section +header before the first setting of a variable. + +Sections can be further divided into subsections. To begin a subsection +put its name in double quotes, separated by space from the section name, +in the section header, like in the example below: + +-------- + [section "subsection"] + +-------- + +Subsection names are case sensitive and can contain any characters except +newline and the null byte. Doublequote `"` and backslash can be included +by escaping them as `\"` and `\\`, respectively. Backslashes preceding +other characters are dropped when reading; for example, `\t` is read as +`t` and `\0` is read as `0`. Section headers 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 don't +need to. + +There is also a deprecated `[section.subsection]` syntax. With this +syntax, the subsection name is converted to lower-case and is also +compared case sensitively. These subsection names follow the same +restrictions as section names. + +All the other lines (and the remainder of the line after the section +header) are recognized as setting variables, in the form +'name = value' (or just 'name', which is a short-hand to say that +the variable is the boolean "true"). +The variable names are case-insensitive, allow only alphanumeric characters +and `-`, and must start with an alphabetic character. + +Whitespace characters surrounding `name`, `=` and `value` are discarded. +Internal whitespace characters within 'value' are retained verbatim. +Comments starting with either `#` or `;` and extending to the end of line +are discarded. A line that defines a value can be continued to the next +line by ending it with a backslash (`\`); the backslash and the end-of-line +characters are discarded. + +If `value` needs to contain leading or trailing whitespace characters, +it must be enclosed in double quotation marks (`"`). Inside double quotation +marks, double quote (`"`) and backslash (`\`) characters 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). Other char escape sequences (including octal +escape sequences) are invalid. + + +Includes +~~~~~~~~ + +The `include` and `includeIf` sections allow you to include config +directives from another source. These sections behave identically to +each other with the exception that `includeIf` sections may be ignored +if their condition does not evaluate to true; see "Conditional includes" +below. + +You can include a config file from another by setting the special +`include.path` (or `includeIf.*.path`) variable to the name of the file +to be included. The variable takes a pathname as its value, and is +subject to tilde expansion. These variables can be given multiple times. + +The contents of the included file are inserted immediately, as if they +had been found at the location of the include directive. If the value of the +variable is a relative path, the path is considered to +be relative to the configuration file in which the include directive +was found. See below for examples. + +Conditional includes +~~~~~~~~~~~~~~~~~~~~ + +You can conditionally include a config file from another by setting an +`includeIf..path` variable to the name of the file to be +included. + +The condition starts with a keyword followed by a colon and some data +whose format and meaning depends on the keyword. Supported keywords +are: + +`gitdir`:: + The data that follows the keyword `gitdir` and a colon is used as a glob + pattern. If the location of the .git directory matches the + pattern, the include condition is met. ++ +The .git location may be auto-discovered, or come from `$GIT_DIR` +environment variable. If the repository is auto-discovered via a .git +file (e.g. from submodules, or a linked worktree), the .git location +would be the final location where the .git directory is, not where the +.git file is. ++ +The pattern can contain standard globbing wildcards and two additional +ones, `**/` and `/**`, that can match multiple path components. Please +refer to linkgit:gitignore[5] for details. For convenience: + + * If the pattern starts with `~/`, `~` will be substituted with the + content of the environment variable `HOME`. + + * If the pattern starts with `./`, it is replaced with the directory + containing the current config file. + + * If the pattern does not start with either `~/`, `./` or `/`, `**/` + will be automatically prepended. For example, the pattern `foo/bar` + becomes `**/foo/bar` and would match `/any/path/to/foo/bar`. + + * If the pattern ends with `/`, `**` will be automatically added. For + example, the pattern `foo/` becomes `foo/**`. In other words, it + matches "foo" and everything inside, recursively. + +`gitdir/i`:: + This is the same as `gitdir` except that matching is done + case-insensitively (e.g. on case-insensitive file systems) + +`onbranch`:: + The data that follows the keyword `onbranch` and a colon is taken to be a + pattern with standard globbing wildcards and two additional + ones, `**/` and `/**`, that can match multiple path components. + If we are in a worktree where the name of the branch that is + currently checked out matches the pattern, the include condition + is met. ++ +If the pattern ends with `/`, `**` will be automatically added. For +example, the pattern `foo/` becomes `foo/**`. In other words, it matches +all branches that begin with `foo/`. This is useful if your branches are +organized hierarchically and you would like to apply a configuration to +all the branches in that hierarchy. + +`hasconfig:remote.*.url`:: + The data that follows this keyword and a colon is taken to + be a pattern with standard globbing wildcards and two + additional ones, `**/` and `/**`, that can match multiple + components. The first time this keyword is seen, the rest of + the config files will be scanned for remote URLs (without + applying any values). If there exists at least one remote URL + that matches this pattern, the include condition is met. ++ +Files included by this option (directly or indirectly) are not allowed +to contain remote URLs. ++ +Note that unlike other includeIf conditions, resolving this condition +relies on information that is not yet known at the point of reading the +condition. A typical use case is this option being present as a +system-level or global-level config, and the remote URL being in a +local-level config; hence the need to scan ahead when resolving this +condition. In order to avoid the chicken-and-egg problem in which +potentially-included files can affect whether such files are potentially +included, Git breaks the cycle by prohibiting these files from affecting +the resolution of these conditions (thus, prohibiting them from +declaring remote URLs). ++ +As for the naming of this keyword, it is for forwards compatibility with +a naming scheme that supports more variable-based include conditions, +but currently Git only supports the exact keyword described above. + +A few more notes on matching via `gitdir` and `gitdir/i`: + + * Symlinks in `$GIT_DIR` are not resolved before matching. + + * Both the symlink & realpath versions of paths will be matched + outside of `$GIT_DIR`. E.g. if ~/git is a symlink to + /mnt/storage/git, both `gitdir:~/git` and `gitdir:/mnt/storage/git` + will match. ++ +This was not the case in the initial release of this feature in +v2.13.0, which only matched the realpath version. Configuration that +wants to be compatible with the initial release of this feature needs +to either specify only the realpath version, or both versions. + + * Note that "../" is not special and will match literally, which is + unlikely what you want. + +Example +~~~~~~~ + +---- +# Core variables +[core] + ; Don't trust file modes + filemode = false + +# Our diff algorithm +[diff] + external = /usr/local/bin/diff-wrapper + renames = true + +[branch "devel"] + remote = origin + merge = refs/heads/devel + +# Proxy settings +[core] + gitProxy="ssh" for "kernel.org" + gitProxy=default-proxy ; for the rest + +[include] + path = /path/to/foo.inc ; include by absolute path + path = foo.inc ; find "foo.inc" relative to the current file + path = ~/foo.inc ; find "foo.inc" in your `$HOME` directory + +; include if $GIT_DIR is /path/to/foo/.git +[includeIf "gitdir:/path/to/foo/.git"] + path = /path/to/foo.inc + +; include for all repositories inside /path/to/group +[includeIf "gitdir:/path/to/group/"] + path = /path/to/foo.inc + +; include for all repositories inside $HOME/to/group +[includeIf "gitdir:~/to/group/"] + path = /path/to/foo.inc + +; relative paths are always relative to the including +; file (if the condition is true); their location is not +; affected by the condition +[includeIf "gitdir:/path/to/group/"] + path = foo.inc + +; include only if we are in a worktree where foo-branch is +; currently checked out +[includeIf "onbranch:foo-branch"] + path = foo.inc + +; include only if a remote with the given URL exists (note +; that such a URL may be provided later in a file or in a +; file read after this file is read, as seen in this example) +[includeIf "hasconfig:remote.*.url:https://example.com/**"] + path = foo.inc +[remote "origin"] + url = https://example.com/git +---- + +Values +~~~~~~ + +Values of many variables are treated as a simple string, but there +are variables that take values of specific types and there are rules +as to how to spell them. + +boolean:: + + When a variable is said to take a boolean value, many + synonyms are accepted for 'true' and 'false'; these are all + case-insensitive. + + true;; Boolean true literals are `yes`, `on`, `true`, + and `1`. Also, a variable defined without `= ` + is taken as true. + + false;; Boolean false literals are `no`, `off`, `false`, + `0` and the empty string. ++ +When converting a value to its canonical form using the `--type=bool` type +specifier, 'git config' will ensure that the output is "true" or +"false" (spelled in lowercase). + +integer:: + The value for many variables that specify various sizes can + be suffixed with `k`, `M`,... to mean "scale the number by + 1024", "by 1024x1024", etc. + +color:: + The value for a variable that takes a color is a list of + colors (at most two, one for foreground and one for background) + and attributes (as many as you want), separated by spaces. ++ +The basic colors accepted are `normal`, `black`, `red`, `green`, +`yellow`, `blue`, `magenta`, `cyan`, `white` and `default`. The first +color given is the foreground; the second is the background. All the +basic colors except `normal` and `default` have a bright variant that can +be specified by prefixing the color with `bright`, like `brightred`. ++ +The color `normal` makes no change to the color. It is the same as an +empty string, but can be used as the foreground color when specifying a +background color alone (for example, "normal red"). ++ +The color `default` explicitly resets the color to the terminal default, +for example to specify a cleared background. Although it varies between +terminals, this is usually not the same as setting to "white black". ++ +Colors may also be given as numbers between 0 and 255; these use ANSI +256-color mode (but note that not all terminals may support this). If +your terminal supports it, you may also specify 24-bit RGB values as +hex, like `#ff0ab3`, or 12-bit RGB values like `#f1b`, which is +equivalent to the 24-bit color `#ff11bb`. ++ +The accepted attributes are `bold`, `dim`, `ul`, `blink`, `reverse`, +`italic`, and `strike` (for crossed-out or "strikethrough" letters). +The position of any attributes with respect to the colors +(before, after, or in between), doesn't matter. Specific attributes may +be turned off by prefixing them with `no` or `no-` (e.g., `noreverse`, +`no-ul`, etc). ++ +The pseudo-attribute `reset` resets all colors and attributes before +applying the specified coloring. For example, `reset green` will result +in a green foreground and default background without any active +attributes. ++ +An empty color string produces no color effect at all. This can be used +to avoid coloring specific elements without disabling color entirely. ++ +For git's pre-defined color slots, the attributes are meant to be reset +at the beginning of each item in the colored output. So setting +`color.decorate.branch` to `black` will paint that branch name in a +plain `black`, even if the previous thing on the same output line (e.g. +opening parenthesis before the list of branch names in `log --decorate` +output) is set to be painted with `bold` or some other attribute. +However, custom log formats may do more complicated and layered +coloring, and the negated forms may be useful there. + +pathname:: + A variable that takes a pathname value can be given a + string that begins with "`~/`" or "`~user/`", and the usual + tilde expansion happens to such a string: `~/` + is expanded to the value of `$HOME`, and `~user/` to the + specified user's home directory. ++ +If a path starts with `%(prefix)/`, the remainder is interpreted as a +path relative to Git's "runtime prefix", i.e. relative to the location +where Git itself was installed. For example, `%(prefix)/bin/` refers to +the directory in which the Git executable itself lives. If Git was +compiled without runtime prefix support, the compiled-in prefix will be +substituted instead. In the unlikely event that a literal path needs to +be specified that should _not_ be expanded, it needs to be prefixed by +`./`, like so: `./%(prefix)/bin`. ++ +If prefixed with `:(optional)`, the configuration variable is treated +as if it does not exist, if the named path does not exist. + +Variables +~~~~~~~~~ + +Note that this list is non-comprehensive and not necessarily complete. +For command-specific variables, you will find a more detailed description +in the appropriate manual page. + +Other git-related tools may and do use their own variables. When +inventing new variables for use in your own tool, make sure their +names do not conflict with those that are used by Git itself and +other popular tools, and describe them in your documentation. + +include::config/add.adoc[] + +include::config/advice.adoc[] + +include::config/alias.adoc[] + +include::config/am.adoc[] + +include::config/apply.adoc[] + +include::config/attr.adoc[] + +include::config/bitmap-pseudo-merge.adoc[] + +include::config/blame.adoc[] + +include::config/branch.adoc[] + +include::config/browser.adoc[] + +include::config/bundle.adoc[] + +include::config/checkout.adoc[] + +include::config/clean.adoc[] + +include::config/clone.adoc[] + +include::config/color.adoc[] + +include::config/column.adoc[] + +include::config/commit.adoc[] + +include::config/commitgraph.adoc[] + +include::config/completion.adoc[] + +include::config/core.adoc[] + +include::config/credential.adoc[] + +include::config/diff.adoc[] + +include::config/difftool.adoc[] + +include::config/extensions.adoc[] + +include::config/fastimport.adoc[] + +include::config/feature.adoc[] + +include::config/fetch.adoc[] + +include::config/filter.adoc[] + +include::config/format.adoc[] + +include::config/fsck.adoc[] + +include::config/fsmonitor--daemon.adoc[] + +include::config/gc.adoc[] + +include::config/gitcvs.adoc[] + +include::config/gitweb.adoc[] + +include::config/gpg.adoc[] + +include::config/grep.adoc[] + +include::config/gui.adoc[] + +include::config/guitool.adoc[] + +include::config/help.adoc[] + +include::config/http.adoc[] + +include::config/i18n.adoc[] + +include::config/imap.adoc[] + +include::config/includeif.adoc[] + +include::config/index.adoc[] + +include::config/init.adoc[] + +include::config/instaweb.adoc[] + +include::config/interactive.adoc[] + +include::config/log.adoc[] + +include::config/lsrefs.adoc[] + +include::config/mailinfo.adoc[] + +include::config/mailmap.adoc[] + +include::config/maintenance.adoc[] + +include::config/man.adoc[] + +include::config/merge.adoc[] + +include::config/mergetool.adoc[] + +include::config/notes.adoc[] + +include::config/pack.adoc[] + +include::config/pager.adoc[] + +include::config/pretty.adoc[] + +include::config/promisor.adoc[] + +include::config/protocol.adoc[] + +include::config/pull.adoc[] + +include::config/push.adoc[] + +include::config/rebase.adoc[] + +include::config/receive.adoc[] + +include::config/reftable.adoc[] + +include::config/remote.adoc[] + +include::config/remotes.adoc[] + +include::config/repack.adoc[] + +include::config/rerere.adoc[] + +include::config/revert.adoc[] + +include::config/safe.adoc[] + +include::config/sendemail.adoc[] + +include::config/sendpack.adoc[] + +include::config/sequencer.adoc[] + +include::config/showbranch.adoc[] + +include::config/sideband.adoc[] + +include::config/sparse.adoc[] + +include::config/splitindex.adoc[] + +include::config/ssh.adoc[] + +include::config/stash.adoc[] + +include::config/status.adoc[] + +include::config/submodule.adoc[] + +include::config/survey.adoc[] + +include::config/tag.adoc[] + +include::config/tar.adoc[] + +include::config/trace2.adoc[] + +include::config/trailer.adoc[] + +include::config/transfer.adoc[] + +include::config/uploadarchive.adoc[] + +include::config/uploadpack.adoc[] + +include::config/url.adoc[] + +include::config/user.adoc[] + +include::config/versionsort.adoc[] + +include::config/web.adoc[] + +include::config/windows.adoc[] + +include::config/worktree.adoc[] diff --git a/git/mingw64/share/doc/git-doc/date-formats.adoc b/git/mingw64/share/doc/git-doc/date-formats.adoc new file mode 100644 index 0000000000000000000000000000000000000000..e24517c496fce47e7c22d1c4a6505f9fd08499aa --- /dev/null +++ b/git/mingw64/share/doc/git-doc/date-formats.adoc @@ -0,0 +1,31 @@ +DATE FORMATS +------------ + +The `GIT_AUTHOR_DATE` and `GIT_COMMITTER_DATE` environment variables +support the following date formats: + +Git internal format:: + It is ` `, where + `` is the number of seconds since the UNIX epoch. + `` is a positive or negative offset from UTC. + For example CET (which is 1 hour ahead of UTC) is `+0100`. + +RFC 2822:: + The standard date format as described by RFC 2822, for example + `Thu, 07 Apr 2005 22:13:13 +0200`. + +ISO 8601:: + Time and date specified by the ISO 8601 standard, for example + `2005-04-07T22:13:13`. The parser accepts a space instead of the + `T` character as well. Fractional parts of a second will be ignored, + for example `2005-04-07T22:13:13.019` will be treated as + `2005-04-07T22:13:13`. ++ +NOTE: In addition, the date part is accepted in the following formats: +`YYYY.MM.DD`, `MM/DD/YYYY` and `DD.MM.YYYY`. + +ifdef::git-commit[] +In addition to recognizing all date formats above, the `--date` option +will also try to make sense of other, more human-centric date formats, +such as relative dates like "yesterday" or "last Friday at noon". +endif::git-commit[] diff --git a/git/mingw64/share/doc/git-doc/diff-algorithm-option.adoc b/git/mingw64/share/doc/git-doc/diff-algorithm-option.adoc new file mode 100644 index 0000000000000000000000000000000000000000..8e3a0b63d784d8b68fdaf83ae1fba495b656d426 --- /dev/null +++ b/git/mingw64/share/doc/git-doc/diff-algorithm-option.adoc @@ -0,0 +1,20 @@ +`--diff-algorithm=(patience|minimal|histogram|myers)`:: + Choose a diff algorithm. The variants are as follows: ++ +-- + `default`;; + `myers`;; + The basic greedy diff algorithm. Currently, this is the default. + `minimal`;; + Spend extra time to make sure the smallest possible diff is + produced. + `patience`;; + Use "patience diff" algorithm when generating patches. + `histogram`;; + This algorithm extends the patience algorithm to "support + low-occurrence common elements". +-- ++ +For instance, if you configured the `diff.algorithm` variable to a +non-default value and want to use the default one, then you +have to use `--diff-algorithm=default` option. diff --git a/git/mingw64/share/doc/git-doc/diff-context-options.adoc b/git/mingw64/share/doc/git-doc/diff-context-options.adoc new file mode 100644 index 0000000000000000000000000000000000000000..b9ace2aa4b309298b284ff9f988592e9727c62f5 --- /dev/null +++ b/git/mingw64/share/doc/git-doc/diff-context-options.adoc @@ -0,0 +1,12 @@ +`-U`:: +`--unified=`:: + Generate diffs with __ lines of context. The number of context + lines defaults to `diff.context` or 3 if the configuration variable + is unset. (`-U` without `` is silently accepted as a synonym for + `-p` due to a historical accident). + +`--inter-hunk-context=`:: + Show the context between diff hunks, up to the specified __ + of lines, thereby fusing hunks that are close to each other. + Defaults to `diff.interHunkContext` or 0 if the config option + is unset. diff --git a/git/mingw64/share/doc/git-doc/diff-format.adoc b/git/mingw64/share/doc/git-doc/diff-format.adoc new file mode 100644 index 0000000000000000000000000000000000000000..9f7e98824183494575d32248215c71af71a2d3f1 --- /dev/null +++ b/git/mingw64/share/doc/git-doc/diff-format.adoc @@ -0,0 +1,186 @@ +Raw output format +----------------- + +The raw output format from `git-diff-index`, `git-diff-tree`, +`git-diff-files` and `git diff --raw` are very similar. + +These commands all compare two sets of things; what is +compared differs: + +`git-diff-index `:: + compares the __ and the files on the filesystem. + +`git-diff-index --cached `:: + compares the __ and the index. + +`git-diff-tree [-r] [...]`:: + compares the trees named by the two arguments. + +`git-diff-files [...]`:: + compares the index and the files on the filesystem. + +The `git-diff-tree` command begins its output by printing the hash of +what is being compared. After that, all the commands print one output +line per changed file. + +An output line is formatted this way: + +------------------------------------------------ +in-place edit :100644 100644 bcd1234 0123456 M file0 +copy-edit :100644 100644 abcd123 1234567 C68 file1 file2 +rename-edit :100644 100644 abcd123 1234567 R86 file1 file3 +create :000000 100644 0000000 1234567 A file4 +delete :100644 000000 1234567 0000000 D file5 +unmerged :000000 000000 0000000 0000000 U file6 +------------------------------------------------ + +That is, from the left to the right: + +. a colon. +. mode for "src"; 000000 if creation or unmerged. +. a space. +. mode for "dst"; 000000 if deletion or unmerged. +. a space. +. sha1 for "src"; 0\{40\} if creation or unmerged. +. a space. +. sha1 for "dst"; 0\{40\} if deletion, unmerged or "work tree out of sync with the index". +. a space. +. status, followed by optional "score" number. +. a tab or a NUL when `-z` option is used. +. path for "src" +. a tab or a NUL when `-z` option is used; only exists for C or R. +. path for "dst"; only exists for C or R. +. an LF or a NUL when `-z` option is used, to terminate the record. + +Possible status letters are: + +- `A`: addition of a file +- `C`: copy of a file into a new one +- `D`: deletion of a file +- `M`: modification of the contents or mode of a file +- `R`: renaming of a file +- `T`: change in the type of the file (regular file, symbolic link or submodule) +- `U`: file is unmerged (you must complete the merge before it can + be committed) +- `X`: "unknown" change type (most probably a bug, please report it) + +Status letters `C` and `R` are always followed by a score (denoting the +percentage of similarity between the source and target of the move or +copy). Status letter `M` may be followed by a score (denoting the +percentage of dissimilarity) for file rewrites. + +The sha1 for "dst" is shown as all 0's if a file on the filesystem +is out of sync with the index. + +Example: + +------------------------------------------------ +:100644 100644 5be4a4a 0000000 M file.c +------------------------------------------------ + +Without the `-z` option, pathnames with "unusual" characters are +quoted as explained for the configuration variable `core.quotePath` +(see linkgit:git-config[1]). Using `-z` the filename is output +verbatim and the line is terminated by a NUL byte. + +diff format for merges +---------------------- + +`git-diff-tree`, `git-diff-files` and `git-diff --raw` +can take `-c` or `--cc` option +to generate diff output also for merge commits. The output differs +from the format described above in the following way: + +. there is a colon for each parent +. there are more "src" modes and "src" sha1 +. status is concatenated status characters for each parent +. no optional "score" number +. tab-separated pathname(s) of the file + +For `-c` and `--cc`, only the destination or final path is shown even +if the file was renamed on any side of history. With +`--combined-all-paths`, the name of the path in each parent is shown +followed by the name of the path in the merge commit. + +Examples for `-c` and `--cc` without `--combined-all-paths`: + +------------------------------------------------ +::100644 100644 100644 fabadb8 cc95eb0 4866510 MM desc.c +::100755 100755 100755 52b7a2d 6d1ac04 d2ac7d7 RM bar.sh +::100644 100644 100644 e07d6c5 9042e82 ee91881 RR phooey.c +------------------------------------------------ + +Examples when `--combined-all-paths` added to either `-c` or `--cc`: + +------------------------------------------------ +::100644 100644 100644 fabadb8 cc95eb0 4866510 MM desc.c desc.c desc.c +::100755 100755 100755 52b7a2d 6d1ac04 d2ac7d7 RM foo.sh bar.sh bar.sh +::100644 100644 100644 e07d6c5 9042e82 ee91881 RR fooey.c fuey.c phooey.c +------------------------------------------------ + +Note that 'combined diff' lists only files which were modified from +all parents. + + +include::diff-generate-patch.adoc[] + + +other diff formats +------------------ + +The `--summary` option describes newly added, deleted, renamed and +copied files. The `--stat` option adds `diffstat`(1) graph to the +output. These options can be combined with other options, such as +`-p`, and are meant for human consumption. + +When showing a change that involves a rename or a copy, `--stat` output +formats the pathnames compactly by combining common prefix and suffix of +the pathnames. For example, a change that moves `arch/i386/Makefile` to +`arch/x86/Makefile` while modifying 4 lines will be shown like this: + +------------------------------------ +arch/{i386 => x86}/Makefile | 4 +-- +------------------------------------ + +The `--numstat` option gives the diffstat(1) information but is designed +for easier machine consumption. An entry in `--numstat` output looks +like this: + +---------------------------------------- +1 2 README +3 1 arch/{i386 => x86}/Makefile +---------------------------------------- + +That is, from left to right: + +. the number of added lines; +. a tab; +. the number of deleted lines; +. a tab; +. pathname (possibly with rename/copy information); +. a newline. + +When `-z` output option is in effect, the output is formatted this way: + +---------------------------------------- +1 2 README NUL +3 1 NUL arch/i386/Makefile NUL arch/x86/Makefile NUL +---------------------------------------- + +That is: + +. the number of added lines; +. a tab; +. the number of deleted lines; +. a tab; +. a NUL (only exists if renamed/copied); +. pathname in preimage; +. a NUL (only exists if renamed/copied); +. pathname in postimage (only exists if renamed/copied); +. a NUL. + +The extra `NUL` before the preimage path in renamed case is to allow +scripts that read the output to tell if the current record being read is +a single-path record or a rename/copy record without reading ahead. +After reading added and deleted lines, reading up to `NUL` would yield +the pathname, but if that is `NUL`, the record will show two paths. diff --git a/git/mingw64/share/doc/git-doc/diff-generate-patch.adoc b/git/mingw64/share/doc/git-doc/diff-generate-patch.adoc new file mode 100644 index 0000000000000000000000000000000000000000..7b6cdd198012b090cbda189ab316465d1d7f831a --- /dev/null +++ b/git/mingw64/share/doc/git-doc/diff-generate-patch.adoc @@ -0,0 +1,210 @@ +[[generate_patch_text_with_p]] +Generating patch text with -p +----------------------------- + +Running +linkgit:git-diff[1], +linkgit:git-log[1], +linkgit:git-show[1], +linkgit:git-diff-index[1], +linkgit:git-diff-tree[1], or +linkgit:git-diff-files[1] +with the `-p` option produces patch text. +You can customize the creation of patch text via the +`GIT_EXTERNAL_DIFF` and the `GIT_DIFF_OPTS` environment variables +(see linkgit:git[1]), and the `diff` attribute (see linkgit:gitattributes[5]). + +What the `-p` option produces is slightly different from the traditional +diff format: + +1. It is preceded by a "git diff" header that looks like this: + + diff --git a/file1 b/file2 ++ +The `a/` and `b/` filenames are the same unless rename/copy is +involved. Especially, even for a creation or a deletion, +`/dev/null` is _not_ used in place of the `a/` or `b/` filenames. ++ +When a rename/copy is involved, `file1` and `file2` show the +name of the source file of the rename/copy and the name of +the file that the rename/copy produces, respectively. + +2. It is followed by one or more extended header lines: ++ +[synopsis] +old mode +new mode +deleted file mode +new file mode +copy from +copy to +rename from +rename to +similarity index +dissimilarity index +index .. ++ +File modes __ are printed as 6-digit octal numbers including the file type +and file permission bits. ++ +Path names in extended headers do not include the `a/` and `b/` prefixes. ++ +The similarity index is the percentage of unchanged lines, and +the dissimilarity index is the percentage of changed lines. It +is a rounded down integer, followed by a percent sign. The +similarity index value of 100% is thus reserved for two equal +files, while 100% dissimilarity means that no line from the old +file made it into the new one. ++ +The index line includes the blob object names before and after the change. +The __ is included if the file mode does not change; otherwise, +separate lines indicate the old and the new mode. + +3. Pathnames with "unusual" characters are quoted as explained for + the configuration variable `core.quotePath` (see + linkgit:git-config[1]). + +4. All the `file1` files in the output refer to files before the + commit, and all the `file2` files refer to files after the commit. + It is incorrect to apply each change to each file sequentially. For + example, this patch will swap a and b: + + diff --git a/a b/b + rename from a + rename to b + diff --git a/b b/a + rename from b + rename to a + +5. Hunk headers mention the name of the function to which the hunk + applies. See "Defining a custom hunk-header" in + linkgit:gitattributes[5] for details of how to tailor this to + specific languages. + + +Combined diff format +-------------------- + +Any diff-generating command can take the `-c` or `--cc` option to +produce a 'combined diff' when showing a merge. This is the default +format when showing merges with linkgit:git-diff[1] or +linkgit:git-show[1]. Note also that you can give suitable +`--diff-merges` option to any of these commands to force generation of +diffs in a specific format. + +A "combined diff" format looks like this: + +------------ +diff --combined describe.c +index fabadb8,cc95eb0..4866510 +--- a/describe.c ++++ b/describe.c +@@@ -98,20 -98,12 +98,20 @@@ + return (a_date > b_date) ? -1 : (a_date == b_date) ? 0 : 1; + } + +- static void describe(char *arg) + -static void describe(struct commit *cmit, int last_one) +++static void describe(char *arg, int last_one) + { + + unsigned char sha1[20]; + + struct commit *cmit; + struct commit_list *list; + static int initialized = 0; + struct commit_name *n; + + + if (get_sha1(arg, sha1) < 0) + + usage(describe_usage); + + cmit = lookup_commit_reference(sha1); + + if (!cmit) + + usage(describe_usage); + + + if (!initialized) { + initialized = 1; + for_each_ref(get_name); +------------ + +1. It is preceded by a "git diff" header, that looks like + this (when the `-c` option is used): + + diff --combined file ++ +or like this (when the `--cc` option is used): + + diff --cc file + +2. It is followed by one or more extended header lines + (this example shows a merge with two parents): ++ +[synopsis] +index ,.. +mode ,.. +new file mode +deleted file mode , ++ +The `mode ,..` line appears only if at least one of +the is different from the rest. Extended headers with +information about detected content movement (renames and +copying detection) are designed to work with the diff of two +__ and are not used by combined diff format. + +3. It is followed by a two-line from-file/to-file header: + + --- a/file + +++ b/file ++ +Similar to the two-line header for the traditional 'unified' diff +format, `/dev/null` is used to signal created or deleted +files. ++ +However, if the --combined-all-paths option is provided, instead of a +two-line from-file/to-file, you get an N+1 line from-file/to-file header, +where N is the number of parents in the merge commit: + + --- a/file + --- a/file + --- a/file + +++ b/file ++ +This extended format can be useful if rename or copy detection is +active, to allow you to see the original name of the file in different +parents. + +4. Chunk header format is modified to prevent people from + accidentally feeding it to `patch -p1`. Combined diff format + was created for review of merge commit changes, and was not + meant to be applied. The change is similar to the change in the + extended 'index' header: + + @@@ @@@ ++ +There are (number of parents + 1) `@` characters in the chunk +header for combined diff format. + +Unlike the traditional 'unified' diff format, which shows two +files A and B with a single column that has `-` (minus -- +appears in A but removed in B), `+` (plus -- missing in A but +added to B), or `" "` (space -- unchanged) prefix, this format +compares two or more files file1, file2,... with one file X, and +shows how X differs from each of fileN. One column for each of +fileN is prepended to the output line to note how X's line is +different from it. + +A `-` character in the column N means that the line appears in +fileN but it does not appear in the result. A `+` character +in the column N means that the line appears in the result, +and fileN does not have that line (in other words, the line was +added, from the point of view of that parent). + +In the above example output, the function signature was changed +from both files (hence two `-` removals from both file1 and +file2, plus `++` to mean one line that was added does not appear +in either file1 or file2). Also, eight other lines are the same +from file1 but do not appear in file2 (hence prefixed with `+`). + +When shown by `git diff-tree -c`, it compares the parents of a +merge commit with the merge result (i.e. file1..fileN are the +parents). When shown by `git diff-files -c`, it compares the +two unresolved merge parents with the working tree file +(i.e. file1 is stage 2 aka "our version", file2 is stage 3 aka +"their version"). diff --git a/git/mingw64/share/doc/git-doc/diff-options.adoc b/git/mingw64/share/doc/git-doc/diff-options.adoc new file mode 100644 index 0000000000000000000000000000000000000000..8a63b5e164114ad7d16a01b6c302f44170f5db17 --- /dev/null +++ b/git/mingw64/share/doc/git-doc/diff-options.adoc @@ -0,0 +1,917 @@ +// Please don't remove this comment as asciidoc behaves badly when +// the first non-empty line is ifdef/ifndef. The symptom is that +// without this comment the attribute conditionally +// defined below ends up being defined unconditionally. +// Last checked with asciidoc 7.0.2. + +ifndef::git-format-patch[] +ifndef::git-diff[] +ifndef::git-log[] +:git-diff-core: 1 +endif::git-log[] +endif::git-diff[] +endif::git-format-patch[] + +ifdef::git-format-patch[] +-p:: +--no-stat:: + Generate plain patches without any diffstats. +endif::git-format-patch[] + +ifndef::git-format-patch[] +`-p`:: +`-u`:: +`--patch`:: + Generate patch (see <>). +ifdef::git-diff[] + This is the default. +endif::git-diff[] + +`-s`:: +`--no-patch`:: + Suppress all output from the diff machinery. Useful for + commands like `git show` that show the patch by default to + squelch their output, or to cancel the effect of options like + `--patch`, `--stat` earlier on the command line in an alias. + +endif::git-format-patch[] + +ifdef::git-log[] +`-m`:: + Show diffs for merge commits in the default format. This is + similar to `--diff-merges=on`, except `-m` will + produce no output unless `-p` is given as well. + +`-c`:: + Produce combined diff output for merge commits. + Shortcut for `--diff-merges=combined -p`. + +`--cc`:: + Produce dense combined diff output for merge commits. + Shortcut for `--diff-merges=dense-combined -p`. + +`--dd`:: + Produce diff with respect to first parent for both merge and + regular commits. + Shortcut for `--diff-merges=first-parent -p`. + +`--remerge-diff`:: + Produce remerge-diff output for merge commits. + Shortcut for `--diff-merges=remerge -p`. + +`--no-diff-merges`:: + Synonym for `--diff-merges=off`. + +`--diff-merges=`:: + Specify diff format to be used for merge commits. Default is + {diff-merges-default} unless `--first-parent` is in use, in + which case `first-parent` is the default. ++ +The following formats are supported: ++ +-- +`off`:: +`none`:: + Disable output of diffs for merge commits. Useful to override + implied value. + +`on`:: +`m`:: + Make diff output for merge commits to be shown in the default + format. The default format can be changed using + `log.diffMerges` configuration variable, whose default value + is `separate`. + +`first-parent`:: +`1`:: + Show full diff with respect to first parent. This is the same + format as `--patch` produces for non-merge commits. + +`separate`:: + Show full diff with respect to each of parents. + Separate log entry and diff is generated for each parent. + +`combined`:: +`c`:: + Show differences from each of the parents to the merge + result simultaneously instead of showing pairwise diff between + a parent and the result one at a time. Furthermore, it lists + only files which were modified from all parents. + +`dense-combined`:: +`cc`:: + Further compress output produced by `--diff-merges=combined` + by omitting uninteresting hunks whose contents in the parents + have only two variants and the merge result picks one of them + without modification. + +`remerge`:: +`r`:: Remerge two-parent merge commits to create a temporary tree + object--potentially containing files with conflict markers + and such. A diff is then shown between that temporary tree + and the actual merge commit. +-- ++ +The output emitted when this option is used is subject to change, and +so is its interaction with other options (unless explicitly +documented). + + +`--combined-all-paths`:: + Cause combined diffs (used for merge commits) to + list the name of the file from all parents. It thus only has + effect when `--diff-merges=[dense-]combined` is in use, and + is likely only useful if filename changes are detected (i.e. + when either rename or copy detection have been requested). +endif::git-log[] + +`-U`:: +`--unified=`:: + Generate diffs with __ lines of context. The number of context + lines defaults to `diff.context` or 3 if the configuration variable + is unset. (`-U` without `` is silently accepted as a synonym for + `-p` due to a historical accident). +ifndef::git-format-patch[] + Implies `--patch`. +endif::git-format-patch[] + +`--output=`:: + Output to a specific file instead of stdout. + +`--output-indicator-new=`:: +`--output-indicator-old=`:: +`--output-indicator-context=`:: + Specify the character used to indicate new, old or context + lines in the generated patch. Normally they are `+`, `-` and + ' ' respectively. + +ifndef::git-format-patch[] +`--raw`:: +ifndef::git-log[] + Generate the diff in raw format. +ifdef::git-diff-core[] + This is the default. +endif::git-diff-core[] +endif::git-log[] +ifdef::git-log[] + For each commit, show a summary of changes using the raw diff + format. See the "RAW OUTPUT FORMAT" section of + linkgit:git-diff[1]. This is different from showing the log + itself in raw format, which you can achieve with + `--format=raw`. +endif::git-log[] +endif::git-format-patch[] + +ifndef::git-format-patch[] +`--patch-with-raw`:: + Synonym for `-p --raw`. +endif::git-format-patch[] + +ifdef::git-log[] +`-t`:: + Show the tree objects in the diff output. +endif::git-log[] + +`--indent-heuristic`:: + Enable the heuristic that shifts diff hunk boundaries to make patches + easier to read. This is the default. + +`--no-indent-heuristic`:: + Disable the indent heuristic. + +`--minimal`:: + Spend extra time to make sure the smallest possible + diff is produced. + +`--patience`:: + Generate a diff using the "patience diff" algorithm. + +`--histogram`:: + Generate a diff using the "histogram diff" algorithm. + +`--anchored=`:: + Generate a diff using the "anchored diff" algorithm. ++ +This option may be specified more than once. ++ +If a line exists in both the source and destination, exists only once, +and starts with __, this algorithm attempts to prevent it from +appearing as a deletion or addition in the output. It uses the "patience +diff" algorithm internally. + +include::diff-algorithm-option.adoc[] + +`--stat[=[,[,]]]`:: + Generate a diffstat. By default, as much space as necessary + will be used for the filename part, and the rest for the graph + part. Maximum width defaults to terminal width, or 80 columns + if not connected to a terminal, and can be overridden by + __. The width of the filename part can be limited by + giving another width __ after a comma or by setting + `diff.statNameWidth=`. The width of the graph part can be + limited by using `--stat-graph-width=` or by setting + `diff.statGraphWidth=`. Using `--stat` or + `--stat-graph-width` affects all commands generating a stat graph, + while setting `diff.statNameWidth` or `diff.statGraphWidth` + does not affect `git format-patch`. + By giving a third parameter __, you can limit the output to + the first __ lines, followed by `...` if there are more. ++ +These parameters can also be set individually with `--stat-width=`, +`--stat-name-width=` and `--stat-count=`. + +`--compact-summary`:: + Output a condensed summary of extended header information such + as file creations or deletions ("new" or "gone", optionally `+l` + if it's a symlink) and mode changes (`+x` or `-x` for adding + or removing executable bit respectively) in diffstat. The + information is put between the filename part and the graph + part. Implies `--stat`. + +`--numstat`:: + Similar to `--stat`, but shows number of added and + deleted lines in decimal notation and pathname without + abbreviation, to make it more machine friendly. For + binary files, outputs two `-` instead of saying + `0 0`. + +`--shortstat`:: + Output only the last line of the `--stat` format containing total + number of modified files, as well as number of added and deleted + lines. + +`-X [,...]`:: +`--dirstat[=,...]`:: + Output the distribution of relative amount of changes for each + sub-directory. The behavior of `--dirstat` can be customized by + passing it a comma separated list of parameters. + The defaults are controlled by the `diff.dirstat` configuration + variable (see linkgit:git-config[1]). + The following parameters are available: ++ +-- +`changes`;; + Compute the dirstat numbers by counting the lines that have been + removed from the source, or added to the destination. This ignores + the amount of pure code movements within a file. In other words, + rearranging lines in a file is not counted as much as other changes. + This is the default behavior when no parameter is given. +`lines`;; + Compute the dirstat numbers by doing the regular line-based diff + analysis, and summing the removed/added line counts. (For binary + files, count 64-byte chunks instead, since binary files have no + natural concept of lines). This is a more expensive `--dirstat` + behavior than the `changes` behavior, but it does count rearranged + lines within a file as much as other changes. The resulting output + is consistent with what you get from the other `--*stat` options. +`files`;; + Compute the dirstat numbers by counting the number of files changed. + Each changed file counts equally in the dirstat analysis. This is + the computationally cheapest `--dirstat` behavior, since it does + not have to look at the file contents at all. +`cumulative`;; + Count changes in a child directory for the parent directory as well. + Note that when using `cumulative`, the sum of the percentages + reported may exceed 100%. The default (non-cumulative) behavior can + be specified with the `noncumulative` parameter. +__;; + An integer parameter specifies a cut-off percent (3% by default). + Directories contributing less than this percentage of the changes + are not shown in the output. +-- ++ +Example: The following will count changed files, while ignoring +directories with less than 10% of the total amount of changed files, +and accumulating child directory counts in the parent directories: +`--dirstat=files,10,cumulative`. + +`--cumulative`:: + Synonym for `--dirstat=cumulative`. + +`--dirstat-by-file[=,...]`:: + Synonym for `--dirstat=files,,...`. + +`--summary`:: + Output a condensed summary of extended header information + such as creations, renames and mode changes. + +ifndef::git-format-patch[] +`--patch-with-stat`:: + Synonym for `-p --stat`. +endif::git-format-patch[] + +ifndef::git-format-patch[] + +`-z`:: +ifdef::git-log[] + Separate the commits with __NUL__s instead of newlines. ++ +Also, when `--raw` or `--numstat` has been given, do not munge +pathnames and use __NUL__s as output field terminators. +endif::git-log[] +ifndef::git-log[] + When `--raw`, `--numstat`, `--name-only` or `--name-status` has been + given, do not munge pathnames and use NULs as output field terminators. +endif::git-log[] ++ +Without this option, pathnames with "unusual" characters are quoted as +explained for the configuration variable `core.quotePath` (see +linkgit:git-config[1]). + +`--name-only`:: + Show only the name of each changed file in the post-image tree. + The file names are often encoded in UTF-8. + For more information see the discussion about encoding in the linkgit:git-log[1] + manual page. + +`--name-status`:: + Show only the name(s) and status of each changed file. See the description + of the `--diff-filter` option on what the status letters mean. + Just like `--name-only` the file names are often encoded in UTF-8. + +`--submodule[=]`:: + Specify how differences in submodules are shown. When specifying + `--submodule=short` the `short` format is used. This format just + shows the names of the commits at the beginning and end of the range. + When `--submodule` or `--submodule=log` is specified, the `log` + format is used. This format lists the commits in the range like + linkgit:git-submodule[1] `summary` does. When `--submodule=diff` + is specified, the `diff` format is used. This format shows an + inline diff of the changes in the submodule contents between the + commit range. Defaults to `diff.submodule` or the `short` format + if the config option is unset. + +`--color[=]`:: + Show colored diff. + `--color` (i.e. without `=`) is the same as `--color=always`. + __ can be one of `always`, `never`, or `auto`. +ifdef::git-diff[] + It can be changed by the `color.ui` and `color.diff` + configuration settings. +endif::git-diff[] + +`--no-color`:: + Turn off colored diff. +ifdef::git-diff[] + This can be used to override configuration settings. +endif::git-diff[] + It is the same as `--color=never`. + +`--color-moved[=]`:: + Moved lines of code are colored differently. +ifdef::git-diff[] + It can be changed by the `diff.colorMoved` configuration setting. +endif::git-diff[] + The __ defaults to `no` if the option is not given + and to `zebra` if the option with no mode is given. + The mode must be one of: ++ +-- +`no`:: + Moved lines are not highlighted. +`default`:: + Is a synonym for `zebra`. This may change to a more sensible mode + in the future. +`plain`:: + Any line that is added in one location and was removed + in another location will be colored with `color.diff.newMoved`. + Similarly `color.diff.oldMoved` will be used for removed lines + that are added somewhere else in the diff. This mode picks up any + moved line, but it is not very useful in a review to determine + if a block of code was moved without permutation. +`blocks`:: + Blocks of moved text of at least 20 alphanumeric characters + are detected greedily. The detected blocks are + painted using either the `color.diff.(old|new)Moved` color. + Adjacent blocks cannot be told apart. +`zebra`:: + Blocks of moved text are detected as in `blocks` mode. The blocks + are painted using either the `color.diff.(old|new)Moved` color or + `color.diff.(old|new)MovedAlternative`. The change between + the two colors indicates that a new block was detected. +`dimmed-zebra`:: + Similar to `zebra`, but additional dimming of uninteresting parts + of moved code is performed. The bordering lines of two adjacent + blocks are considered interesting, the rest is uninteresting. + `dimmed_zebra` is a deprecated synonym. +-- + +`--no-color-moved`:: + Turn off move detection. This can be used to override configuration + settings. It is the same as `--color-moved=no`. + +`--color-moved-ws=,...`:: + This configures how whitespace is ignored when performing the + move detection for `--color-moved`. +ifdef::git-diff[] + It can be set by the `diff.colorMovedWS` configuration setting. +endif::git-diff[] + These modes can be given as a comma separated list: ++ +-- +`no`:: + Do not ignore whitespace when performing move detection. +`ignore-space-at-eol`:: + Ignore changes in whitespace at EOL. +`ignore-space-change`:: + Ignore changes in amount of whitespace. This ignores whitespace + at line end, and considers all other sequences of one or + more whitespace characters to be equivalent. +`ignore-all-space`:: + Ignore whitespace when comparing lines. This ignores differences + even if one line has whitespace where the other line has none. +`allow-indentation-change`:: + Initially ignore any whitespace in the move detection, then + group the moved code blocks only into a block if the change in + whitespace is the same per line. This is incompatible with the + other modes. +-- + +`--no-color-moved-ws`:: + Do not ignore whitespace when performing move detection. This can be + used to override configuration settings. It is the same as + `--color-moved-ws=no`. + +`--word-diff[=]`:: + By default, words are delimited by whitespace; see + `--word-diff-regex` below. The __ defaults to `plain`, and + must be one of: ++ +-- +`color`:: + Highlight changed words using only colors. Implies `--color`. +`plain`:: + Show words as ++[-removed-]++ and ++{+added+}++. Makes no + attempts to escape the delimiters if they appear in the input, + so the output may be ambiguous. +`porcelain`:: + Use a special line-based format intended for script + consumption. Added/removed/unchanged runs are printed in the + usual unified diff format, starting with a `+`/`-`/` ` + character at the beginning of the line and extending to the + end of the line. Newlines in the input are represented by a + tilde `~` on a line of its own. +`none`:: + Disable word diff again. +-- ++ +Note that despite the name of the first mode, color is used to +highlight the changed parts in all modes if enabled. + +`--word-diff-regex=`:: + Use __ to decide what a word is, instead of considering + runs of non-whitespace to be a word. Also implies + `--word-diff` unless it was already enabled. ++ +Every non-overlapping match of the +__ is considered a word. Anything between these matches is +considered whitespace and ignored(!) for the purposes of finding +differences. You may want to append `|[^[:space:]]` to your regular +expression to make sure that it matches all non-whitespace characters. +A match that contains a newline is silently truncated(!) at the +newline. ++ +For example, `--word-diff-regex=.` will treat each character as a word +and, correspondingly, show differences character by character. ++ +The regex can also be set via a diff driver or configuration option, see +linkgit:gitattributes[5] or linkgit:git-config[1]. Giving it explicitly +overrides any diff driver or configuration setting. Diff drivers +override configuration settings. + +`--color-words[=]`:: + Equivalent to `--word-diff=color` plus (if a regex was + specified) `--word-diff-regex=`. +endif::git-format-patch[] + +`--no-renames`:: + Turn off rename detection, even when the configuration + file gives the default to do so. + +`--rename-empty`:: +`--no-rename-empty`:: + Whether to use empty blobs as rename source. + +ifndef::git-format-patch[] +`--check`:: + Warn if changes introduce conflict markers or whitespace errors. + What are considered whitespace errors is controlled by `core.whitespace` + configuration. By default, trailing whitespaces (including + lines that consist solely of whitespaces) and a space character + that is immediately followed by a tab character inside the + initial indent of the line are considered whitespace errors. + Exits with non-zero status if problems are found. Not compatible + with `--exit-code`. + +`--ws-error-highlight=`:: + Highlight whitespace errors in the `context`, `old` or `new` + lines of the diff. Multiple values are separated by comma, + `none` resets previous values, `default` reset the list to + `new` and `all` is a shorthand for `old,new,context`. When + this option is not given, and the configuration variable + `diff.wsErrorHighlight` is not set, only whitespace errors in + `new` lines are highlighted. The whitespace errors are colored + with `color.diff.whitespace`. + +endif::git-format-patch[] + +`--full-index`:: + Instead of the first handful of characters, show the full + pre- and post-image blob object names on the "index" + line when generating patch format output. + +`--binary`:: + In addition to `--full-index`, output a binary diff that + can be applied with `git-apply`. +ifndef::git-format-patch[] + Implies `--patch`. +endif::git-format-patch[] + +`--abbrev[=]`:: + Instead of showing the full 40-byte hexadecimal object + name in diff-raw format output and diff-tree header + lines, show the shortest prefix that is at least __ + hexdigits long that uniquely refers the object. + In diff-patch output format, `--full-index` takes higher + precedence, i.e. if `--full-index` is specified, full blob + names will be shown regardless of `--abbrev`. + Non default number of digits can be specified with `--abbrev=`. + +`-B[][/]`:: +`--break-rewrites[=[][/]]`:: + Break complete rewrite changes into pairs of delete and + create. This serves two purposes: ++ +It affects the way a change that amounts to a total rewrite of a file +not as a series of deletion and insertion mixed together with a very +few lines that happen to match textually as the context, but as a +single deletion of everything old followed by a single insertion of +everything new, and the number __ controls this aspect of the `-B` +option (defaults to 60%). `-B/70%` specifies that less than 30% of the +original should remain in the result for Git to consider it a total +rewrite (i.e. otherwise the resulting patch will be a series of +deletion and insertion mixed together with context lines). ++ +When used with `-M`, a totally-rewritten file is also considered as the +source of a rename (usually `-M` only considers a file that disappeared +as the source of a rename), and the number __ controls this aspect of +the `-B` option (defaults to 50%). `-B20%` specifies that a change with +addition and deletion compared to 20% or more of the file's size are +eligible for being picked up as a possible source of a rename to +another file. + +`-M[]`:: +`--find-renames[=]`:: +ifndef::git-log[] + Detect renames. +endif::git-log[] +ifdef::git-log[] + If generating diffs, detect and report renames for each commit. + For following files across renames while traversing history, see + `--follow`. +endif::git-log[] + If __ is specified, it is a threshold on the similarity + index (i.e. amount of addition/deletions compared to the + file's size). For example, `-M90%` means Git should consider a + delete/add pair to be a rename if more than 90% of the file + hasn't changed. Without a `%` sign, the number is to be read as + a fraction, with a decimal point before it. I.e., `-M5` becomes + 0.5, and is thus the same as `-M50%`. Similarly, `-M05` is + the same as `-M5%`. To limit detection to exact renames, use + `-M100%`. The default similarity index is 50%. + +`-C[]`:: +`--find-copies[=]`:: + Detect copies as well as renames. See also `--find-copies-harder`. + If __ is specified, it has the same meaning as for `-M`. + +`--find-copies-harder`:: + For performance reasons, by default, `-C` option finds copies only + if the original file of the copy was modified in the same + changeset. This flag makes the command + inspect unmodified files as candidates for the source of + copy. This is a very expensive operation for large + projects, so use it with caution. Giving more than one + `-C` option has the same effect. + +`-D`:: +`--irreversible-delete`:: + Omit the preimage for deletes, i.e. print only the header but not + the diff between the preimage and `/dev/null`. The resulting patch + is not meant to be applied with `patch` or `git apply`; this is + solely for people who want to just concentrate on reviewing the + text after the change. In addition, the output obviously lacks + enough information to apply such a patch in reverse, even manually, + hence the name of the option. ++ +When used together with `-B`, omit also the preimage in the deletion part +of a delete/create pair. + +`-l`:: + The `-M` and `-C` options involve some preliminary steps that + can detect subsets of renames/copies cheaply, followed by an + exhaustive fallback portion that compares all remaining + unpaired destinations to all relevant sources. (For renames, + only remaining unpaired sources are relevant; for copies, all + original sources are relevant.) For N sources and + destinations, this exhaustive check is O(N^2). This option + prevents the exhaustive portion of rename/copy detection from + running if the number of source/destination files involved + exceeds the specified number. Defaults to `diff.renameLimit`. + Note that a value of 0 is treated as unlimited. + +ifndef::git-format-patch[] +`--diff-filter=[(A|C|D|M|R|T|U|X|B)...[*]]`:: + Select only files that are Added (`A`), Copied (`C`), + Deleted (`D`), Modified (`M`), Renamed (`R`), have their + type (i.e. regular file, symlink, submodule, ...) changed (`T`), + are Unmerged (`U`), are + Unknown (`X`), or have had their pairing Broken (`B`). + Any combination of the filter characters (including none) can be used. + When `*` (All-or-none) is added to the combination, all + paths are selected if there is any file that matches + other criteria in the comparison; if there is no file + that matches other criteria, nothing is selected. ++ +Also, these upper-case letters can be downcased to exclude. E.g. +`--diff-filter=ad` excludes added and deleted paths. ++ +Note that not all diffs can feature all types. For instance, copied and +renamed entries cannot appear if detection for those types is disabled. + +`-S`:: + Look for differences that change the number of occurrences of + the specified __ (i.e. addition/deletion) in a file. + Intended for the scripter's use. ++ +It is useful when you're looking for an exact block of code (like a +struct), and want to know the history of that block since it first +came into being: use the feature iteratively to feed the interesting +block in the preimage back into `-S`, and keep going until you get the +very first version of the block. ++ +Binary files are searched as well. + +`-G`:: + Look for differences whose patch text contains added/removed + lines that match __. ++ +To illustrate the difference between `-S` `--pickaxe-regex` and +`-G`, consider a commit with the following diff in the same +file: ++ +---- ++ return frotz(nitfol, two->ptr, 1, 0); +... +- hit = frotz(nitfol, mf2.ptr, 1, 0); +---- ++ +While `git log -G"frotz\(nitfol"` will show this commit, `git log +-S"frotz\(nitfol" --pickaxe-regex` will not (because the number of +occurrences of that string did not change). ++ +Unless `--text` is supplied patches of binary files without a textconv +filter will be ignored. ++ +See the 'pickaxe' entry in linkgit:gitdiffcore[7] for more +information. + +`--find-object=`:: + Look for differences that change the number of occurrences of + the specified object. Similar to `-S`, just the argument is different + in that it doesn't search for a specific string but for a specific + object id. ++ +The object can be a blob or a submodule commit. It implies the `-t` option in +`git-log` to also find trees. + +`--pickaxe-all`:: + When `-S` or `-G` finds a change, show all the changes in that + changeset, not just the files that contain the change + in __. + +`--pickaxe-regex`:: + Treat the __ given to `-S` as an extended POSIX regular + expression to match. + +endif::git-format-patch[] + +`-O`:: + Control the order in which files appear in the output. + This overrides the `diff.orderFile` configuration variable + (see linkgit:git-config[1]). To cancel `diff.orderFile`, + use `-O/dev/null`. ++ +The output order is determined by the order of glob patterns in +__. +All files with pathnames that match the first pattern are output +first, all files with pathnames that match the second pattern (but not +the first) are output next, and so on. +All files with pathnames that do not match any pattern are output +last, as if there was an implicit match-all pattern at the end of the +file. +If multiple pathnames have the same rank (they match the same pattern +but no earlier patterns), their output order relative to each other is +the normal order. ++ +__ is parsed as follows: ++ +-- + - Blank lines are ignored, so they can be used as separators for + readability. + + - Lines starting with a hash ("`#`") are ignored, so they can be used + for comments. Add a backslash ("`\`") to the beginning of the + pattern if it starts with a hash. + + - Each other line contains a single pattern. +-- ++ +Patterns have the same syntax and semantics as patterns used for +`fnmatch`(3) without the `FNM_PATHNAME` flag, except a pathname also +matches a pattern if removing any number of the final pathname +components matches the pattern. For example, the pattern "`foo*bar`" +matches "`fooasdfbar`" and "`foo/bar/baz/asdf`" but not "`foobarx`". + +`--skip-to=`:: +`--rotate-to=`:: + Discard the files before the named __ from the output + (i.e. 'skip to'), or move them to the end of the output + (i.e. 'rotate to'). These options were invented primarily for the use + of the `git difftool` command, and may not be very useful + otherwise. + +ifndef::git-format-patch[] +`-R`:: + Swap two inputs; that is, show differences from index or + on-disk file to tree contents. +endif::git-format-patch[] + +`--relative[=]`:: +`--no-relative`:: + When run from a subdirectory of the project, it can be + told to exclude changes outside the directory and show + pathnames relative to it with this option. When you are + not in a subdirectory (e.g. in a bare repository), you + can name which subdirectory to make the output relative + to by giving a __ as an argument. + `--no-relative` can be used to countermand both `diff.relative` config + option and previous `--relative`. + +`-a`:: +`--text`:: + Treat all files as text. + +`--ignore-cr-at-eol`:: + Ignore carriage-return at the end of line when doing a comparison. + +`--ignore-space-at-eol`:: + Ignore changes in whitespace at EOL. + +`-b`:: +`--ignore-space-change`:: + Ignore changes in amount of whitespace. This ignores whitespace + at line end, and considers all other sequences of one or + more whitespace characters to be equivalent. + +`-w`:: +`--ignore-all-space`:: + Ignore whitespace when comparing lines. This ignores + differences even if one line has whitespace where the other + line has none. + +`--ignore-blank-lines`:: + Ignore changes whose lines are all blank. + + +`-I`:: +`--ignore-matching-lines=`:: + Ignore changes whose all lines match __. This option may + be specified more than once. + +`--inter-hunk-context=`:: + Show the context between diff hunks, up to the specified __ + of lines, thereby fusing hunks that are close to each other. + Defaults to `diff.interHunkContext` or 0 if the config option + is unset. + +`-W`:: +`--function-context`:: + Show whole function as context lines for each change. + The function names are determined in the same way as + `git diff` works out patch hunk headers (see "Defining a + custom hunk-header" in linkgit:gitattributes[5]). + +ifndef::git-format-patch[] +ifndef::git-log[] +`--exit-code`:: + Make the program exit with codes similar to `diff`(1). + That is, it exits with 1 if there were differences and + 0 means no differences. + +`--quiet`:: + Disable all output of the program. Implies `--exit-code`. + Disables execution of external diff helpers whose exit code + is not trusted, i.e. their respective configuration option + `diff.trustExitCode` or ++diff.++____++.trustExitCode++ or + environment variable `GIT_EXTERNAL_DIFF_TRUST_EXIT_CODE` is + false. +endif::git-log[] +endif::git-format-patch[] + +`--ext-diff`:: + Allow an external diff helper to be executed. If you set an + external diff driver with linkgit:gitattributes[5], you need + to use this option with linkgit:git-log[1] and friends. + +`--no-ext-diff`:: + Disallow external diff drivers. + +`--textconv`:: +`--no-textconv`:: + Allow (or disallow) external text conversion filters to be run + when comparing binary files. See linkgit:gitattributes[5] for + details. Because textconv filters are typically a one-way + conversion, the resulting diff is suitable for human + consumption, but cannot be applied. For this reason, textconv + filters are enabled by default only for linkgit:git-diff[1] and + linkgit:git-log[1], but not for linkgit:git-format-patch[1] or + diff plumbing commands. + + +`--ignore-submodules[=(none|untracked|dirty|all)]`:: + Ignore changes to submodules in the diff generation. `all` is the default. + Using `none` will consider the submodule modified when it either contains + untracked or modified files or its `HEAD` differs from the commit recorded + in the superproject and can be used to override any settings of the + `ignore` option in linkgit:git-config[1] or linkgit:gitmodules[5]. When + `untracked` is used submodules are not considered dirty when they only + contain untracked content (but they are still scanned for modified + content). Using `dirty` ignores all changes to the work tree of submodules, + only changes to the commits stored in the superproject are shown (this was + the behavior until 1.7.0). Using `all` hides all changes to submodules. + +`--src-prefix=`:: + Show the given source __ instead of "a/". + +`--dst-prefix=`:: + Show the given destination __ instead of "b/". + +`--no-prefix`:: + Do not show any source or destination prefix. + +`--default-prefix`:: +ifdef::git-format-patch[] + Use the default source and destination prefixes ("a/" and "b/"). + This overrides configuration variables such as `format.noprefix`, + `diff.srcPrefix`, `diff.dstPrefix`, and `diff.mnemonicPrefix` + (see linkgit:git-config[1]). +endif::git-format-patch[] +ifndef::git-format-patch[] + Use the default source and destination prefixes ("a/" and "b/"). + This overrides configuration variables such as `diff.noprefix`, + `diff.srcPrefix`, `diff.dstPrefix`, and `diff.mnemonicPrefix` + (see linkgit:git-config[1]). +endif::git-format-patch[] + +`--line-prefix=`:: + Prepend an additional __ to every line of output. + +`--ita-invisible-in-index`:: + By default entries added by `git add -N` appear as an existing + empty file in `git diff` and a new file in `git diff --cached`. + This option makes the entry appear as a new file in `git diff` + and non-existent in `git diff --cached`. This option could be + reverted with `--ita-visible-in-index`. Both options are + experimental and could be removed in future. + +--max-depth=:: + For each pathspec given on command line, descend at most `` + levels of directories. A value of `-1` means no limit. + Cannot be combined with wildcards in the pathspec. + Given a tree containing `foo/bar/baz`, the following list shows the + matches generated by each set of options: ++ +-- + - `--max-depth=0 -- foo`: `foo` + + - `--max-depth=1 -- foo`: `foo/bar` + + - `--max-depth=1 -- foo/bar`: `foo/bar/baz` + + - `--max-depth=1 -- foo foo/bar`: `foo/bar/baz` + + - `--max-depth=2 -- foo`: `foo/bar/baz` +-- ++ +If no pathspec is given, the depth is measured as if all +top-level entries were specified. Note that this is different +than measuring from the root, in that `--max-depth=0` would +still return `foo`. This allows you to still limit depth while +asking for a subset of the top-level entries. ++ +Note that this option is only supported for diffs between tree objects, +not against the index or working tree. + +For more detailed explanation on these common options, see also +linkgit:gitdiffcore[7]. diff --git a/git/mingw64/share/doc/git-doc/docbook-xsl.css b/git/mingw64/share/doc/git-doc/docbook-xsl.css new file mode 100644 index 0000000000000000000000000000000000000000..8519d5689a92b0fa3ea1f31f5409ab790b5d4653 --- /dev/null +++ b/git/mingw64/share/doc/git-doc/docbook-xsl.css @@ -0,0 +1,296 @@ +/* + CSS stylesheet for XHTML produced by DocBook XSL stylesheets. + Tested with XSL stylesheets 1.61.2, 1.67.2 +*/ + +span.strong { + font-weight: bold; +} + +body blockquote { + margin-top: .75em; + line-height: 1.5; + margin-bottom: .75em; +} + +html body { + margin: 1em 5% 1em 5%; + line-height: 1.2; + font-family: sans-serif; +} + +body div { + margin: 0; +} + +h1, h2, h3, h4, h5, h6, +div.toc p b, +div.list-of-figures p b, +div.list-of-tables p b, +div.abstract p.title +{ + color: #527bbd; + font-family: tahoma, verdana, sans-serif; +} + +div.toc p:first-child, +div.list-of-figures p:first-child, +div.list-of-tables p:first-child, +div.example p.title +{ + margin-bottom: 0.2em; +} + +body h1 { + margin: .0em 0 0 -4%; + line-height: 1.3; + border-bottom: 2px solid silver; +} + +body h2 { + margin: 0.5em 0 0 -4%; + line-height: 1.3; + border-bottom: 2px solid silver; +} + +body h3 { + margin: .8em 0 0 -3%; + line-height: 1.3; +} + +body h4 { + margin: .8em 0 0 -3%; + line-height: 1.3; +} + +body h5 { + margin: .8em 0 0 -2%; + line-height: 1.3; +} + +body h6 { + margin: .8em 0 0 -1%; + line-height: 1.3; +} + +body hr { + border: none; /* Broken on IE6 */ +} +div.footnotes hr { + border: 1px solid silver; +} + +div.navheader th, div.navheader td, div.navfooter td { + font-family: sans-serif; + font-size: 0.9em; + font-weight: bold; + color: #527bbd; +} +div.navheader img, div.navfooter img { + border-style: none; +} +div.navheader a, div.navfooter a { + font-weight: normal; +} +div.navfooter hr { + border: 1px solid silver; +} + +body td { + line-height: 1.2 +} + +body th { + line-height: 1.2; +} + +ol { + line-height: 1.2; +} + +ul, body dir, body menu { + line-height: 1.2; +} + +html { + margin: 0; + padding: 0; +} + +body h1, body h2, body h3, body h4, body h5, body h6 { + margin-left: 0 +} + +body pre { + margin: 0.5em 10% 0.5em 1em; + line-height: 1.0; + color: navy; +} + +tt.literal, code.literal { + color: navy; + font-family: sans-serif; +} + +code.literal:before { content: "'"; } +code.literal:after { content: "'"; } + +em { + font-style: italic; + color: #064; +} + +div.literallayout p { + padding: 0em; + margin: 0em; +} + +div.literallayout { + font-family: monospace; + margin: 0em; + color: navy; + border: 1px solid silver; + background: #f4f4f4; + padding: 0.5em; +} + +.programlisting, .screen { + border: 1px solid silver; + background: #f4f4f4; + margin: 0.5em 10% 0.5em 0; + padding: 0.5em 1em; +} + +div.sidebar { + background: #ffffee; + margin: 1.0em 10% 0.5em 0; + padding: 0.5em 1em; + border: 1px solid silver; +} +div.sidebar * { padding: 0; } +div.sidebar div { margin: 0; } +div.sidebar p.title { + font-family: sans-serif; + margin-top: 0.5em; + margin-bottom: 0.2em; +} + +div.bibliomixed { + margin: 0.5em 5% 0.5em 1em; +} + +div.glossary dt { + font-weight: bold; +} +div.glossary dd p { + margin-top: 0.2em; +} + +dl { + margin: .8em 0; + line-height: 1.2; +} + +dt { + margin-top: 0.5em; +} + +dt span.term { + font-style: normal; + color: navy; +} + +div.variablelist dd p { + margin-top: 0; +} + +div.itemizedlist li, div.orderedlist li { + margin-left: -0.8em; + margin-top: 0.5em; +} + +ul, ol { + list-style-position: outside; +} + +div.sidebar ul, div.sidebar ol { + margin-left: 2.8em; +} + +div.itemizedlist p.title, +div.orderedlist p.title, +div.variablelist p.title +{ + margin-bottom: -0.8em; +} + +div.revhistory table { + border-collapse: collapse; + border: none; +} +div.revhistory th { + border: none; + color: #527bbd; + font-family: tahoma, verdana, sans-serif; +} +div.revhistory td { + border: 1px solid silver; +} + +/* Keep TOC and index lines close together. */ +div.toc dl, div.toc dt, +div.list-of-figures dl, div.list-of-figures dt, +div.list-of-tables dl, div.list-of-tables dt, +div.indexdiv dl, div.indexdiv dt +{ + line-height: normal; + margin-top: 0; + margin-bottom: 0; +} + +/* + Table styling does not work because of overriding attributes in + generated HTML. +*/ +div.table table, +div.informaltable table +{ + margin-left: 0; + margin-right: 5%; + margin-bottom: 0.8em; +} +div.informaltable table +{ + margin-top: 0.4em +} +div.table thead, +div.table tfoot, +div.table tbody, +div.informaltable thead, +div.informaltable tfoot, +div.informaltable tbody +{ + /* No effect in IE6. */ + border-top: 2px solid #527bbd; + border-bottom: 2px solid #527bbd; +} +div.table thead, div.table tfoot, +div.informaltable thead, div.informaltable tfoot +{ + font-weight: bold; +} + +div.mediaobject img { + border: 1px solid silver; + margin-bottom: 0.8em; +} +div.figure p.title, +div.table p.title +{ + margin-top: 1em; + margin-bottom: 0.4em; +} + +@media print { + div.navheader, div.navfooter { display: none; } +} diff --git a/git/mingw64/share/doc/git-doc/docinfo.html b/git/mingw64/share/doc/git-doc/docinfo.html new file mode 100644 index 0000000000000000000000000000000000000000..fbc8e18bade9bb2172b3039c4446779d5a059889 --- /dev/null +++ b/git/mingw64/share/doc/git-doc/docinfo.html @@ -0,0 +1,5 @@ + diff --git a/git/mingw64/share/doc/git-doc/everyday.html b/git/mingw64/share/doc/git-doc/everyday.html new file mode 100644 index 0000000000000000000000000000000000000000..ce3a5af5472f3d32de892f820b4e376f1532809e --- /dev/null +++ b/git/mingw64/share/doc/git-doc/everyday.html @@ -0,0 +1,464 @@ + + + + + + + +Everyday Git With 20 Commands Or So + + + + + + +
+
+

This document has been moved to giteveryday(7).

+
+
+

Please let the owners of the referring site know so that they can update the +link you clicked to get here.

+
+
+

Thanks.

+
+
+ + + \ No newline at end of file diff --git a/git/mingw64/share/doc/git-doc/fetch-options.adoc b/git/mingw64/share/doc/git-doc/fetch-options.adoc new file mode 100644 index 0000000000000000000000000000000000000000..81a9d7f9bbc11db582f84b6022df01832528b24c --- /dev/null +++ b/git/mingw64/share/doc/git-doc/fetch-options.adoc @@ -0,0 +1,358 @@ +`--all`:: +`--no-all`:: + Fetch all remotes, except for the ones that has the + `remote..skipFetchAll` configuration variable set. + This overrides the configuration variable `fetch.all`. + +`-a`:: +`--append`:: + Append ref names and object names of fetched refs to the + existing contents of `.git/FETCH_HEAD`. Without this + option old data in `.git/FETCH_HEAD` will be overwritten. + +`--atomic`:: + Use an atomic transaction to update local refs. Either all refs are + updated, or on error, no refs are updated. + +`--depth=`:: + Limit fetching to the specified number of commits from the tip of + each remote branch history. If fetching to a 'shallow' repository + created by `git clone` with `--depth=` option (see + linkgit:git-clone[1]), deepen or shorten the history to the specified + number of commits. Tags for the deepened commits are not fetched. + +`--deepen=`:: + Similar to `--depth`, except it specifies the number of commits + from the current shallow boundary instead of from the tip of + each remote branch history. + +`--shallow-since=`:: + Deepen or shorten the history of a shallow repository to + include all reachable commits after __. + +`--shallow-exclude=`:: + Deepen or shorten the history of a shallow repository to + exclude commits reachable from a specified remote branch or tag. + This option can be specified multiple times. + +`--unshallow`:: + If the source repository is complete, convert a shallow + repository to a complete one, removing all the limitations + imposed by shallow repositories. ++ +If the source repository is shallow, fetch as much as possible so that +the current repository has the same history as the source repository. + +`--update-shallow`:: + By default when fetching from a shallow repository, + `git fetch` refuses refs that require updating + `.git/shallow`. This option updates `.git/shallow` and accepts such + refs. + +`--negotiation-tip=(|)`:: + By default, Git will report, to the server, commits reachable + from all local refs to find common commits in an attempt to + reduce the size of the to-be-received packfile. If specified, + Git will only report commits reachable from the given tips. + This is useful to speed up fetches when the user knows which + local ref is likely to have commits in common with the + upstream ref being fetched. ++ +This option may be specified more than once; if so, Git will report +commits reachable from any of the given commits. ++ +The argument to this option may be a glob on ref names, a ref, or the (possibly +abbreviated) SHA-1 of a commit. Specifying a glob is equivalent to specifying +this option multiple times, one for each matching ref name. ++ +See also the `fetch.negotiationAlgorithm` and `push.negotiate` +configuration variables documented in linkgit:git-config[1], and the +`--negotiate-only` option below. + +`--negotiate-only`:: + Do not fetch anything from the server, and instead print the + ancestors of the provided `--negotiation-tip=` arguments, + which we have in common with the server. ++ +This is incompatible with `--recurse-submodules=(yes|on-demand)`. +Internally this is used to implement the `push.negotiate` option, see +linkgit:git-config[1]. + +`--dry-run`:: + Show what would be done, without making any changes. + +`--porcelain`:: + Print the output to standard output in an easy-to-parse format for + scripts. See section OUTPUT in linkgit:git-fetch[1] for details. ++ +This is incompatible with `--recurse-submodules=(yes|on-demand)` and takes +precedence over the `fetch.output` config option. + +`--filter=`:: + Use the partial clone feature and request that the server sends + a subset of reachable objects according to a given object filter. + When using `--filter`, the supplied __ is used for + the partial fetch. ++ +If `--filter=auto` is used, the filter specification is determined +automatically by combining the filter specifications advertised by +the server for the promisor remotes that the client accepts (see +linkgit:gitprotocol-v2[5] and the `promisor.acceptFromServer` +configuration option in linkgit:git-config[1]). ++ +For details on all other available filter specifications, see the +`--filter=` option in linkgit:git-rev-list[1]. ++ +For example, `--filter=blob:none` will filter out all blobs (file +contents) until needed by Git. Also, `--filter=blob:limit=` will +filter out all blobs of size at least __. + +ifndef::git-pull[] +`--write-fetch-head`:: +`--no-write-fetch-head`:: + Write the list of remote refs fetched in the `FETCH_HEAD` + file directly under `$GIT_DIR`. This is the default. + Passing `--no-write-fetch-head` from the command line tells + Git not to write the file. Under `--dry-run` option, the + file is never written. +endif::git-pull[] + +`-f`:: +`--force`:: +ifdef::git-pull[] +When `git fetch` is used with `:` refspec, it may +refuse to update the local branch as discussed +in the __ part of the linkgit:git-fetch[1] +documentation. +endif::git-pull[] +ifndef::git-pull[] +When `git fetch` is used with `:` refspec, it may +refuse to update the local branch as discussed in the __ part below. +endif::git-pull[] +This option overrides that check. + +`-k`:: +`--keep`:: + Keep downloaded pack. + +ifndef::git-pull[] +`--multiple`:: + Allow several __ and __ arguments to be + specified. No ____s may be specified. + +`--auto-maintenance`:: +`--no-auto-maintenance`:: +`--auto-gc`:: +`--no-auto-gc`:: + Run `git maintenance run --auto` at the end to perform automatic + repository maintenance if needed. + This is enabled by default. + +`--write-commit-graph`:: +`--no-write-commit-graph`:: + Write a commit-graph after fetching. This overrides the config + setting `fetch.writeCommitGraph`. +endif::git-pull[] + +`--prefetch`:: + Modify the configured refspec to place all refs into the + `refs/prefetch/` namespace. See the `prefetch` task in + linkgit:git-maintenance[1]. + +`-p`:: +`--prune`:: + Before fetching, remove any remote-tracking references that no + longer exist on the remote. Tags are not subject to pruning + if they are fetched only because of the default tag + auto-following or due to a `--tags` option. However, if tags + are fetched due to an explicit refspec (either on the command + line or in the remote configuration, for example if the remote + was cloned with the `--mirror` option), then they are also + subject to pruning. Supplying `--prune-tags` is a shorthand for + providing the tag refspec. +ifndef::git-pull[] ++ +See the PRUNING section below for more details. + +`-P`:: +`--prune-tags`:: + Before fetching, remove any local tags that no longer exist on + the remote if `--prune` is enabled. This option should be used + more carefully, unlike `--prune` it will remove any local + references (local tags) that have been created. This option is + a shorthand for providing the explicit tag refspec along with + `--prune`, see the discussion about that in its documentation. ++ +See the PRUNING section below for more details. + +endif::git-pull[] + +ifndef::git-pull[] +`-n`:: +endif::git-pull[] +`--no-tags`:: + By default, tags that point at objects that are downloaded + from the remote repository are fetched and stored locally. + This option disables this automatic tag following. The default + behavior for a remote may be specified with the `remote..tagOpt` + setting. See linkgit:git-config[1]. + +ifndef::git-pull[] +`--refetch`:: + Instead of negotiating with the server to avoid transferring commits and + associated objects that are already present locally, this option fetches + all objects as a fresh clone would. Use this to reapply a partial clone + filter from configuration or using `--filter=` when the filter + definition has changed. Automatic post-fetch maintenance will perform + object database pack consolidation to remove any duplicate objects. +endif::git-pull[] + +`--refmap=`:: + When fetching refs listed on the command line, use the + specified refspec (can be given more than once) to map the + refs to remote-tracking branches, instead of the values of + `remote..fetch` configuration variables for the remote + repository. Providing an empty __ to the + `--refmap` option causes Git to ignore the configured + refspecs and rely entirely on the refspecs supplied as + command-line arguments. See section on "Configured Remote-tracking + Branches" for details. + +`-t`:: +`--tags`:: + Fetch all tags from the remote (i.e., fetch remote tags + `refs/tags/*` into local tags with the same name), in addition + to whatever else would otherwise be fetched. Using this + option alone does not subject tags to pruning, even if `--prune` + is used (though tags may be pruned anyway if they are also the + destination of an explicit refspec; see `--prune`). + +ifndef::git-pull[] +`--recurse-submodules[=(yes|on-demand|no)]`:: + Control if and under what conditions new commits of + submodules should be fetched too. When recursing through submodules, + `git fetch` always attempts to fetch "changed" submodules, that is, a + submodule that has commits that are referenced by a newly fetched + superproject commit but are missing in the local submodule clone. A + changed submodule can be fetched as long as it is present locally e.g. + in `$GIT_DIR/modules/` (see linkgit:gitsubmodules[7]); if the upstream + adds a new submodule, that submodule cannot be fetched until it is + cloned e.g. by `git submodule update`. ++ +When set to `on-demand`, only changed submodules are fetched. When set +to `yes`, all populated submodules are fetched and submodules that are +both unpopulated and changed are fetched. When set to `no`, submodules +are never fetched. ++ +When unspecified, this uses the value of `fetch.recurseSubmodules` if it +is set (see linkgit:git-config[1]), defaulting to `on-demand` if unset. +When this option is used without any value, it defaults to `yes`. +endif::git-pull[] + +`-j `:: +`--jobs=`:: + Parallelize all forms of fetching up to __ jobs at a time. ++ +A value of 0 will use some reasonable default. ++ +If the `--multiple` option was specified, the different remotes will be fetched +in parallel. If multiple submodules are fetched, they will be fetched in +parallel. To control them independently, use the config settings +`fetch.parallel` and `submodule.fetchJobs` (see linkgit:git-config[1]). ++ +Typically, parallel recursive and multi-remote fetches will be faster. By +default fetches are performed sequentially, not in parallel. + +ifndef::git-pull[] +`--no-recurse-submodules`:: + Disable recursive fetching of submodules (this has the same effect as + using the `--recurse-submodules=no` option). +endif::git-pull[] + +`--set-upstream`:: + If the remote is fetched successfully, add upstream + (tracking) reference, used by argument-less + linkgit:git-pull[1] and other commands. For more information, + see `branch..merge` and `branch..remote` in + linkgit:git-config[1]. + +ifndef::git-pull[] +`--submodule-prefix=`:: + Prepend __ to paths printed in informative messages + such as "Fetching submodule foo". This option is used + internally when recursing over submodules. + +`--recurse-submodules-default=(yes|on-demand)`:: + This option is used internally to temporarily provide a + non-negative default value for the `--recurse-submodules` + option. All other methods of configuring fetch's submodule + recursion (such as settings in linkgit:gitmodules[5] and + linkgit:git-config[1]) override this option, as does + specifying `--[no-]recurse-submodules` directly. + +`-u`:: +`--update-head-ok`:: + By default `git fetch` refuses to update the head which + corresponds to the current branch. This flag disables the + check. This is purely for the internal use for `git pull` + to communicate with `git fetch`, and unless you are + implementing your own Porcelain you are not supposed to + use it. +endif::git-pull[] + +`--upload-pack `:: + When given, and the repository to fetch from is handled + by `git fetch-pack`, `--exec=` is passed to + the command to specify non-default path for the command + run on the other end. + +ifndef::git-pull[] +`-q`:: +`--quiet`:: + Pass `--quiet` to `git-fetch-pack` and silence any other internally + used git commands. Progress is not reported to the standard error + stream. + +`-v`:: +`--verbose`:: + Be verbose. +endif::git-pull[] + +`--progress`:: + Progress status is reported on the standard error stream + by default when it is attached to a terminal, unless `-q` + is specified. This flag forces progress status even if the + standard error stream is not directed to a terminal. + +`-o