gitweb.git
config: document value 2 for protocol.versionBrandon Williams Mon, 10 Sep 2018 21:21:57 +0000 (14:21 -0700)

config: document value 2 for protocol.version

Update the config documentation to note the value `2` as an acceptable
value for the protocol.version config.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Josh Steadmon <steadmon@google.com>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

pack-protocol: mention and point to docs for protocol v2Brandon Williams Mon, 23 Jul 2018 17:48:07 +0000 (10:48 -0700)

pack-protocol: mention and point to docs for protocol v2

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

protocol-v2 doc: put HTTP headers after requestJosh Steadmon Fri, 22 Jun 2018 19:01:12 +0000 (12:01 -0700)

protocol-v2 doc: put HTTP headers after request

HTTP servers return 400 if you send headers before the GET request.

Signed-off-by: Josh Steadmon <steadmon@google.com>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote-curl: don't request v2 when pushingBrandon Williams Thu, 15 Mar 2018 17:31:42 +0000 (10:31 -0700)

remote-curl: don't request v2 when pushing

In order to be able to ship protocol v2 with only supporting fetch, we
need clients to not issue a request to use protocol v2 when pushing
(since the client currently doesn't know how to push using protocol v2).
This allows a client to have protocol v2 configured in
`protocol.version` and take advantage of using v2 for fetch and falling
back to using v0 when pushing while v2 for push is being designed.

We could run into issues if we didn't fall back to protocol v2 when
pushing right now. This is because currently a server will ignore a request to
use v2 when contacting the 'receive-pack' endpoint and fall back to
using v0, but when push v2 is rolled out to servers, the 'receive-pack'
endpoint will start responding using v2. So we don't want to get into a
state where a client is requesting to push with v2 before they actually
know how to push using v2.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote-curl: implement stateless-connect commandBrandon Williams Thu, 15 Mar 2018 17:31:41 +0000 (10:31 -0700)

remote-curl: implement stateless-connect command

Teach remote-curl the 'stateless-connect' command which is used to
establish a stateless connection with servers which support protocol
version 2. This allows remote-curl to act as a proxy, allowing the git
client to communicate natively with a remote end, simply using
remote-curl as a pass through to convert requests to http.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

http: eliminate "# service" line when using protocol v2Brandon Williams Thu, 15 Mar 2018 17:31:40 +0000 (10:31 -0700)

http: eliminate "# service" line when using protocol v2

When an http info/refs request is made, requesting that protocol v2 be
used, don't send a "# service" line since this line is not part of the
v2 spec.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

http: don't always add Git-Protocol headerBrandon Williams Thu, 15 Mar 2018 17:31:39 +0000 (10:31 -0700)

http: don't always add Git-Protocol header

Instead of always sending the Git-Protocol header with the configured
version with every http request, explicitly send it when discovering
refs and then only send it on subsequent http requests if the server
understood the version requested.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

http: allow providing extra headers for http requestsBrandon Williams Thu, 15 Mar 2018 17:31:38 +0000 (10:31 -0700)

http: allow providing extra headers for http requests

Add a way for callers to request that extra headers be included when
making http requests.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote-curl: store the protocol version the server... Brandon Williams Thu, 15 Mar 2018 17:31:37 +0000 (10:31 -0700)

remote-curl: store the protocol version the server responded with

Store the protocol version the server responded with when performing
discovery. This will be used in a future patch to either change the
'Git-Protocol' header sent in subsequent requests or to determine if a
client needs to fallback to using a different protocol version.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

remote-curl: create copy of the service nameBrandon Williams Thu, 15 Mar 2018 17:31:36 +0000 (10:31 -0700)

remote-curl: create copy of the service name

Make a copy of the service name being requested instead of relying on
the buffer pointed to by the passed in 'const char *' to remain
unchanged.

Currently, all service names are string constants, but a subsequent
patch will introduce service names from external sources.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

pkt-line: add packet_buf_write_len functionBrandon Williams Thu, 15 Mar 2018 17:31:35 +0000 (10:31 -0700)

pkt-line: add packet_buf_write_len function

Add the 'packet_buf_write_len()' function which allows for writing an
arbitrary length buffer into a 'struct strbuf' and formatting it in
packet-line format.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

transport-helper: introduce stateless-connectBrandon Williams Thu, 15 Mar 2018 17:31:34 +0000 (10:31 -0700)

transport-helper: introduce stateless-connect

Introduce the transport-helper capability 'stateless-connect'. This
capability indicates that the transport-helper can be requested to run
the 'stateless-connect' command which should attempt to make a
stateless connection with a remote end. Once established, the
connection can be used by the git client to communicate with
the remote end natively in a stateless-rpc manner as supported by
protocol v2. This means that the client must send everything the server
needs in a single request as the client must not assume any
state-storing on the part of the server or transport.

If a stateless connection cannot be established then the remote-helper
will respond in the same manner as the 'connect' command indicating that
the client should fallback to using the dumb remote-helper commands.

A future patch will implement the 'stateless-connect' capability in our
http remote-helper (remote-curl) so that protocol v2 can be used using
the http transport.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

transport-helper: refactor process_connect_serviceBrandon Williams Thu, 15 Mar 2018 17:31:33 +0000 (10:31 -0700)

transport-helper: refactor process_connect_service

A future patch will need to take advantage of the logic which runs and
processes the response of the connect command on a remote helper so
factor out this logic from 'process_connect_service()' and place it into
a helper function 'run_connect()'.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

transport-helper: remove name parameterBrandon Williams Thu, 15 Mar 2018 17:31:32 +0000 (10:31 -0700)

transport-helper: remove name parameter

Commit 266f1fdfa (transport-helper: be quiet on read errors from
helpers, 2013-06-21) removed a call to 'die()' which printed the name of
the remote helper passed in to the 'recvline_fh()' function using the
'name' parameter. Once the call to 'die()' was removed the parameter
was no longer necessary but wasn't removed. Clean up 'recvline_fh()'
parameter list by removing the 'name' parameter.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

connect: don't request v2 when pushingBrandon Williams Thu, 15 Mar 2018 17:31:31 +0000 (10:31 -0700)

connect: don't request v2 when pushing

In order to be able to ship protocol v2 with only supporting fetch, we
need clients to not issue a request to use protocol v2 when pushing
(since the client currently doesn't know how to push using protocol v2).
This allows a client to have protocol v2 configured in
`protocol.version` and take advantage of using v2 for fetch and falling
back to using v0 when pushing while v2 for push is being designed.

We could run into issues if we didn't fall back to protocol v2 when
pushing right now. This is because currently a server will ignore a request to
use v2 when contacting the 'receive-pack' endpoint and fall back to
using v0, but when push v2 is rolled out to servers, the 'receive-pack'
endpoint will start responding using v2. So we don't want to get into a
state where a client is requesting to push with v2 before they actually
know how to push using v2.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

connect: refactor git_connect to only get the protocol... Brandon Williams Thu, 15 Mar 2018 17:31:30 +0000 (10:31 -0700)

connect: refactor git_connect to only get the protocol version once

Instead of having each builtin transport asking for which protocol
version the user has configured in 'protocol.version' by calling
`get_protocol_version_config()` multiple times, factor this logic out
so there is just a single call at the beginning of `git_connect()`.

This will be helpful in the next patch where we can have centralized
logic which determines if we need to request a different protocol
version than what the user has configured.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

fetch-pack: support shallow requestsBrandon Williams Thu, 15 Mar 2018 17:31:29 +0000 (10:31 -0700)

fetch-pack: support shallow requests

Enable shallow clones and deepen requests using protocol version 2 if
the server 'fetch' command supports the 'shallow' feature.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

fetch-pack: perform a fetch using v2Brandon Williams Thu, 15 Mar 2018 17:31:28 +0000 (10:31 -0700)

fetch-pack: perform a fetch using v2

When communicating with a v2 server, perform a fetch by requesting the
'fetch' command.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

upload-pack: introduce fetch server commandBrandon Williams Thu, 15 Mar 2018 17:31:27 +0000 (10:31 -0700)

upload-pack: introduce fetch server command

Introduce the 'fetch' server command.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

push: pass ref prefixes when pushingBrandon Williams Thu, 15 Mar 2018 17:31:26 +0000 (10:31 -0700)

push: pass ref prefixes when pushing

Construct a list of ref prefixes to be passed to 'get_refs_list()' from
the refspec to be used during the push. This list of ref prefixes will
be used to allow the server to filter the ref advertisement when
communicating using protocol v2.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

fetch: pass ref prefixes when fetchingBrandon Williams Thu, 15 Mar 2018 17:31:25 +0000 (10:31 -0700)

fetch: pass ref prefixes when fetching

Construct a list of ref prefixes to be passed to
'transport_get_remote_refs()' from the refspec to be used during the
fetch. This list of ref prefixes will be used to allow the server to
filter the ref advertisement when communicating using protocol v2.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

ls-remote: pass ref prefixes when requesting a remote... Brandon Williams Thu, 15 Mar 2018 17:31:24 +0000 (10:31 -0700)

ls-remote: pass ref prefixes when requesting a remote's refs

Construct an argv_array of ref prefixes based on the patterns supplied
via the command line and pass them to 'transport_get_remote_refs()' to
be used when communicating protocol v2 so that the server can limit the
ref advertisement based on those prefixes.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

transport: convert transport_get_remote_refs to take... Brandon Williams Thu, 15 Mar 2018 17:31:23 +0000 (10:31 -0700)

transport: convert transport_get_remote_refs to take a list of ref prefixes

Teach transport_get_remote_refs() to accept a list of ref prefixes,
which will be sent to the server for use in filtering when using
protocol v2. (This list will be ignored when not using protocol v2.)

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

transport: convert get_refs_list to take a list of... Brandon Williams Thu, 15 Mar 2018 17:31:22 +0000 (10:31 -0700)

transport: convert get_refs_list to take a list of ref prefixes

Convert the 'struct transport' virtual function 'get_refs_list()' to
optionally take an argv_array of ref prefixes. When communicating with
a server using protocol v2 these ref prefixes can be sent when
requesting a listing of their refs allowing the server to filter the
refs it sends based on the sent prefixes. This list will be ignored
when not using protocol v2.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

connect: request remote refs using v2Brandon Williams Thu, 15 Mar 2018 17:31:21 +0000 (10:31 -0700)

connect: request remote refs using v2

Teach the client to be able to request a remote's refs using protocol
v2. This is done by having a client issue a 'ls-refs' request to a v2
server.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

ls-refs: introduce ls-refs server commandBrandon Williams Thu, 15 Mar 2018 17:31:20 +0000 (10:31 -0700)

ls-refs: introduce ls-refs server command

Introduce the ls-refs server command. In protocol v2, the ls-refs
command is used to request the ref advertisement from the server. Since
it is a command which can be requested (as opposed to mandatory in v1),
a client can sent a number of parameters in its request to limit the ref
advertisement based on provided ref-prefixes.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

serve: introduce git-serveBrandon Williams Thu, 15 Mar 2018 17:31:19 +0000 (10:31 -0700)

serve: introduce git-serve

Introduce git-serve, the base server for protocol version 2.

Protocol version 2 is intended to be a replacement for Git's current
wire protocol. The intention is that it will be a simpler, less
wasteful protocol which can evolve over time.

Protocol version 2 improves upon version 1 by eliminating the initial
ref advertisement. In its place a server will export a list of
capabilities and commands which it supports in a capability
advertisement. A client can then request that a particular command be
executed by providing a number of capabilities and command specific
parameters. At the completion of a command, a client can request that
another command be executed or can terminate the connection by sending a
flush packet.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

test-pkt-line: introduce a packet-line test helperBrandon Williams Wed, 14 Mar 2018 18:31:48 +0000 (11:31 -0700)

test-pkt-line: introduce a packet-line test helper

Introduce a packet-line test helper which can either pack or unpack an
input stream into packet-lines and writes out the result to stdout.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

protocol: introduce enum protocol_version value protocol_v2Brandon Williams Wed, 14 Mar 2018 18:31:47 +0000 (11:31 -0700)

protocol: introduce enum protocol_version value protocol_v2

Introduce protocol_v2, a new value for 'enum protocol_version'.
Subsequent patches will fill in the implementation of protocol_v2.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

transport: store protocol versionBrandon Williams Wed, 14 Mar 2018 18:31:46 +0000 (11:31 -0700)

transport: store protocol version

Once protocol_v2 is introduced requesting a fetch or a push will need to
be handled differently depending on the protocol version. Store the
protocol version the server is speaking in 'struct git_transport_data'
and use it to determine what to do in the case of a fetch or a push.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

connect: discover protocol version outside of get_remot... Brandon Williams Wed, 14 Mar 2018 18:31:45 +0000 (11:31 -0700)

connect: discover protocol version outside of get_remote_heads

In order to prepare for the addition of protocol_v2 push the protocol
version discovery outside of 'get_remote_heads()'. This will allow for
keeping the logic for processing the reference advertisement for
protocol_v1 and protocol_v0 separate from the logic for protocol_v2.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

connect: convert get_remote_heads to use struct packet_... Brandon Williams Wed, 14 Mar 2018 18:31:44 +0000 (11:31 -0700)

connect: convert get_remote_heads to use struct packet_reader

In order to allow for better control flow when protocol_v2 is introduced
convert 'get_remote_heads()' to use 'struct packet_reader' to read
packet lines. This enables a client to be able to peek the first line
of a server's response (without consuming it) in order to determine the
protocol version its speaking and then passing control to the
appropriate handler.

This is needed because the initial response from a server speaking
protocol_v0 includes the first ref, while subsequent protocol versions
respond with a version line. We want to be able to read this first line
without consuming the first ref sent in the protocol_v0 case so that the
protocol version the server is speaking can be determined outside of
'get_remote_heads()' in a future patch.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

transport: use get_refs_via_connect to get refsBrandon Williams Wed, 14 Mar 2018 18:31:43 +0000 (11:31 -0700)

transport: use get_refs_via_connect to get refs

Remove code duplication and use the existing 'get_refs_via_connect()'
function to retrieve a remote's heads in 'fetch_refs_via_pack()' and
'git_transport_push()'.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

upload-pack: factor out processing linesBrandon Williams Wed, 14 Mar 2018 18:31:42 +0000 (11:31 -0700)

upload-pack: factor out processing lines

Factor out the logic for processing shallow, deepen, deepen_since, and
deepen_not lines into their own functions to simplify the
'receive_needs()' function in addition to making it easier to reuse some
of this logic when implementing protocol_v2.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

upload-pack: convert to a builtinBrandon Williams Wed, 14 Mar 2018 18:31:41 +0000 (11:31 -0700)

upload-pack: convert to a builtin

In order to allow for code sharing with the server-side of fetch in
protocol-v2 convert upload-pack to be a builtin.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

pkt-line: add delim packet supportBrandon Williams Wed, 14 Mar 2018 18:31:40 +0000 (11:31 -0700)

pkt-line: add delim packet support

One of the design goals of protocol-v2 is to improve the semantics of
flush packets. Currently in protocol-v1, flush packets are used both to
indicate a break in a list of packet lines as well as an indication that
one side has finished speaking. This makes it particularly difficult
to implement proxies as a proxy would need to completely understand git
protocol instead of simply looking for a flush packet.

To do this, introduce the special deliminator packet '0001'. A delim
packet can then be used as a deliminator between lists of packet lines
while flush packets can be reserved to indicate the end of a response.

Documentation for how this packet will be used in protocol v2 will
included in a future patch.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

pkt-line: allow peeking a packet line without consuming itBrandon Williams Wed, 14 Mar 2018 18:31:39 +0000 (11:31 -0700)

pkt-line: allow peeking a packet line without consuming it

Sometimes it is advantageous to be able to peek the next packet line
without consuming it (e.g. to be able to determine the protocol version
a server is speaking). In order to do that introduce 'struct
packet_reader' which is an abstraction around the normal packet reading
logic. This enables a caller to be able to peek a single line at a time
using 'packet_reader_peek()' and having a caller consume a line by
calling 'packet_reader_read()'.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

pkt-line: introduce packet_read_with_statusBrandon Williams Wed, 14 Mar 2018 18:31:38 +0000 (11:31 -0700)

pkt-line: introduce packet_read_with_status

The current pkt-line API encodes the status of a pkt-line read in the
length of the read content. An error is indicated with '-1', a flush
with '0' (which can be confusing since a return value of '0' can also
indicate an empty pkt-line), and a positive integer for the length of
the read content otherwise. This doesn't leave much room for allowing
the addition of additional special packets in the future.

To solve this introduce 'packet_read_with_status()' which reads a packet
and returns the status of the read encoded as an 'enum packet_status'
type. This allows for easily identifying between special and normal
packets as well as errors. It also enables easily adding a new special
packet in the future.

Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Git 2.16-rc0 v2.16.0-rc0Junio C Hamano Thu, 28 Dec 2017 22:12:06 +0000 (14:12 -0800)

Git 2.16-rc0

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'sb/describe-blob'Junio C Hamano Thu, 28 Dec 2017 22:08:50 +0000 (14:08 -0800)

Merge branch 'sb/describe-blob'

"git describe" was taught to dig trees deeper to find a
<commit-ish>:<path> that refers to a given blob object.

* sb/describe-blob:
builtin/describe.c: describe a blob
builtin/describe.c: factor out describe_commit
builtin/describe.c: print debug statements earlier
builtin/describe.c: rename `oid` to avoid variable shadowing
revision.h: introduce blob/tree walking in order of the commits
list-objects.c: factor out traverse_trees_and_blobs
t6120: fix typo in test name

Merge branch 'hi/merge-verify-sig-config'Junio C Hamano Thu, 28 Dec 2017 22:08:50 +0000 (14:08 -0800)

Merge branch 'hi/merge-verify-sig-config'

"git merge" learned to pay attention to merge.verifySignatures
configuration variable and pretend as if '--verify-signatures'
option was given from the command line.

* hi/merge-verify-sig-config:
t5573, t7612: clean up after unexpected success of 'pull' and 'merge'
t: add tests for pull --verify-signatures
merge: add config option for verifySignatures

Merge branch 'ws/curl-http-proxy-over-https'Junio C Hamano Thu, 28 Dec 2017 22:08:50 +0000 (14:08 -0800)

Merge branch 'ws/curl-http-proxy-over-https'

Git has been taught to support an https:// URL used for http.proxy
when using recent versions of libcurl.

* ws/curl-http-proxy-over-https:
http: support CURLPROXY_HTTPS

Merge branch 'ks/doc-previous-checkout'Junio C Hamano Thu, 28 Dec 2017 22:08:49 +0000 (14:08 -0800)

Merge branch 'ks/doc-previous-checkout'

Doc update.

* ks/doc-previous-checkout:
Doc/check-ref-format: clarify information about @{-N} syntax

Merge branch 'ks/rebase-error-messages'Junio C Hamano Thu, 28 Dec 2017 22:08:49 +0000 (14:08 -0800)

Merge branch 'ks/rebase-error-messages'

Error messages from "git rebase" have been somewhat cleaned up.

* ks/rebase-error-messages:
rebase: rebasing can also be done when HEAD is detached
rebase: distinguish user input by quoting it
rebase: consistently use branch_name variable

Merge branch 'sr/http-sslverify-config-doc'Junio C Hamano Thu, 28 Dec 2017 22:08:49 +0000 (14:08 -0800)

Merge branch 'sr/http-sslverify-config-doc'

Docfix.

* sr/http-sslverify-config-doc:
config: document default value of http.sslVerify

Merge branch 'nm/imap-send-quote-server-folder-name'Junio C Hamano Thu, 28 Dec 2017 22:08:48 +0000 (14:08 -0800)

Merge branch 'nm/imap-send-quote-server-folder-name'

"git imap-send" did not correctly quote the folder name when
making a request to the server, which has been corrected.

* nm/imap-send-quote-server-folder-name:
imap-send: URI encode server folder

Merge branch 'bp/fsmonitor'Junio C Hamano Thu, 28 Dec 2017 22:08:48 +0000 (14:08 -0800)

Merge branch 'bp/fsmonitor'

Test fix.

* bp/fsmonitor:
p7519: improve check for prerequisite WATCHMAN

Merge branch 'jh/partial-clone-doc'Junio C Hamano Thu, 28 Dec 2017 22:08:47 +0000 (14:08 -0800)

Merge branch 'jh/partial-clone-doc'

* jh/partial-clone-doc:
partial-clone: design doc

Merge branch 'jt/transport-hide-vtable'Junio C Hamano Thu, 28 Dec 2017 22:08:47 +0000 (14:08 -0800)

Merge branch 'jt/transport-hide-vtable'

Code clean-up.

* jt/transport-hide-vtable:
transport: make transport vtable more private
clone, fetch: remove redundant transport check

Merge branch 'js/enhanced-version-info'Junio C Hamano Thu, 28 Dec 2017 22:08:47 +0000 (14:08 -0800)

Merge branch 'js/enhanced-version-info'

"git version --build-options" learned to report the host CPU and
the exact commit object name the binary was built from.

* js/enhanced-version-info:
version --build-options: report commit, too, if possible
version --build-options: also report host CPU

Merge branch 'tz/lib-git-svn-svnserve-tests'Junio C Hamano Thu, 28 Dec 2017 22:08:46 +0000 (14:08 -0800)

Merge branch 'tz/lib-git-svn-svnserve-tests'

* tz/lib-git-svn-svnserve-tests:
t/lib-git-svn.sh: improve svnserve tests with parallel make test
t/lib-git-svn: cleanup inconsistent tab/space usage

Merge branch 'ew/svn-crlf'Junio C Hamano Thu, 28 Dec 2017 22:08:46 +0000 (14:08 -0800)

Merge branch 'ew/svn-crlf'

"git svn" has been updated to strip CRs in the commit messages, as
recent versions of Subversion rejects them.

* ew/svn-crlf:
git-svn: convert CRLF to LF in commit message to SVN

Merge branch 'cc/skip-to-optional-val'Junio C Hamano Thu, 28 Dec 2017 22:08:46 +0000 (14:08 -0800)

Merge branch 'cc/skip-to-optional-val'

Introduce a helper to simplify code to parse a common pattern that
expects either "--key" or "--key=<something>".

* cc/skip-to-optional-val:
t4045: reindent to make helpers readable
diff: add tests for --relative without optional prefix value
diff: use skip_to_optional_arg_default() in parsing --relative
diff: use skip_to_optional_arg_default()
diff: use skip_to_optional_arg()
index-pack: use skip_to_optional_arg()
git-compat-util: introduce skip_to_optional_arg()

Merge branch 'ra/prompt-eread-fix'Junio C Hamano Thu, 28 Dec 2017 22:08:45 +0000 (14:08 -0800)

Merge branch 'ra/prompt-eread-fix'

Update the shell prompt script (in contrib/) to strip trailing CR
from strings read from various "state" files.

* ra/prompt-eread-fix:
git-prompt: fix reading files with windows line endings
git-prompt: make __git_eread intended use explicit

Merge branch 'bw/path-doc'Junio C Hamano Thu, 28 Dec 2017 22:08:45 +0000 (14:08 -0800)

Merge branch 'bw/path-doc'

Doc updates.

* bw/path-doc:
path: document path functions

RelNotes: the eleventh batchJunio C Hamano Wed, 27 Dec 2017 19:20:27 +0000 (11:20 -0800)

RelNotes: the eleventh batch

Hopefully the last one before -rc0

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'rb/quick-install-doc'Junio C Hamano Wed, 27 Dec 2017 19:16:30 +0000 (11:16 -0800)

Merge branch 'rb/quick-install-doc'

The build procedure now allows not just the repositories but also
the refs to be used to take pre-formatted manpages and html
documents to install.

* rb/quick-install-doc:
install-doc-quick: allow specifying what ref to install

Merge branch 'jt/transport-no-more-rsync'Junio C Hamano Wed, 27 Dec 2017 19:16:30 +0000 (11:16 -0800)

Merge branch 'jt/transport-no-more-rsync'

Code clean-up.

* jt/transport-no-more-rsync:
transport: remove unused "push" in vtable

Merge branch 'sg/travis-fixes'Junio C Hamano Wed, 27 Dec 2017 19:16:30 +0000 (11:16 -0800)

Merge branch 'sg/travis-fixes'

Assorted updates for TravisCI integration.

* sg/travis-fixes:
travis-ci: use 'set -x' in 'ci/*' scripts for extra tracing output
travis-ci: set GIT_TEST_HTTPD in 'ci/lib-travisci.sh'
travis-ci: move setting environment variables to 'ci/lib-travisci.sh'
travis-ci: introduce a $jobname variable for 'ci/*' scripts

Merge branch 'sb/test-helper-excludes'Junio C Hamano Wed, 27 Dec 2017 19:16:29 +0000 (11:16 -0800)

Merge branch 'sb/test-helper-excludes'

Simplify the ignore rules for t/helper directory.

* sb/test-helper-excludes:
t/helper: ignore everything but sources

Merge branch 'ot/pretty'Junio C Hamano Wed, 27 Dec 2017 19:16:29 +0000 (11:16 -0800)

Merge branch 'ot/pretty'

Code clean-up.

* ot/pretty:
format: create docs for pretty.h
format: create pretty.h file

Merge branch 'bw/submodule-sans-cache-compat'Junio C Hamano Wed, 27 Dec 2017 19:16:28 +0000 (11:16 -0800)

Merge branch 'bw/submodule-sans-cache-compat'

Code clean-up.

* bw/submodule-sans-cache-compat:
submodule: convert get_next_submodule to not rely on the_index
submodule: used correct index in is_staging_gitmodules_ok
submodule: convert stage_updated_gitmodules to take a struct index_state

Merge branch 'es/clone-shared-worktree'Junio C Hamano Wed, 27 Dec 2017 19:16:28 +0000 (11:16 -0800)

Merge branch 'es/clone-shared-worktree'

"git clone --shared" to borrow from a (secondary) worktree did not
work, even though "git clone --local" did. Both are now accepted.

* es/clone-shared-worktree:
clone: support 'clone --shared' from a worktree

Merge branch 'tb/delimit-pretty-trailers-args-with... Junio C Hamano Wed, 27 Dec 2017 19:16:27 +0000 (11:16 -0800)

Merge branch 'tb/delimit-pretty-trailers-args-with-comma'

Doc updates.

* tb/delimit-pretty-trailers-args-with-comma:
docs/pretty-formats: mention commas in %(trailers) syntax

Merge branch 'rs/fmt-merge-msg-leakfix'Junio C Hamano Wed, 27 Dec 2017 19:16:26 +0000 (11:16 -0800)

Merge branch 'rs/fmt-merge-msg-leakfix'

Leakfix.

* rs/fmt-merge-msg-leakfix:
transport-helper: plug strbuf and string_list leaks

Merge branch 'jt/decorate-api'Junio C Hamano Wed, 27 Dec 2017 19:16:26 +0000 (11:16 -0800)

Merge branch 'jt/decorate-api'

A few structures and variables that are implementation details of
the decorate API have been renamed and then the API got documented
better.

* jt/decorate-api:
decorate: clean up and document API

Merge branch 'jk/cvsimport-quoting'Junio C Hamano Wed, 27 Dec 2017 19:16:26 +0000 (11:16 -0800)

Merge branch 'jk/cvsimport-quoting'

Typo/Logico fix.

* jk/cvsimport-quoting:
cvsimport: apply shell-quoting regex globally

Merge branch 'db/doc-workflows-neuter-the-maintainer'Junio C Hamano Wed, 27 Dec 2017 19:16:25 +0000 (11:16 -0800)

Merge branch 'db/doc-workflows-neuter-the-maintainer'

Docfix.

* db/doc-workflows-neuter-the-maintainer:
doc: reword gitworkflows.txt for neutrality

Merge branch 'ks/branch-cleanup'Junio C Hamano Wed, 27 Dec 2017 19:16:25 +0000 (11:16 -0800)

Merge branch 'ks/branch-cleanup'

Code clean-up.

* ks/branch-cleanup:
builtin/branch: strip refs/heads/ using skip_prefix
branch: update warning message shown when copying a misnamed branch
branch: group related arguments of create_branch()
branch: improve documentation and naming of create_branch() parameters

Merge branch 'rs/strbuf-read-once-reset-length'Junio C Hamano Wed, 27 Dec 2017 19:16:24 +0000 (11:16 -0800)

Merge branch 'rs/strbuf-read-once-reset-length'

Leakfix.

* rs/strbuf-read-once-reset-length:
strbuf: release memory on read error in strbuf_read_once()

Merge branch 'rs/fmt-merge-msg-string-leak-fix'Junio C Hamano Wed, 27 Dec 2017 19:16:23 +0000 (11:16 -0800)

Merge branch 'rs/fmt-merge-msg-string-leak-fix'

Leakfix.

* rs/fmt-merge-msg-string-leak-fix:
fmt-merge-msg: avoid leaking strbuf in shortlog()

Merge branch 'rs/am-builtin-leakfix'Junio C Hamano Wed, 27 Dec 2017 19:16:22 +0000 (11:16 -0800)

Merge branch 'rs/am-builtin-leakfix'

Leakfix.

* rs/am-builtin-leakfix:
am: release strbuf after use in split_mail_mbox()

Merge branch 'es/worktree-checkout-hook'Junio C Hamano Wed, 27 Dec 2017 19:16:21 +0000 (11:16 -0800)

Merge branch 'es/worktree-checkout-hook'

"git worktree add" learned to run the post-checkout hook, just like
"git checkout" does, after the initial checkout.

* es/worktree-checkout-hook:
worktree: invoke post-checkout hook (unless --no-checkout)

Merge branch 'lb/rebase-i-short-command-names'Junio C Hamano Wed, 27 Dec 2017 19:16:21 +0000 (11:16 -0800)

Merge branch 'lb/rebase-i-short-command-names'

With a configuration variable rebase.abbreviateCommands set,
"git rebase -i" produces the todo list with a single-letter
command names.

* lb/rebase-i-short-command-names:
sequencer.c: drop 'const' from function return type
t3404: add test case for abbreviated commands
rebase -i: learn to abbreviate command names
rebase -i -x: add exec commands via the rebase--helper
rebase -i: update functions to use a flags parameter
rebase -i: replace reference to sha1 with oid
rebase -i: refactor transform_todo_ids
rebase -i: set commit to null in exec commands
Documentation: use preferred name for the 'todo list' script
Documentation: move rebase.* configs to new file

Merge branch 'tb/check-crlf-for-safe-crlf'Junio C Hamano Wed, 27 Dec 2017 19:16:21 +0000 (11:16 -0800)

Merge branch 'tb/check-crlf-for-safe-crlf'

The "safe crlf" check incorrectly triggered for contents that does
not use CRLF as line endings, which has been corrected.

* tb/check-crlf-for-safe-crlf:
t0027: Adapt the new MIX tests to Windows
convert: tighten the safe autocrlf handling

Merge branch 'jh/object-filtering'Junio C Hamano Wed, 27 Dec 2017 19:16:20 +0000 (11:16 -0800)

Merge branch 'jh/object-filtering'

In preparation for implementing narrow/partial clone, the object
walking machinery has been taught a way to tell it to "filter" some
objects from enumeration.

* jh/object-filtering:
rev-list: support --no-filter argument
list-objects-filter-options: support --no-filter
list-objects-filter-options: fix 'keword' typo in comment
pack-objects: add list-objects filtering
rev-list: add list-objects filtering support
list-objects: filter objects in traverse_commit_list
oidset: add iterator methods to oidset
oidmap: add oidmap iterator methods
dir: allow exclusions from blob in addition to file

sequencer.c: drop 'const' from function return typeJunio C Hamano Wed, 27 Dec 2017 19:12:45 +0000 (11:12 -0800)

sequencer.c: drop 'const' from function return type

With -Werror=ignored-qualifiers, a function that claims to return
"const char" gets this error:

CC sequencer.o
sequencer.c:798:19: error: type qualifiers ignored on function return
type [-Werror=ignored-qualifiers]
static const char command_to_char(const enum todo_command command)
^

Reported-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

t5573, t7612: clean up after unexpected success of... Junio C Hamano Fri, 15 Dec 2017 19:42:36 +0000 (11:42 -0800)

t5573, t7612: clean up after unexpected success of 'pull' and 'merge'

The previous steps added test_when_finished to tests that run 'git
pull' or 'git merge' with expectation of success, so that the test
after them can start from a known state even when their 'git pull'
invocation unexpectedly fails. However, tests that run 'git pull'
or 'git merge' expecting it not to succeed forgot to protect later
tests the same way---if they unexpectedly succeed, the test after
them would start from an unexpected state.

Reset and checkout the initial commit after all these tests, whether
they expect their invocations to succeed or fail.

Signed-off-by: Junio C Hamano <gitster@pobox.com>

RelNotes: the tenth batchJunio C Hamano Tue, 19 Dec 2017 19:34:35 +0000 (11:34 -0800)

RelNotes: the tenth batch

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Merge branch 'ls/editor-waiting-message'Junio C Hamano Tue, 19 Dec 2017 19:33:59 +0000 (11:33 -0800)

Merge branch 'ls/editor-waiting-message'

Git shows a message to tell the user that it is waiting for the
user to finish editing when spawning an editor, in case the editor
opens to a hidden window or somewhere obscure and the user gets
lost.

* ls/editor-waiting-message:
launch_editor(): indicate that Git waits for user input
refactor "dumb" terminal determination

Merge branch 'sg/setup-doc-update'Junio C Hamano Tue, 19 Dec 2017 19:33:58 +0000 (11:33 -0800)

Merge branch 'sg/setup-doc-update'

Comment update.

* sg/setup-doc-update:
setup.c: fix comment about order of .git directory discovery

Merge branch 'ar/unconfuse-three-dots'Junio C Hamano Tue, 19 Dec 2017 19:33:58 +0000 (11:33 -0800)

Merge branch 'ar/unconfuse-three-dots'

Ancient part of codebase still shows dots after an abbreviated
object name just to show that it is not a full object name, but
these ellipses are confusing to people who newly discovered Git
who are used to seeing abbreviated object names and find them
confusing with the range syntax.

* ar/unconfuse-three-dots:
t2020: test variations that matter
t4013: test new output from diff --abbrev --raw
diff: diff_aligned_abbrev: remove ellipsis after abbreviated SHA-1 value
t4013: prepare for upcoming "diff --raw --abbrev" output format change
checkout: describe_detached_head: remove ellipsis after committish
print_sha1_ellipsis: introduce helper
Documentation: user-manual: limit usage of ellipsis
Documentation: revisions: fix typo: "three dot" ---> "three-dot" (in line with "two-dot").

Merge branch 'tg/worktree-create-tracking'Junio C Hamano Tue, 19 Dec 2017 19:33:57 +0000 (11:33 -0800)

Merge branch 'tg/worktree-create-tracking'

The way "git worktree add" determines what branch to create from
where and checkout in the new worktree has been updated a bit.

* tg/worktree-create-tracking:
add worktree.guessRemote config option
worktree: add --guess-remote flag to add subcommand
worktree: make add <path> <branch> dwim
worktree: add --[no-]track option to the add subcommand
worktree: add can be created from any commit-ish
checkout: factor out functions to new lib file

Merge branch 'gk/tracing-optimization'Junio C Hamano Tue, 19 Dec 2017 19:33:57 +0000 (11:33 -0800)

Merge branch 'gk/tracing-optimization'

The tracing infrastructure has been optimized for cases where no
tracing is requested.

* gk/tracing-optimization:
trace: improve performance while category is disabled
trace: remove trace key normalization

Merge branch 'bw/submodule-config-cleanup'Junio C Hamano Tue, 19 Dec 2017 19:33:57 +0000 (11:33 -0800)

Merge branch 'bw/submodule-config-cleanup'

Recent update to the submodule configuration code broke "diff-tree"
by accidentally stopping to read from the index upfront.

* bw/submodule-config-cleanup:
diff-tree: read the index so attribute checks work in bare repositories

Merge branch 'sb/clone-recursive-submodule-doc'Junio C Hamano Tue, 19 Dec 2017 19:33:56 +0000 (11:33 -0800)

Merge branch 'sb/clone-recursive-submodule-doc'

Doc update.

* sb/clone-recursive-submodule-doc:
Documentation/git-clone: improve description for submodule recursing

Merge branch 'ls/git-gui-no-double-utf8-author-name'Junio C Hamano Tue, 19 Dec 2017 19:33:56 +0000 (11:33 -0800)

Merge branch 'ls/git-gui-no-double-utf8-author-name'

Amending commits in git-gui broke the author name that is non-ascii
due to incorrect enconding conversion.

* ls/git-gui-no-double-utf8-author-name:
git-gui: prevent double UTF-8 conversion

Merge branch 'bw/pathspec-match-submodule-boundary'Junio C Hamano Tue, 19 Dec 2017 19:33:56 +0000 (11:33 -0800)

Merge branch 'bw/pathspec-match-submodule-boundary'

An v2.12-era regression in pathspec match logic, which made it look
into submodule tree even when it is not desired, has been fixed.

* bw/pathspec-match-submodule-boundary:
pathspec: only match across submodule boundaries when requested

Merge branch 'jt/diff-anchored-patience'Junio C Hamano Tue, 19 Dec 2017 19:33:56 +0000 (11:33 -0800)

Merge branch 'jt/diff-anchored-patience'

"git diff" learned a variant of the "--patience" algorithm, to
which the user can specify which 'unique' line to be used as
anchoring points.

* jt/diff-anchored-patience:
diff: support anchoring line(s)

Merge branch 'en/merge-recursive-icase-removal'Junio C Hamano Tue, 19 Dec 2017 19:33:55 +0000 (11:33 -0800)

Merge branch 'en/merge-recursive-icase-removal'

The code internal to the recursive merge strategy was not fully
prepared to see a path that is renamed to try overwriting another
path that is only different in case on case insensitive systems.
This does not matter in the current code, but will start to matter
once the rename detection logic starts taking hints from nearby
paths moving to some directory and moves a new path along with them.

* en/merge-recursive-icase-removal:
merge-recursive: ignore_case shouldn't reject intentional removals

Merge branch 'en/rename-progress'Junio C Hamano Tue, 19 Dec 2017 19:33:55 +0000 (11:33 -0800)

Merge branch 'en/rename-progress'

Historically, the diff machinery for rename detection had a
hardcoded limit of 32k paths; this is being lifted to allow users
trade cycles with a (possibly) easier to read result.

* en/rename-progress:
diffcore-rename: make diff-tree -l0 mean -l<large>
sequencer: show rename progress during cherry picks
diff: remove silent clamp of renameLimit
progress: fix progress meters when dealing with lots of work
sequencer: warn when internal merge may be suboptimal due to renameLimit

builtin/describe.c: describe a blobStefan Beller Thu, 16 Nov 2017 02:00:39 +0000 (18:00 -0800)

builtin/describe.c: describe a blob

Sometimes users are given a hash of an object and they want to
identify it further (ex.: Use verify-pack to find the largest blobs,
but what are these? or [1])

When describing commits, we try to anchor them to tags or refs, as these
are conceptually on a higher level than the commit. And if there is no ref
or tag that matches exactly, we're out of luck. So we employ a heuristic
to make up a name for the commit. These names are ambiguous, there might
be different tags or refs to anchor to, and there might be different
path in the DAG to travel to arrive at the commit precisely.

When describing a blob, we want to describe the blob from a higher layer
as well, which is a tuple of (commit, deep/path) as the tree objects
involved are rather uninteresting. The same blob can be referenced by
multiple commits, so how we decide which commit to use? This patch
implements a rather naive approach on this: As there are no back pointers
from blobs to commits in which the blob occurs, we'll start walking from
any tips available, listing the blobs in-order of the commit and once we
found the blob, we'll take the first commit that listed the blob. For
example

git describe --tags v0.99:Makefile
conversion-901-g7672db20c2:Makefile

tells us the Makefile as it was in v0.99 was introduced in commit 7672db20.

The walking is performed in reverse order to show the introduction of a
blob rather than its last occurrence.

[1] https://stackoverflow.com/questions/223678/which-commit-has-this-blob

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

http: support CURLPROXY_HTTPSWei Shuyu Tue, 19 Dec 2017 17:24:01 +0000 (01:24 +0800)

http: support CURLPROXY_HTTPS

HTTP proxy over SSL is supported by curl since 7.52.0.
This is very useful for networks with protocol whitelist.

Signed-off-by: Wei Shuyu <wsy@dogben.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

rebase: rebasing can also be done when HEAD is detachedKaartic Sivaraam Sat, 16 Dec 2017 09:03:19 +0000 (14:33 +0530)

rebase: rebasing can also be done when HEAD is detached

Attempting to rebase when the HEAD is detached and is already
up to date with upstream (so there's nothing to do), the
following message is shown

Current branch HEAD is up to date.

which is clearly wrong as HEAD is not a branch.

Handle the special case of HEAD correctly to give a more precise
error message.

Signed-off-by: Kaartic Sivaraam <kaartic.sivaraam@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Kaartic Sivaraam <kaartic.sivaraam@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

rebase: distinguish user input by quoting itKaartic Sivaraam Sat, 16 Dec 2017 09:03:18 +0000 (14:33 +0530)

rebase: distinguish user input by quoting it

Signed-off-by: Kaartic Sivaraam <kaartic.sivaraam@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Kaartic Sivaraam <kaartic.sivaraam@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

rebase: consistently use branch_name variableKaartic Sivaraam Sat, 16 Dec 2017 09:03:17 +0000 (14:33 +0530)

rebase: consistently use branch_name variable

The variable "branch_name" holds the <branch> parameter in "git
rebase <upstream> <branch>", but one codepath did not use it after
assigning $1 to it (instead it kept using $1). Make it use the
variable consistently.

Also, update an error message to say there is no such branch or
commit, as we are expecting either of them, and not limiting
ourselves to a branch name.

Signed-off-by: Kaartic Sivaraam <kaartic.sivaraam@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Kaartic Sivaraam <kaartic.sivaraam@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

Doc/check-ref-format: clarify information about @{... Kaartic Sivaraam Sat, 16 Dec 2017 08:13:49 +0000 (13:43 +0530)

Doc/check-ref-format: clarify information about @{-N} syntax

When the N-th previous thing checked out syntax (@{-N}) is used
with '--branch' option of check-ref-format the result may not be
the name of a branch that currently exists or ever existed. This
is because @{-N} is used to refer to the N-th last checked out
"thing", which might be a commit object name if the previous check
out was a detached HEAD state; or a branch name, otherwise. The
documentation thus does a wrong thing by promoting it as the
"previous branch syntax".

State that @{-N} is the syntax for specifying "N-th last thing
checked out" and also state that the result of using @{-N} might
also result in an commit object name.

Signed-off-by: Kaartic Sivaraam <kaartic.sivaraam@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

config: document default value of http.sslVerifySimon Ruderich Sat, 16 Dec 2017 12:32:02 +0000 (13:32 +0100)

config: document default value of http.sslVerify

Remove any doubt that certificates might not be verified by
default.

Signed-off-by: Simon Ruderich <simon@ruderich.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

p7519: improve check for prerequisite WATCHMANRené Scharfe Sat, 16 Dec 2017 12:12:23 +0000 (13:12 +0100)

p7519: improve check for prerequisite WATCHMAN

The return code of command -v with a non-existing command is 1 in bash
and 127 in dash. Use that return code directly to allow the script to
work with dash and without watchman (e.g. on Debian).

While at it stop redirecting the output. stderr is redirected to
/dev/null by test_lazy_prereq already, and stdout can actually be
useful -- the path of the found watchman executable is sent there, but
it's shown only if the script was run with --verbose.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Acked-by: Ben Peart <benpeart@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>

imap-send: URI encode server folderNicolas Morey-Chaisemartin Mon, 18 Dec 2017 19:11:13 +0000 (00:41 +0530)

imap-send: URI encode server folder

When trying to send a patch using 'imap-send' with 'curl' and the
following configuration:

[imap]
folder = "[Gmail]/Drafts"
host = imaps://imap.gmail.com
port = 993
sslverify = false

results in the following error,

curl_easy_perform() failed: URL using bad/illegal format or missing URL

This is a consequence of not URI-encoding the folder portion of
the URL which contains characters such as '[' which are not
allowed in a URI. According to RFC3986, these characters should be
URI-encoded.

So, URI-encode the folder before adding it to the URI to ensure it doesn't
contain characters that aren't allowed in a URI.

Reported-by: Doron Behar <doron.behar@gmail.com>
Signed-off-by: Nicolas Morey-Chaisemartin <NMoreyChaisemartin@suse.com>
Signed-off-by: Kaartic Sivaraam <kaartic.sivaraam@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>