Hey

2018-03-14 Thread Financial Services
Do you need a loan

What's cooking in git.git (Mar 2018, #03; Wed, 14)

2018-03-14 Thread Junio C Hamano
Here are the topics that have been cooking. Commits prefixed with '-' are only in 'pu' (proposed updates) while commits prefixed with '+' are in 'next'. The ones marked with '.' do not appear in any of the integration branches, but I am still holding onto them. You can find the changes

Re: [PATCH v3 00/36] object_id part 12

2018-03-14 Thread brian m. carlson
On Wed, Mar 14, 2018 at 09:48:30AM -0700, Junio C Hamano wrote: > As always, thanks for working on this. > > After this series, what jumps at me out of output from > > git grep -e '[^0-9A-Za-z_][24]0[^0-9A-Za-z_]' -- '*.[ch]' \ > ':!*sha1*' ':!contrib/' ':!compat/' > > are

Re: [PATCH v3 00/36] object_id part 12

2018-03-14 Thread brian m. carlson
On Wed, Mar 14, 2018 at 10:31:37AM -0700, Junio C Hamano wrote: > "brian m. carlson" writes: > > > -+ buf += the_hash_algo->rawsz; > > -+ size -= the_hash_algo->rawsz; > > ++ memcpy(it->oid.hash, (const unsigned

Re: [PATCH] http: fix an unused variable warning for 'curl_no_proxy'

2018-03-14 Thread Jeff King
On Wed, Mar 14, 2018 at 11:01:01PM +, Ramsay Jones wrote: > >> The version of libcurl installed was 0x070f04. So, while it was fresh in my > >> mind, I applied and tested this patch. > > > > Makes sense. This #if would go away under my "do not support antique > > curl versions" proposal. I

Re: Official Notice

2018-03-14 Thread Shalom Saada Saar
This email just won a sum of €5,000,000. For claims, Send your NAME, AGE & TELEPHONE NUMBER to: mastercard-awa...@columbus.rr.com

Re: [RFC] Rebasing merges: a jorney to the ultimate solution (Road Clear)

2018-03-14 Thread Igor Djordjevic
Hi Sergey, On 14/03/2018 08:21, Sergey Organov wrote: > > There are still 2 issues about the implementation that need to be > discussed though: > > 1. Still inverted order of the second merge compared to RFC. > > It'd be simple to "fix" again, except I'm not sure it'd be better, and > as there

Re: [RFC] Rebasing merges: a jorney to the ultimate solution(RoadClear)

2018-03-14 Thread Igor Djordjevic
On 14/03/2018 15:24, Sergey Organov wrote: > > > > Second side note: if we can fast-forward, currently we prefer that, and I > > > think we should keep that behavior with -R, too. > > > > I agree. > > I'm admittedly somewhat lost in the discussion, but are you talking > fast-forward on

Re: [PATCH] http: fix an unused variable warning for 'curl_no_proxy'

2018-03-14 Thread Ramsay Jones
On 14/03/18 22:15, Jeff King wrote: > On Wed, Mar 14, 2018 at 09:56:06PM +, Ramsay Jones wrote: > >> Signed-off-by: Ramsay Jones >> --- >> >> Hi Junio, >> >> I happened to be building git on an _old_ laptop earlier this evening >> and gcc complained, thus: >>

Re: [PATCH 0/3] Switch the default PCRE from v1 to v2 + configure fixes

2018-03-14 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > This small series makes USE_LIBPCRE=YesPlease mean > USE_LIBPCRE2=YesPlease, instead of USE_LIBPCRE1=YesPlease is it does > now. Along the way I fixed a couple of minor issues in the PCRE > detection in the autoconf script. > > Ævar Arnfjörð

Re: [PATCH 2/2] fetch-pack: do not check links for partial fetch

2018-03-14 Thread Jonathan Tan
On Wed, 14 Mar 2018 14:55:31 -0700 Junio C Hamano wrote: > Jonathan Tan writes: > > > When doing a partial clone or fetch with transfer.fsckobjects=1, use the > > --fsck-objects instead of the --strict flag when invoking index-pack so > > that links

Re: How to debug a "git merge"?

2018-03-14 Thread Jeff King
On Wed, Mar 14, 2018 at 05:56:04PM +0100, Lars Schneider wrote: > I am investigating a Git merge (a86dd40fe) in which an older version of > a file won over the newer version. I try to understand why this is the > case. I can reproduce the merge with the following commands: > $ git checkout -b

Re: [PATCH] http: fix an unused variable warning for 'curl_no_proxy'

2018-03-14 Thread Jeff King
On Wed, Mar 14, 2018 at 09:56:06PM +, Ramsay Jones wrote: > Signed-off-by: Ramsay Jones > --- > > Hi Junio, > > I happened to be building git on an _old_ laptop earlier this evening > and gcc complained, thus: > > CC http.o > http.c:77:20: warning:

Re: [PATCH] http: fix an unused variable warning for 'curl_no_proxy'

2018-03-14 Thread Jonathan Nieder
Hi, Ramsay Jones wrote: > Signed-off-by: Ramsay Jones > --- > > Hi Junio, > > I happened to be building git on an _old_ laptop earlier this evening > and gcc complained, thus: > > CC http.o > http.c:77:20: warning: ‘curl_no_proxy’ defined but not used >

Re: [PATCH v5 12/35] serve: introduce git-serve

2018-03-14 Thread Junio C Hamano
Brandon Williams writes: > Introduce git-serve, the base server for protocol version 2. > ... > Documentation/Makefile | 1 + > Documentation/technical/protocol-v2.txt | 174 + asciidoc: ERROR: protocol-v2.txt: line 20: only book doctypes

Re: [PATCH 2/2] fetch-pack: do not check links for partial fetch

2018-03-14 Thread Junio C Hamano
Jonathan Tan writes: > When doing a partial clone or fetch with transfer.fsckobjects=1, use the > --fsck-objects instead of the --strict flag when invoking index-pack so > that links are not checked, only objects. This is because incomplete > links are expected when

[PATCH] http: fix an unused variable warning for 'curl_no_proxy'

2018-03-14 Thread Ramsay Jones
Signed-off-by: Ramsay Jones --- Hi Junio, I happened to be building git on an _old_ laptop earlier this evening and gcc complained, thus: CC http.o http.c:77:20: warning: ‘curl_no_proxy’ defined but not used [-Wunused-variable] static const char

[PATCH v2 1/2] stash push: avoid printing errors

2018-03-14 Thread Thomas Gummerer
Currently 'git stash push -u -- ' prints the following errors if only matches untracked files: fatal: pathspec 'untracked' did not match any files error: unrecognized input This is because we first clean up the untracked files using 'git clean ', and then use a command chain involving

[PATCH v2 2/2] stash push -u: don't create empty stash

2018-03-14 Thread Thomas Gummerer
When introducing the stash push feature, and thus allowing users to pass in a pathspec to limit the files that would get stashed in df6bba0937 ("stash: teach 'push' (and 'create_stash') to honor pathspec", 2017-02-28), this developer missed one place where the pathspec should be passed in. Namely

[PATCH v2 3/3] shortlog: disallow left-over arguments outside repo

2018-03-14 Thread Martin Ågren
If we are outside a repo and have any arguments left after option-parsing, `setup_revisions()` will try to do its job and something like this will happen: $ git shortlog v2.16.0.. BUG: environment.c:183: git environment hasn't been setup Aborted (core dumped) The usage is wrong, but we could

[PATCH v2 2/3] shortlog: add usage-string for stdin-reading

2018-03-14 Thread Martin Ågren
This has been missing since we learned to print usage, way back in 4e27fb06f (add commit count options to git-shortlog, 2006-10-06). While at it, drop the [] around "...". This matches `git log -h` and Documentation/git-{short}log.txt. It formally makes it look like we do not allow `git shortlog

[PATCH v2 1/3] git-shortlog.txt: reorder usages

2018-03-14 Thread Martin Ågren
The first usage we give is the original one where, e.g., `git log` is piped through `git shortlog`. The description that follows reads the other way round, by first focusing on the general behavior, then ending with the behavior when reading from stdin. It is also a tiny bit odd that what is

[PATCH v2 0/3] shortlog: disallow left-over arguments outside repo

2018-03-14 Thread Martin Ågren
This is v2 of my attempt at stopping shortlog from BUG-ing when it is used incorrectly outside a repo. Thanks Jonathan and Junio for helpful comments. Patches 1 and 2 are identical to pu. The error message in patch 3 is now more general. The error condition on the other hand is a bit more

Re: [PATCH v5 01/35] pkt-line: introduce packet_read_with_status

2018-03-14 Thread Junio C Hamano
Brandon Williams writes: > +/* > + * Read a packetized line into a buffer like the 'packet_read()' function but > + * returns an 'enum packet_read_status' which indicates the status of the > read. > + * The number of bytes read will be assigined to *pktlen if the status of

Re: How to debug a "git merge"?

2018-03-14 Thread Lars Schneider
> On 14 Mar 2018, at 18:02, Derrick Stolee wrote: > > On 3/14/2018 12:56 PM, Lars Schneider wrote: >> Hi, >> >> I am investigating a Git merge (a86dd40fe) in which an older version of >> a file won over the newer version. I try to understand why this is the >> case. I can

Re: [PATCH v6 00/14] Serialized Git Commit Graph

2018-03-14 Thread Junio C Hamano
Derrick Stolee writes: > This v6 includes feedback around csum-file.c and the rename of hashclose() > to finalize_hashfile(). These are the first two commits of the series, so > they could be pulled out independently. > > The only other change since v5 is that I re-ran the

Re: [PATCH v6 00/14] Serialized Git Commit Graph

2018-03-14 Thread Ramsay Jones
On 14/03/18 19:27, Derrick Stolee wrote: > This v6 includes feedback around csum-file.c and the rename of hashclose() > to finalize_hashfile(). These are the first two commits of the series, so > they could be pulled out independently. > > The only other change since v5 is that I re-ran the

Re: [PATCH v3 00/36] object_id part 12

2018-03-14 Thread Junio C Hamano
Junio C Hamano writes: > "brian m. carlson" writes: > >> This is the twelfth in a series of patches to convert various parts of >> the code to struct object_id. >> >> brian m. carlson (36): >> ... > As always, thanks for working on this.

[PATCH v6 01/14] csum-file: rename hashclose() to finalize_hashfile()

2018-03-14 Thread Derrick Stolee
From: Derrick Stolee The hashclose() method behaves very differently depending on the flags parameter. In particular, the file descriptor is not always closed. Perform a simple rename of "hashclose()" to "finalize_hashfile()" in preparation for functional changes.

[PATCH v6 07/14] commit-graph: implement 'git-commit-graph write'

2018-03-14 Thread Derrick Stolee
From: Derrick Stolee Teach git-commit-graph to write graph files. Create new test script to verify this command succeeds without failure. Signed-off-by: Derrick Stolee --- Documentation/git-commit-graph.txt | 39

[PATCH v6 05/14] commit-graph: create git-commit-graph builtin

2018-03-14 Thread Derrick Stolee
From: Derrick Stolee Teach git the 'commit-graph' builtin that will be used for writing and reading packed graph files. The current implementation is mostly empty, except for an '--object-dir' option. Signed-off-by: Derrick Stolee --- .gitignore

[PATCH v6 13/14] commit-graph: build graph from starting commits

2018-03-14 Thread Derrick Stolee
From: Derrick Stolee Teach git-commit-graph to read commits from stdin when the --stdin-commits flag is specified. Commits reachable from these commits are added to the graph. This is a much faster way to construct the graph than inspecting all packed objects, but is

[PATCH v6 14/14] commit-graph: implement "--additive" option

2018-03-14 Thread Derrick Stolee
From: Derrick Stolee Teach git-commit-graph to add all commits from the existing commit-graph file to the file about to be written. This should be used when adding new commits without performing garbage collection. Signed-off-by: Derrick Stolee ---

[PATCH v6 12/14] commit-graph: read only from specific pack-indexes

2018-03-14 Thread Derrick Stolee
From: Derrick Stolee Teach git-commit-graph to inspect the objects only in a certain list of pack-indexes within the given pack directory. This allows updating the commit graph iteratively. Signed-off-by: Derrick Stolee ---

[PATCH v6 11/14] commit: integrate commit graph with commit parsing

2018-03-14 Thread Derrick Stolee
From: Derrick Stolee Teach Git to inspect a commit graph file to supply the contents of a struct commit when calling parse_commit_gently(). This implementation satisfies all post-conditions on the struct commit, including loading parents, the root tree, and the commit

[PATCH v6 04/14] graph: add commit graph design document

2018-03-14 Thread Derrick Stolee
From: Derrick Stolee Add Documentation/technical/commit-graph.txt with details of the planned commit graph feature, including future plans. Signed-off-by: Derrick Stolee --- Documentation/technical/commit-graph.txt | 164

[PATCH v6 09/14] commit-graph: add core.commitGraph setting

2018-03-14 Thread Derrick Stolee
From: Derrick Stolee The commit graph feature is controlled by the new core.commitGraph config setting. This defaults to 0, so the feature is opt-in. The intention of core.commitGraph is that a user can always stop checking for or parsing commit graph files if

[PATCH v6 00/14] Serialized Git Commit Graph

2018-03-14 Thread Derrick Stolee
This v6 includes feedback around csum-file.c and the rename of hashclose() to finalize_hashfile(). These are the first two commits of the series, so they could be pulled out independently. The only other change since v5 is that I re-ran the performance numbers in "commit: integrate commit graph

[PATCH v6 08/14] commit-graph: implement git commit-graph read

2018-03-14 Thread Derrick Stolee
From: Derrick Stolee Teach git-commit-graph to read commit graph files and summarize their contents. Use the read subcommand to verify the contents of a commit graph file in the tests. Signed-off-by: Derrick Stolee ---

[PATCH v6 06/14] commit-graph: implement write_commit_graph()

2018-03-14 Thread Derrick Stolee
From: Derrick Stolee Teach Git to write a commit graph file by checking all packed objects to see if they are commits, then store the file in the given object directory. Signed-off-by: Derrick Stolee --- Makefile | 1 + commit-graph.c |

[PATCH v6 10/14] commit-graph: close under reachability

2018-03-14 Thread Derrick Stolee
From: Derrick Stolee Teach write_commit_graph() to walk all parents from the commits discovered in packfiles. This prevents gaps given by loose objects or previously-missed packfiles. Also automatically add commits from the existing graph file, if it exists.

[PATCH v6 02/14] csum-file: refactor finalize_hashfile() method

2018-03-14 Thread Derrick Stolee
From: Derrick Stolee If we want to use a hashfile on the temporary file for a lockfile, then we need finalize_hashfile() to fully write the trailing hash but also keep the file descriptor open. Do this by adding a new CSUM_HASH_IN_STREAM flag along with a functional

[PATCH v6 03/14] commit-graph: add format document

2018-03-14 Thread Derrick Stolee
From: Derrick Stolee Add document specifying the binary format for commit graphs. This format allows for: * New versions. * New hash functions and hash lengths. * Optional extensions. Basic header information is followed by a binary table of contents into "chunks" that

[PATCH v2 4/5] ref-filter: add return value to parsers

2018-03-14 Thread Olga Telezhnaya
Continue removing any printing from ref-filter formatting logic, so that it could be more general. Change the signature of parsers by adding return value and strbuf parameter for error message. Signed-off-by: Olga Telezhnaia --- ref-filter.c | 177

[PATCH v2 2/5] ref-filter: add return value && strbuf to handlers

2018-03-14 Thread Olga Telezhnaya
Continue removing any printing from ref-filter formatting logic, so that it could be more general. Change the signature of handlers by adding return value and strbuf parameter for errors. Signed-off-by: Olga Telezhnaia --- ref-filter.c | 71

[PATCH v2 1/5] ref-filter: start adding strbufs with errors

2018-03-14 Thread Olga Telezhnaya
This is a first step in removing any printing from ref-filter formatting logic, so that it could be more general. Everything would be the same for show_ref_array_item() users. But, if you want to deal with errors by your own, you could invoke format_ref_array_item(). It means that you need to

[PATCH v2 5/5] ref-filter: get_ref_atom_value() error handling

2018-03-14 Thread Olga Telezhnaya
Finish removing any printing from ref-filter formatting logic, so that it could be more general. Change the signature of get_ref_atom_value() and underlying functions by adding return value and strbuf parameter for error message. It's important to mention that grab_objectname() returned 1 if it

[PATCH v2 3/5] ref-filter: change parsing function error handling

2018-03-14 Thread Olga Telezhnaya
Continue removing any printing from ref-filter formatting logic, so that it could be more general. Change the signature of parse_ref_filter_atom() by changing return value, adding previous return value to function parameter and also adding strbuf parameter for error message. Signed-off-by: Olga

[PATCH 2/2] fetch-pack: do not check links for partial fetch

2018-03-14 Thread Jonathan Tan
When doing a partial clone or fetch with transfer.fsckobjects=1, use the --fsck-objects instead of the --strict flag when invoking index-pack so that links are not checked, only objects. This is because incomplete links are expected when doing a partial clone or fetch. Signed-off-by: Jonathan Tan

[PATCH 0/2] Make partial clone/fetch work when transfer.fsckobjects=1

2018-03-14 Thread Jonathan Tan
One of my colleagues noticed that we obtain a "fatal: did not receive expected object" error when partial-cloning (that is, with --filter set) if transfer.fsckobjects is true. Here's a fix for that. Jonathan Tan (2): index-pack: support checking objects but not links fetch-pack: do not check

[PATCH 1/2] index-pack: support checking objects but not links

2018-03-14 Thread Jonathan Tan
The index-pack command currently supports the --check-self-contained-and-connected argument, for internal use only, that instructs it to only check for broken links and not broken objects. For partial clones, we need the inverse, so add a --fsck-objects argument that checks for broken objects and

[PATCH v5 06/35] transport: use get_refs_via_connect to get refs

2018-03-14 Thread Brandon Williams
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 --- transport.c | 18 -- 1 file changed, 4 insertions(+), 14

[PATCH v5 05/35] upload-pack: factor out processing lines

2018-03-14 Thread Brandon Williams
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

[PATCH v5 08/35] connect: discover protocol version outside of get_remote_heads

2018-03-14 Thread Brandon Williams
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:

[PATCH v5 09/35] transport: store protocol version

2018-03-14 Thread Brandon Williams
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:

[PATCH v5 16/35] transport: convert transport_get_remote_refs to take a list of ref prefixes

2018-03-14 Thread Brandon Williams
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 --- builtin/clone.c | 2 +-

[PATCH v5 15/35] transport: convert get_refs_list to take a list of ref prefixes

2018-03-14 Thread Brandon Williams
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

[PATCH v5 24/35] connect: don't request v2 when pushing

2018-03-14 Thread Brandon Williams
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

[PATCH v5 20/35] upload-pack: introduce fetch server command

2018-03-14 Thread Brandon Williams
Introduce the 'fetch' server command. Signed-off-by: Brandon Williams --- Documentation/technical/protocol-v2.txt | 127 +++ serve.c | 2 + t/t5701-git-serve.sh| 1 + upload-pack.c | 266

[PATCH v5 30/35] remote-curl: store the protocol version the server responded with

2018-03-14 Thread Brandon Williams
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

[PATCH v5 25/35] transport-helper: remove name parameter

2018-03-14 Thread Brandon Williams
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

[PATCH v5 23/35] connect: refactor git_connect to only get the protocol version once

2018-03-14 Thread Brandon Williams
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

[PATCH v5 34/35] remote-curl: implement stateless-connect command

2018-03-14 Thread Brandon Williams
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

[PATCH v5 35/35] remote-curl: don't request v2 when pushing

2018-03-14 Thread Brandon Williams
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

[PATCH v5 33/35] http: eliminate "# service" line when using protocol v2

2018-03-14 Thread Brandon Williams
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 --- http-backend.c | 8 ++-- remote-curl.c | 3 +++ 2 files changed, 9 insertions(+), 2

[PATCH v5 32/35] http: don't always add Git-Protocol header

2018-03-14 Thread Brandon Williams
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 ---

[PATCH v5 29/35] remote-curl: create copy of the service name

2018-03-14 Thread Brandon Williams
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

[PATCH v5 28/35] pkt-line: add packet_buf_write_len function

2018-03-14 Thread Brandon Williams
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 --- pkt-line.c | 16 pkt-line.h | 1 + 2 files changed, 17

[PATCH v5 31/35] http: allow providing extra headers for http requests

2018-03-14 Thread Brandon Williams
Add a way for callers to request that extra headers be included when making http requests. Signed-off-by: Brandon Williams --- http.c | 8 http.h | 7 +++ 2 files changed, 15 insertions(+) diff --git a/http.c b/http.c index 5977712712..e1757d62b2 100644 ---

[PATCH v5 27/35] transport-helper: introduce stateless-connect

2018-03-14 Thread Brandon Williams
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

[PATCH v5 21/35] fetch-pack: perform a fetch using v2

2018-03-14 Thread Brandon Williams
When communicating with a v2 server, perform a fetch by requesting the 'fetch' command. Signed-off-by: Brandon Williams --- Documentation/technical/protocol-v2.txt | 68 +- builtin/fetch-pack.c| 2 +- fetch-pack.c| 270

[PATCH v5 26/35] transport-helper: refactor process_connect_service

2018-03-14 Thread Brandon Williams
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

[PATCH v5 22/35] fetch-pack: support shallow requests

2018-03-14 Thread Brandon Williams
Enable shallow clones and deepen requests using protocol version 2 if the server 'fetch' command supports the 'shallow' feature. Signed-off-by: Brandon Williams --- connect.c| 22 connect.h| 2 ++ fetch-pack.c | 71

[PATCH v5 19/35] push: pass ref prefixes when pushing

2018-03-14 Thread Brandon Williams
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 ---

[PATCH v5 17/35] ls-remote: pass ref prefixes when requesting a remote's refs

2018-03-14 Thread Brandon Williams
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

[PATCH v5 13/35] ls-refs: introduce ls-refs server command

2018-03-14 Thread Brandon Williams
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

[PATCH v5 18/35] fetch: pass ref prefixes when fetching

2018-03-14 Thread Brandon Williams
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

[PATCH v5 12/35] serve: introduce git-serve

2018-03-14 Thread Brandon Williams
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

[PATCH v5 14/35] connect: request remote refs using v2

2018-03-14 Thread Brandon Williams
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 --- builtin/upload-pack.c | 10 +-- connect.c | 138

[PATCH v5 11/35] test-pkt-line: introduce a packet-line test helper

2018-03-14 Thread Brandon Williams
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 --- Makefile | 1 + t/helper/test-pkt-line.c | 64

[PATCH v5 10/35] protocol: introduce enum protocol_version value protocol_v2

2018-03-14 Thread Brandon Williams
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 --- builtin/fetch-pack.c | 2 ++ builtin/receive-pack.c | 6 ++ builtin/send-pack.c| 3 +++

[PATCH v5 04/35] upload-pack: convert to a builtin

2018-03-14 Thread Brandon Williams
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 --- Makefile | 3 +- builtin.h | 1 + builtin/upload-pack.c | 67 ++

[PATCH v5 07/35] connect: convert get_remote_heads to use struct packet_reader

2018-03-14 Thread Brandon Williams
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

[PATCH v5 02/35] pkt-line: allow peeking a packet line without consuming it

2018-03-14 Thread Brandon Williams
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

[PATCH v5 01/35] pkt-line: introduce packet_read_with_status

2018-03-14 Thread Brandon Williams
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

[PATCH v5 03/35] pkt-line: add delim packet support

2018-03-14 Thread Brandon Williams
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

[PATCH v5 00/35] protocol version 2

2018-03-14 Thread Brandon Williams
Changes in v5: * Tweaked the API of the packet_read_with_status function so that it wrote the pktlen value even in the presence of non-normal reads (flush, delim, EOF). * Changed the format of ref-patterns for the ls-refs server command. They are now ref-prefixes and matching is done

Re: [GSoC] [PATCH] test: avoid pipes in git related commands for test suite

2018-03-14 Thread Eric Sunshine
On Wed, Mar 14, 2018 at 5:57 AM, Ævar Arnfjörð Bjarmason wrote: > On Wed, Mar 14 2018, Eric Sunshine jotted: >> On Tue, Mar 13, 2018 at 4:19 PM, Pratik Karki >> wrote: >>> -'git diff-tree -r -M --name-status HEAD^ HEAD | \ >>> - grep

Re: [PATCH 1/2] rebase: support --signoff with implicit rebase

2018-03-14 Thread Junio C Hamano
Phillip Wood writes: > From: Phillip Wood > > This allows one to run 'git rebase --exec "make check" --signoff' > which is useful when preparing a patch series for publication and is > more convenient than doing the signoff with another

Re: [PATCH v4 27/35] transport-helper: introduce stateless-connect

2018-03-14 Thread Brandon Williams
On 03/13, Jonathan Tan wrote: > On Wed, 28 Feb 2018 15:22:44 -0800 > Brandon Williams wrote: > > > +'stateless-connect':: > > + Experimental; for internal use only. > > + Can attempt to connect to a remote server for communication > > + using git's wire-protocol version

Re: [PATCH v3 00/36] object_id part 12

2018-03-14 Thread Junio C Hamano
"brian m. carlson" writes: > -+buf += the_hash_algo->rawsz; > -+size -= the_hash_algo->rawsz; > ++memcpy(it->oid.hash, (const unsigned char*)buf, rawsz); > ++buf += rawsz; > ++

Dear friend,

2018-03-14 Thread Baari Abdul
Dear friend, I Mr.Baari Abdul, Head of Operation at Bank of Africa. I want invite into a business overture which involves an amount of $ 22.3 million. At your acceptance, this amount will be transferred to your name as a foreign partner. I need your help to get this fund to be transfer

Re: [PATCH 3/3] Makefile: optionally symlink libexec/git-core binaries to bin/git

2018-03-14 Thread Linus Torvalds
On Wed, Mar 14, 2018 at 3:14 AM, Ævar Arnfjörð Bjarmason wrote: > On Wed, Mar 14 2018, Johannes Sixt jotted: >> >> It is important to leave the default at hard-linking the binaries, >> because on Windows symbolic links are second class citizens (they >> require special

Re: How to debug a "git merge"?

2018-03-14 Thread Derrick Stolee
On 3/14/2018 12:56 PM, Lars Schneider wrote: Hi, I am investigating a Git merge (a86dd40fe) in which an older version of a file won over the newer version. I try to understand why this is the case. I can reproduce the merge with the following commands: $ git checkout -b test a02fa3303 $

Re: [PATCH v5 04/13] csum-file: add CSUM_KEEP_OPEN flag

2018-03-14 Thread Junio C Hamano
Derrick Stolee writes: >> close_commit_graph(); >> >> And after writing all data out (oh by the way, why aren't we passing >> commit_graph instance around and instead relying on a file-scope >> static global?)... > > Yeah, we should remove the global dependence. Is this a

How to debug a "git merge"?

2018-03-14 Thread Lars Schneider
Hi, I am investigating a Git merge (a86dd40fe) in which an older version of a file won over the newer version. I try to understand why this is the case. I can reproduce the merge with the following commands: $ git checkout -b test a02fa3303 $ GIT_MERGE_VERBOSITY=5 git merge --verbose c1b82995c

Re: [PATCH v3 00/36] object_id part 12

2018-03-14 Thread Junio C Hamano
"brian m. carlson" writes: > This is the twelfth in a series of patches to convert various parts of > the code to struct object_id. > > Changes from v2: > * Rebase onto master (to fix "typename" → "type_name" changes). > * Replace some uses of hashcpy with memcpy. >

Re: [PATCH/RFC v3 08/12] pack-objects: refer to delta objects by index instead of pointer

2018-03-14 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > Notice that packing_data::nr_objects is uint32_t, we could only handle > maximum 4G objects and can address all of them with an uint32_t. If we > use a pointer here, we waste 4 bytes on 64 bit architecture. Some things are left unsaid or left

Re: Why don't we symlink libexec/git-core/* to bin/git?

2018-03-14 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > Is the only reason we're still installing these binaries like git-add in > libexec for compatibility with some old installation where that was > added to the $PATH, shouldn't we (and I can write this patch) also have > a toggle for "I want the

Re: [git-sizer] Implications of a large commit object

2018-03-14 Thread Jeff King
On Wed, Mar 14, 2018 at 09:33:32AM +0100, Michael Haggerty wrote: > Maybe your migration tool created a huge commit message, for example > listing each of the files that was changed. > > AFAIK this won't cause Git itself any problems, but it's likely to be > inconvenient. For example, when you

  1   2   >