Re: [RFC PATCH 4/7] merge-recursive: fix assumption that head tree being merged is HEAD

2018-06-05 Thread Elijah Newren
On Sun, Jun 3, 2018 at 8:19 PM, Junio C Hamano wrote: > Elijah Newren writes: > >> `git merge-recursive` does a three-way merge between user-specified trees >> base, head, and remote. Since the user is allowed to specify head, we can >> not necesarily assume that head == HEAD. >> >> We modify

[PATCHv1 0/2] git-p4: disable sync after submit

2018-06-05 Thread Luke Diamand
This is a small patch to git-p4 to disable the automatic sync after submit. In my day-to-day work, I have a central git-p4 repo which is automatically kept up-to-date, so the repos where I actually work and submit from don't even need the sync. I usually end up hitting Ctrl-C partway through the

[PATCHv1 2/2] git-p4: add option to disable syncing of p4/master with p4

2018-06-05 Thread Luke Diamand
Add an option to the git-p4 submit command to disable syncing with Perforce. This is useful for the case where a git-p4 mirror has been setup on a server somewhere, running from (e.g.) cron, and developers then clone from this. Having the local cloned copy also sync from Perforce just isn't

[PATCHv1 1/2] git-p4: disable-rebase: allow setting this via configuration

2018-06-05 Thread Luke Diamand
This just lets you set the --disable-rebase option with the git configuration options git-p4.disableRebase. If you're using this option, you probably want to set it all the time for a given repo. Signed-off-by: Luke Diamand --- Documentation/git-p4.txt | 5 - git-p4.py| 2 +-

[PATCHv1 1/1] git-p4: better error reporting when p4 fails

2018-06-05 Thread Luke Diamand
Currently when p4 fails to run, git-p4 just crashes with an obscure error message. For example, if the P4 ticket has expired, you get: Error: Cannot locate perforce checkout of in client view This change checks whether git-p4 can talk to the Perforce server when the first P4 operation is

[PATCHv1 0/1] git-p4: better error reporting

2018-06-05 Thread Luke Diamand
If git-p4 cannot talk to the Perforce server, it will either give a confusing error message, or just crash. Even I get tripped up by this. This change just checks that the client can talk to the server, and in particular that the user is logged in (the default login timeout is 12 hours). It

Re: [PATCHv1 2/2] git-p4: add option to disable syncing of p4/master with p4

2018-06-05 Thread Eric Sunshine
On Tue, Jun 5, 2018 at 4:29 AM Luke Diamand wrote: > Add an option to the git-p4 submit command to disable syncing > with Perforce. > > This is useful for the case where a git-p4 mirror has been setup > on a server somewhere, running from (e.g.) cron, and developers > then clone from this. Having

[PATCH] t3200-branch.sh: use "--set-upstream-to" in test

2018-06-05 Thread Robert P. J. Day
Change deprecated "--set-upstream" branch option to preferred "--set-upstream-to". Signed-off-by: Robert P. J. Day --- i'm assuming this should use "--set-upstream-to" as do all the others. diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh index 69ea8202f4..ef887a0b32 100755 ---

Re: [PATCHv1 1/3] git-p4: raise exceptions from p4CmdList based on error from p4 server

2018-06-05 Thread Luke Diamand
On 5 June 2018 at 10:54, Eric Sunshine wrote: > On Tue, Jun 5, 2018 at 5:14 AM Luke Diamand wrote: >> This change lays some groundwork for better handling of rowcount errors >> from the server, where it fails to send us results because we requested >> too many. >> >> It adds an option to

Re: Git not creating merge commit when merging signed/annotated tag

2018-06-05 Thread Ævar Arnfjörð Bjarmason
On Tue, Jun 05 2018, Tim Friske wrote: > Hi Everyone, > > ten days ago I asked on https://unix.stackexchange.com/ why Git is not > creating a merge commit when merging a signed/annotated tag. Does someone has > an answer to my question >

Re: [PATCH] t3200-branch.sh: use "--set-upstream-to" in test

2018-06-05 Thread Robert P. J. Day
On Tue, 5 Jun 2018, SZEDER Gábor wrote: > > Change deprecated "--set-upstream" branch option to > > preferred "--set-upstream-to". > > > > Signed-off-by: Robert P. J. Day > > > > --- > > > > i'm assuming this should use "--set-upstream-to" as do all the > > others. > > I don't think so, see

[GSoC][PATCH v2 1/1] rebase--interactive: rewrite append_todo_help() in C

2018-06-05 Thread Alban Gruin
This rewrites append_todo_help() from shell to C. It also incorporates some parts of initiate_action() and complete_action() that also write help texts to the todo file. Two flags are added to rebase--helper.c: one to call append_todo_help() (`--append-todo-help`), and another one to tell

[GSoC][PATCH v2 0/1] rebase -i: rewrite append_todo_help() in C

2018-06-05 Thread Alban Gruin
This patch rewrites append_todo_help() from shell to C. The C version covers a bit more than the old shell version. To achieve that, some parameters were added to rebase--helper. This is part of the effort to rewrite interactive rebase in C. Changes since v1: - Renaming the parameter to insert

Re: [PATCH] t3200-branch.sh: use "--set-upstream-to" in test

2018-06-05 Thread SZEDER Gábor
> Change deprecated "--set-upstream" branch option to > preferred "--set-upstream-to". > > Signed-off-by: Robert P. J. Day > > --- > > i'm assuming this should use "--set-upstream-to" as do all the > others. I don't think so, see 52668846ea (builtin/branch: stop supporting the

Git not creating merge commit when merging signed/annotated tag

2018-06-05 Thread Tim Friske
Hi Everyone, ten days ago I asked on https://unix.stackexchange.com/ why Git is not creating a merge commit when merging a signed/annotated tag. Does someone has an answer to my question

[PATCHv1 3/3] git-p4: auto-size the block

2018-06-05 Thread Luke Diamand
git-p4 originally would fetch changes in one query. On large repos this could fail because of the limits that Perforce imposes on the number of items returned and the number of queries in the database. To fix this, git-p4 learned to query changes in blocks of 512 changes, However, this can be

[PATCHv1 1/3] git-p4: raise exceptions from p4CmdList based on error from p4 server

2018-06-05 Thread Luke Diamand
This change lays some groundwork for better handling of rowcount errors from the server, where it fails to send us results because we requested too many. It adds an option to p4CmdList() to return errors as a Python exception. The exceptions are derived from P4Exception (something went wrong),

[PATCHv1 2/3] git-p4: narrow the scope of exceptions caught when parsing an int

2018-06-05 Thread Luke Diamand
The current code traps all exceptions around some code which parses an integer, and then talks to Perforce. That can result in errors from Perforce being ignored. Change the code to only catch the integer conversion exceptions. Signed-off-by: Luke Diamand --- git-p4.py | 2 +- 1 file changed,

Re: [PATCHv1 3/3] git-p4: auto-size the block

2018-06-05 Thread Eric Sunshine
On Tue, Jun 5, 2018 at 5:14 AM Luke Diamand wrote: > git-p4 originally would fetch changes in one query. On large repos this > could fail because of the limits that Perforce imposes on the number of > items returned and the number of queries in the database. > > To fix this, git-p4 learned to

Re: [PATCHv1 1/1] git-p4: better error reporting when p4 fails

2018-06-05 Thread Luke Diamand
On 5 June 2018 at 11:49, Merland Romain wrote: > >> @@ -91,6 +93,13 @@ def p4_build_cmd(cmd): >> real_cmd = ' '.join(real_cmd) + ' ' + cmd >> else: >> real_cmd += cmd >> + >> +# now check that we can actually talk to the server >> +global p4_access_checked >> +if

Re: [PATCHv1 1/3] git-p4: raise exceptions from p4CmdList based on error from p4 server

2018-06-05 Thread Eric Sunshine
On Tue, Jun 5, 2018 at 5:14 AM Luke Diamand wrote: > This change lays some groundwork for better handling of rowcount errors > from the server, where it fails to send us results because we requested > too many. > > It adds an option to p4CmdList() to return errors as a Python exception. > > The

[PATCHv1 0/3] git-p4: improvements to p4 "blocking"

2018-06-05 Thread Luke Diamand
This patchset improves the way that git-p4 sends requests in "blocks". The problem comes about because the Perforce server limits the maximum number of results it will send back (there are actually two different limits). This causes git-p4 failures if you ask for too much data. In commit

[PATCH v7 2/8] checkout.h: wrap the arguments to unique_tracking_name()

2018-06-05 Thread Ævar Arnfjörð Bjarmason
The line was too long already, and will be longer still when a later change adds another argument. Signed-off-by: Ævar Arnfjörð Bjarmason --- checkout.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/checkout.h b/checkout.h index 9980711179..4cd4cd1c23 100644 ---

[PATCH v7 1/8] checkout tests: index should be clean after dwim checkout

2018-06-05 Thread Ævar Arnfjörð Bjarmason
Assert that whenever there's a DWIM checkout that the index should be clean afterwards, in addition to the correct branch being checked-out. The way the DWIM checkout code in checkout.[ch] works is by looping over all remotes, and for each remote trying to find if a given reference name only

[PATCH v7 7/8] checkout: add advice for ambiguous "checkout "

2018-06-05 Thread Ævar Arnfjörð Bjarmason
As the "checkout" documentation describes: If is not found but there does exist a tracking branch in exactly one remote (call it ) with a matching name, treat as equivalent to [...] / Note that the "error: pathspec[...]" message is still printed. This is because whatever else

[PATCH v7 4/8] checkout.c: change "unique" member to "num_matches"

2018-06-05 Thread Ævar Arnfjörð Bjarmason
Internally track how many matches we find in the check_tracking_name() callback. Nothing uses this now, but it will be made use of in a later change. Signed-off-by: Ævar Arnfjörð Bjarmason --- checkout.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/checkout.c

[PATCH v7 3/8] checkout.c: introduce an *_INIT macro

2018-06-05 Thread Ævar Arnfjörð Bjarmason
Add an *_INIT macro for the tracking_name_data similar to what exists elsewhere in the codebase, e.g. OID_ARRAY_INIT in sha1-array.h. This will make it more idiomatic in later changes to add more fields to the struct & its initialization macro. Signed-off-by: Ævar Arnfjörð Bjarmason ---

[PATCH v7 5/8] checkout: pass the "num_matches" up to callers

2018-06-05 Thread Ævar Arnfjörð Bjarmason
Pass the previously added "num_matches" struct value up to the callers of unique_tracking_name(). This will allow callers to optionally print better error messages in a later change. Signed-off-by: Ævar Arnfjörð Bjarmason --- builtin/checkout.c | 10 +++--- builtin/worktree.c | 4 ++--

[PATCH v7 8/8] checkout & worktree: introduce checkout.defaultRemote

2018-06-05 Thread Ævar Arnfjörð Bjarmason
Introduce a checkout.defaultRemote setting which can be used to designate a remote to prefer (via checkout.defaultRemote=origin) when running e.g. "git checkout master" to mean origin/master, even though there's other remotes that have the "master" branch. I want this because it's very handy to

[PATCH v7 6/8] builtin/checkout.c: use "ret" variable for return

2018-06-05 Thread Ævar Arnfjörð Bjarmason
There is no point in doing this right now, but in later change the "ret" variable will be inspected. This change makes that meaningful change smaller. Signed-off-by: Ævar Arnfjörð Bjarmason --- builtin/checkout.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git

[PATCH v7 0/8] ambiguous checkout UI & checkout.defaultRemote

2018-06-05 Thread Ævar Arnfjörð Bjarmason
Fixes issues noted with v6, hopefully ready for queuing. A tbdiff with v6: 1: ab4529d9f5 = 1: 2ca81c76fc checkout tests: index should be clean after dwim checkout 2: c8bbece403 = 2: 19b14a1c75 checkout.h: wrap the arguments to unique_tracking_name() 3: 881fe63f4f = 3: 8bc6a9c052 checkout.c:

[PATCH 6/6] Forbid "the_index" in dir.c and unpack-trees.c

2018-06-05 Thread Nguyễn Thái Ngọc Duy
Use of global variables like the_index makes it very hard to follow the code flow, especially when it's buried deep in some minor helper function. We are gradually avoiding global variables, this hopefully will make it one step closer. The end game is, the set of "library" source files will have

[PATCH 2/6] unpack-trees: add a note about path invalidation

2018-06-05 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- unpack-trees.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/unpack-trees.c b/unpack-trees.c index 3a85a02a77..5d06aa9c98 100644 --- a/unpack-trees.c +++ b/unpack-trees.c @@ -1545,6 +1545,17 @@ static int verify_uptodate_sparse(const

[PATCH 5/6] unpack-trees: avoid the_index in verify_absent()

2018-06-05 Thread Nguyễn Thái Ngọc Duy
Both functions that are updated in this commit are called by verify_absent(), which is part of the "unpack-trees" operation that is supposed to work on any index file specified by the caller. Thanks to Brandon [1] [2], an implicit dependency on the_index is exposed. This commit fixes it. In both

[PATCH 4/6] unpack-tress: convert clear_ce_flags* to avoid the_index

2018-06-05 Thread Nguyễn Thái Ngọc Duy
Prior to fba92be8f7, this code implicitly (and incorrectly) assumes the_index when running the exclude machinery. fba92be8f7 helps show this problem clearer because unpack-trees operation is supposed to work on whatever index the caller specifies... not specifically the_index. Update the code to

[PATCH 3/6] unpack-trees: don't shadow global var the_index

2018-06-05 Thread Nguyễn Thái Ngọc Duy
This function mark_new_skip_worktree() has an argument named the_index which is also the name of a global variable. While they have different types (the global the_index is not a pointer) mistakes can easily happen and it's also confusing for readers. Rename the function argument to something

[PATCH 0/6] Fix "the_index" usage in unpack-trees.c

2018-06-05 Thread Nguyễn Thái Ngọc Duy
This is a potential problem that is exposed after Brandon kicked the_index out of dir.c (big thanks!) and could be seen as a continuation of bw/dir-c-stops-relying-on-the-index. Also thanks to Elijah for helping analyze this code. The last patch may be debatable. If we go this route, we may end

[PATCH 1/6] unpack-trees: remove 'extern' on function declaration

2018-06-05 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- unpack-trees.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unpack-trees.h b/unpack-trees.h index c2b434c606..534358fcc5 100644 --- a/unpack-trees.h +++ b/unpack-trees.h @@ -82,8 +82,8 @@ struct unpack_trees_options {

Re: [PATCH v7 1/8] checkout tests: index should be clean after dwim checkout

2018-06-05 Thread SZEDER Gábor
> diff --git a/t/t2024-checkout-dwim.sh b/t/t2024-checkout-dwim.sh > index 3e5ac81bd2..ed32828105 100755 > --- a/t/t2024-checkout-dwim.sh > +++ b/t/t2024-checkout-dwim.sh > @@ -23,6 +23,12 @@ test_branch_upstream () { > test_cmp expect.upstream actual.upstream > } > >

Re: [PATCH v4 00/21] Integrate commit-graph into 'fsck' and 'gc'

2018-06-05 Thread Ævar Arnfjörð Bjarmason
On Mon, Jun 4, 2018 at 6:52 PM, Derrick Stolee wrote: > Thanks for the feedback on v3. There were several small cleanups, but > perhaps the biggest change is the addition of "commit-graph: use > string-list API for input" which makes "commit-graph: add '--reachable' > option" much simpler. Do

BUG: submodule code prints '(null)'

2018-06-05 Thread Duy Nguyen
I do not know how to reproduce this (and didn't bother to look deeply into it after I found it was not a trivial fix) but one of my "git fetch" showed warning: Submodule in commit be2db96a6c506464525f588da59cade0cedddb5e at path: '(null)' collides with a submodule named the same. Skipping it. I

Re: [RFC PATCH 1/2] docs: reflect supported fetch options of git pull

2018-06-05 Thread Duy Nguyen
On Mon, Jun 4, 2018 at 11:50 PM, Rafael Ascensão wrote: > `git pull` understands some options of `git fetch` which then uses in > its operation. The documentation of `git pull` doesn't reflect this > clearly, showing options that are not yet supported (e.g. `--deepen`) > and omitting options that

Re: [PATCH 3/6] unpack-trees: don't shadow global var the_index

2018-06-05 Thread Ramsay Jones
On 05/06/18 16:43, Nguyễn Thái Ngọc Duy wrote: > This function mark_new_skip_worktree() has an argument named the_index > which is also the name of a global variable. While they have different > types (the global the_index is not a pointer) mistakes can easily > happen and it's also confusing

[PATCH 6/8] fetch: refactor to make function args narrower

2018-06-05 Thread Brandon Williams
Refactor find_non_local_tags and get_ref_map to only take the information they need instead of the entire transport struct. Besides improving code clarity, this also improves their flexibility, allowing for a different set of refs to be used instead of relying on the ones stored in the transport

[PATCH 3/8] upload-pack: test negotiation with changing repository

2018-06-05 Thread Brandon Williams
Add tests to check the behavior of fetching from a repository which changes between rounds of negotiation (for example, when different servers in a load-balancing agreement participate in the same stateless RPC negotiation). This forms a baseline of comparison to the ref-in-want functionality

[PATCH 4/8] fetch: refactor the population of peer ref OIDs

2018-06-05 Thread Brandon Williams
Populate peer ref OIDs in get_ref_map instead of do_fetch. Besides tightening scopes of variables in the code, this also prepares for get_ref_map being able to be called multiple times within do_fetch. Signed-off-by: Brandon Williams --- builtin/fetch.c | 36 ++--

[PATCH 1/8] test-pkt-line: add unpack-sideband subcommand

2018-06-05 Thread Brandon Williams
Add an 'unpack-sideband' subcommand to the test-pkt-line helper to enable unpacking packet line data sent multiplexed using a sideband. Signed-off-by: Brandon Williams --- t/helper/test-pkt-line.c | 37 + 1 file changed, 37 insertions(+) diff --git

[PATCH 0/8] ref-in-want

2018-06-05 Thread Brandon Williams
This series adds the ref-in-want feature which was originally proposed by Jonathan Tan (https://public-inbox.org/git/cover.1485381677.git.jonathanta...@google.com/). Back when ref-in-want was first discussed it was decided that we should first solve the issue of moving to a new wire format and

[PATCH 2/8] upload-pack: implement ref-in-want

2018-06-05 Thread Brandon Williams
Currently, while performing packfile negotiation, clients are only allowed to specify their desired objects using object ids. This causes a vulnerability to failure when an object turns non-existent during negotiation, which may happen if, for example, the desired repository is provided by

[PATCH v7 2/2] json-writer: t0019: add Python unit test

2018-06-05 Thread git
From: Jeff Hostetler Test json-writer output using Python. Signed-off-by: Jeff Hostetler --- t/t0019-json-writer.sh | 38 ++ t/t0019/parse_json_1.py | 35 +++ 2 files changed, 73 insertions(+) create mode 100644

[PATCH v7 1/2] json_writer: new routines to create data in JSON format

2018-06-05 Thread git
From: Jeff Hostetler Add a series of jw_ routines and "struct json_writer" structure to compose JSON data. The resulting string data can then be output by commands wanting to support a JSON output format. The json-writer routines can be used to generate structured data in a JSON-like format.

[PATCH v7 0/2] json-writer V7

2018-06-05 Thread git
From: Jeff Hostetler Here is V7 of my json-writer patches. Please replace the existing V5/V6 version of jh/json-writer branch with this one. This version cleans up the die()-vs-BUG() issue that Duy mentioned recently. It also fixes a formatting bug when composing empty sub-objects/-arrays. It

Where is git checkout --orphan implemented at.

2018-06-05 Thread Sean Hunt
I would like to see the source code to git checkout --orphan so I can learn how it works and so I can manually do what it does by hand on making a new branch with no history in the refs folder. I can only do it on my iPhone as my laptop has no internet or way to do it there, and the program on

Re: [PATCH 4/6] unpack-tress: convert clear_ce_flags* to avoid the_index

2018-06-05 Thread Ramsay Jones
On 05/06/18 16:43, Nguyễn Thái Ngọc Duy wrote: > Prior to fba92be8f7, this code implicitly (and incorrectly) assumes > the_index when running the exclude machinery. fba92be8f7 helps show > this problem clearer because unpack-trees operation is supposed to > work on whatever index the caller

Re: [PATCH] refspec: initalize `refspec_item` in `valid_fetch_refspec()`

2018-06-05 Thread Brandon Williams
On 06/04, Ævar Arnfjörð Bjarmason wrote: > > On Mon, Jun 04 2018, Martin Ågren wrote: > > > We allocate a `struct refspec_item` on the stack without initializing > > it. In particular, its `dst` and `src` members will contain some random > > data from the stack. When we later call

Re: Where is git checkout --orphan implemented at.

2018-06-05 Thread Jeff King
On Tue, Jun 05, 2018 at 12:02:12PM -0400, Sean Hunt wrote: > I would like to see the source code to git checkout --orphan so I can > learn how it works and so I can manually do what it does by hand on > making a new branch with no history in the refs folder. I can only do > it on my iPhone as my

[PATCH 7/8] fetch-pack: put shallow info in output parameter

2018-06-05 Thread Brandon Williams
Expand the transport fetch method signature, by adding an output parameter, to allow transports to return information about the refs they have fetched. Then communicate shallow status information through this mechanism instead of by modifying the input list of refs. This does require clients to

[PATCH 8/8] fetch-pack: implement ref-in-want

2018-06-05 Thread Brandon Williams
Implement ref-in-want on the client side so that when a server supports the "ref-in-want" feature, a client will send "want-ref" lines for each reference the client wants to fetch. Signed-off-by: Brandon Williams --- fetch-pack.c | 35 +++---

[PATCH 5/8] fetch: refactor fetch_refs into two functions

2018-06-05 Thread Brandon Williams
Refactor the fetch_refs function into a function that does the fetching of refs and another function that stores them. Signed-off-by: Brandon Williams --- builtin/fetch.c | 19 +-- 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/builtin/fetch.c b/builtin/fetch.c

Re: [PATCH 6/6] Forbid "the_index" in dir.c and unpack-trees.c

2018-06-05 Thread Brandon Williams
On 06/05, Nguyễn Thái Ngọc Duy wrote: > Use of global variables like the_index makes it very hard to follow > the code flow, especially when it's buried deep in some minor helper > function. > > We are gradually avoiding global variables, this hopefully will make > it one step closer. The end

Re: [PATCH v4 00/21] Integrate commit-graph into 'fsck' and 'gc'

2018-06-05 Thread Derrick Stolee
On 6/5/2018 10:51 AM, Ævar Arnfjörð Bjarmason wrote: On Mon, Jun 4, 2018 at 6:52 PM, Derrick Stolee wrote: Thanks for the feedback on v3. There were several small cleanups, but perhaps the biggest change is the addition of "commit-graph: use string-list API for input" which makes

[PATCH 3/3] refspec: initalize `refspec_item` in `valid_fetch_refspec()`

2018-06-05 Thread Ævar Arnfjörð Bjarmason
From: Martin Ågren We allocate a `struct refspec_item` on the stack without initializing it. In particular, its `dst` and `src` members will contain some random data from the stack. When we later call `refspec_item_clear()`, it will call `free()` on those pointers. So if the call to

Re: [PATCH 0/3] refspec: refactor & fix free() behavior

2018-06-05 Thread Brandon Williams
On 06/05, Ævar Arnfjörð Bjarmason wrote: > Since Martin & Brandon both liked this direction I've fixed it > up. > > Martin: I didn't want to be the author of the actual fix for the bug > you found, so I rewrote your commit in 3/3. The diff is different, and > I slightly modified the 3rd paragraph

Re: [PATCH 0/3] refspec: refactor & fix free() behavior

2018-06-05 Thread Martin Ågren
On 5 June 2018 at 21:58, Brandon Williams wrote: > On 06/05, Ævar Arnfjörð Bjarmason wrote: >> Since Martin & Brandon both liked this direction I've fixed it >> up. >> >> Martin: I didn't want to be the author of the actual fix for the bug >> you found, so I rewrote your commit in 3/3. The diff

Re: [PATCH] docs: link to gitsubmodules

2018-06-05 Thread Ævar Arnfjörð Bjarmason
On Tue, Jun 05 2018, Brandon Williams wrote: > Add a link to gitsubmodules(7) under the `submodule.active` entry in > git-config(1). Did you mean to change either the subject or content of this patch? Your subject says gitsubmodules(7), but you link to git-submodule(1).

[PATCH v2 0/2] Fix protocol v2 tag following with CLI refspec

2018-06-05 Thread Jonathan Tan
> Test t5702-protocol-v2.sh doesn't pass with this patch. Good catch - I've fixed that. > This is difficult...Really I don't think the default should be to follow > tags. Mostly because this defeats the purpose of ref filtering when a > user only requests the master branch. Now instead of the

[PATCH v2 2/2] fetch: send "refs/tags/" prefix upon CLI refspecs

2018-06-05 Thread Jonathan Tan
When performing tag following, in addition to using the server's "include-tag" capability to send tag objects (and emulating it if the server does not support that capability), "git fetch" relies upon the presence of refs/tags/* entries in the initial ref advertisement to locally create refs

[PATCH v2 1/2] t5702: test fetch with multiple refspecs at a time

2018-06-05 Thread Jonathan Tan
Extend the protocol v2 tests to also test fetches with multiple refspecs specified. This also covers the previously uncovered cases of fetching with prefix matching and fetching by SHA-1. Signed-off-by: Jonathan Tan --- t/t5702-protocol-v2.sh | 47 ++ 1

Re: [PATCH 2/8] upload-pack: implement ref-in-want

2018-06-05 Thread Ævar Arnfjörð Bjarmason
On Tue, Jun 05 2018, Brandon Williams wrote: > +uploadpack.allowRefInWant:: > + If this option is set, `upload-pack` will support the `ref-in-want` > + feature of the protocol version 2 `fetch` command. > + I think it makes sense to elaborate a bit on what this is for. Having read this

Re: [PATCH] docs: link to gitsubmodules

2018-06-05 Thread Brandon Williams
On 06/05, Ævar Arnfjörð Bjarmason wrote: > > On Tue, Jun 05 2018, Brandon Williams wrote: > > > Add a link to gitsubmodules(7) under the `submodule.active` entry in > > git-config(1). > > Did you mean to change either the subject or content of this patch? Your > subject says gitsubmodules(7),

Re: [RFC PATCH 1/2] docs: reflect supported fetch options of git pull

2018-06-05 Thread Rafael Ascensão
On Tue, Jun 05, 2018 at 06:05:56PM +0200, Duy Nguyen wrote: > A better option may be making git-pull accept those options as well. I > see no reason git-pull should support options that git-fetch does (at > least most of them). I sent this as a RFC, mostly to discuss what is the correct path to

[PATCH 2/2] fetch: send "refs/tags/" prefix upon CLI refspecs

2018-06-05 Thread Jonathan Tan
When performing tag following, in addition to using the server's "include-tag" capability to send tag objects (and emulating it if the server does not support that capability), "git fetch" relies upon the presence of refs/tags/* entries in the initial ref advertisement to locally create refs

Re: [PATCH 2/8] upload-pack: implement ref-in-want

2018-06-05 Thread Ramsay Jones
On 05/06/18 18:51, Brandon Williams wrote: > Currently, while performing packfile negotiation, clients are only > allowed to specify their desired objects using object ids. This causes > a vulnerability to failure when an object turns non-existent during > negotiation, which may happen if, for

Re: [PATCHv1 1/3] git-p4: raise exceptions from p4CmdList based on error from p4 server

2018-06-05 Thread Eric Sunshine
On Tue, Jun 5, 2018 at 6:56 AM Luke Diamand wrote: > On 5 June 2018 at 10:54, Eric Sunshine wrote: > > On Tue, Jun 5, 2018 at 5:14 AM Luke Diamand wrote: > >> +m = re.search('Too many rows scanned \(over (\d+)\)', > >> data) > >> +if not m: > >> +

Re: [PATCH 2/2] fetch: send "refs/tags/" prefix upon CLI refspecs

2018-06-05 Thread Brandon Williams
On 06/05, Jonathan Tan wrote: > When performing tag following, in addition to using the server's > "include-tag" capability to send tag objects (and emulating it if the > server does not support that capability), "git fetch" relies upon the > presence of refs/tags/* entries in the initial ref

git question from a newbie

2018-06-05 Thread Heinz, Steve
Hi. I am new to Git and have read quite a few articles on it. I am planning on setting up a remote repository on a windows 2012 R2 server and will access it via HTTPS. I am setting up a local repository on my desk top (others in my group will do the same). On "server1": I install Git and

Re: [PATCHv1 1/1] git-p4: better error reporting when p4 fails

2018-06-05 Thread Eric Sunshine
On Tue, Jun 5, 2018 at 6:59 AM Luke Diamand wrote: > On 5 June 2018 at 11:49, Merland Romain wrote: > >> +# now check that we can actually talk to the server > >> +global p4_access_checked > >> +if not p4_access_checked: > >> +p4_access_checked = True > >> +

[PATCH] docs: link to gitsubmodules

2018-06-05 Thread Brandon Williams
Add a link to gitsubmodules(7) under the `submodule.active` entry in git-config(1). Signed-off-by: Brandon Williams --- Documentation/config.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Documentation/config.txt b/Documentation/config.txt index

[PATCH v2 00/10] rerere: handle nested conflicts

2018-06-05 Thread Thomas Gummerer
The previous round was at <20180520211210.1248-1-t.gumme...@gmail.com>. Thanks Junio for the comments on the previous round. Changes since v2: - lowercase the first letter in some error/warning messages before marking them for translation - wrap paths in output in single quotes, for

[PATCH v2 10/10] rerere: recalculate conflict ID when unresolved conflict is committed

2018-06-05 Thread Thomas Gummerer
Currently when a user doesn't resolve a conflict, commits the results, and does an operation which creates another conflict, rerere will use the ID of the previously unresolved conflict for the new conflict. This is because the conflict is kept in the MERGE_RR file, which 'rerere' reads every time

[PATCH v2 02/10] rerere: lowercase error messages

2018-06-05 Thread Thomas Gummerer
Documentation/CodingGuidelines mentions that error messages should be lowercase. Prior to marking them for translation follow that pattern in rerere as well. Signed-off-by: Thomas Gummerer --- rerere.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git

[PATCH v2 06/10] rerere: fix crash when conflict goes unresolved

2018-06-05 Thread Thomas Gummerer
Currently when a user doesn't resolve a conflict in a file, but commits the file with the conflict markers, and later the file ends up in a state in which rerere can't handle it, subsequent rerere operations that are interested in that path, such as 'rerere clear' or 'rerere forget ' will fail, or

[PATCH v2 09/10] rerere: teach rerere to handle nested conflicts

2018-06-05 Thread Thomas Gummerer
Currently rerere can't handle nested conflicts and will error out when it encounters such conflicts. Do that by recursively calling the 'handle_conflict' function to normalize the conflict. The conflict ID calculation here deserves some explanation: As we are using the same handle_conflict

[PATCH v2 04/10] rerere: mark strings for translation

2018-06-05 Thread Thomas Gummerer
'git rerere' is considered a plumbing command and as such its output should be translated. Its functionality is also only enabled through a config setting, so scripts really shouldn't rely on its output either way. Signed-off-by: Thomas Gummerer --- builtin/rerere.c | 4 +-- rerere.c

[PATCH v2 07/10] rerere: only return whether a path has conflicts or not

2018-06-05 Thread Thomas Gummerer
We currently return the exact number of conflict hunks a certain path has from the 'handle_paths' function. However all of its callers only care whether there are conflicts or not or if there is an error. Return only that information, and document that only that information is returned. This

[PATCH v2 08/10] rerere: factor out handle_conflict function

2018-06-05 Thread Thomas Gummerer
Factor out the handle_conflict function, which handles a single conflict in a path. This is a preparation for the next step, where this function will be re-used. No functional changes intended. Signed-off-by: Thomas Gummerer --- rerere.c | 143

[PATCH v2 03/10] rerere: wrap paths in output in sq

2018-06-05 Thread Thomas Gummerer
It looks like most paths in the output in the git codebase are wrapped in single quotes. Standardize on that in rerere as well. Apart from being more consistent, this also makes some of the strings match strings that are already translated in other parts of the codebase, thus reducing the work

[PATCH v2 05/10] rerere: add some documentation

2018-06-05 Thread Thomas Gummerer
Add some documentation for the logic behind the conflict normalization in rerere. Helped-by: Junio C Hamano Signed-off-by: Thomas Gummerer --- Documentation/technical/rerere.txt | 142 + rerere.c | 4 - 2 files changed, 142 insertions(+),

[PATCH v2 01/10] rerere: unify error messages when read_cache fails

2018-06-05 Thread Thomas Gummerer
We have multiple different variants of the error message we show to the user if 'read_cache' fails. The "Could not read index" variant we are using in 'rerere.c' is currently not used anywhere in translated form. As a subsequent commit will mark all output that comes from 'rerere.c' for

[PATCH 0/2] Fix protocol v2 tag following with CLI refspec

2018-06-05 Thread Jonathan Tan
After the events that led up to Jonathan Nieder's patch fixing fetch by SHA-1 in protocol v2 [1], while expanding protocol v2's test coverage, I found a bug with tag following. Patch 2 is a patch that fixes that bug (and patch 1 is a related but independent test that I had written beforehand).

[PATCH 1/2] t5702: test fetch with multiple refspecs at a time

2018-06-05 Thread Jonathan Tan
Extend the protocol v2 tests to also test fetches with multiple refspecs specified. This also covers the previously uncovered cases of fetching with prefix matching and fetching by SHA-1. Signed-off-by: Jonathan Tan --- t/t5702-protocol-v2.sh | 47 ++ 1

Re: [PATCH 2/2] fetch: send "refs/tags/" prefix upon CLI refspecs

2018-06-05 Thread Brandon Williams
On 06/05, Jonathan Tan wrote: > When performing tag following, in addition to using the server's > "include-tag" capability to send tag objects (and emulating it if the > server does not support that capability), "git fetch" relies upon the > presence of refs/tags/* entries in the initial ref

[PATCH 2/3] refspec: add back a refspec_item_init() function

2018-06-05 Thread Ævar Arnfjörð Bjarmason
Re-add the non-fatal version of refspec_item_init_or_die() renamed away in an earlier change to get a more minimal diff. This should be used by callers that have their own error handling. This new function could be marked "static" since nothing outside of refspec.c uses it, but expecting future

[PATCH 1/3] refspec: s/refspec_item_init/&_or_die/g

2018-06-05 Thread Ævar Arnfjörð Bjarmason
Rename the refspec_item_init() function introduced in 6d4c057859 ("refspec: introduce struct refspec", 2018-05-16) to refspec_item_init_or_die(). This follows the convention of other *_or_die() functions, and is done in preparation for making it a wrapper for a non-fatal variant. Signed-off-by:

[PATCH 0/3] refspec: refactor & fix free() behavior

2018-06-05 Thread Ævar Arnfjörð Bjarmason
Since Martin & Brandon both liked this direction I've fixed it up. Martin: I didn't want to be the author of the actual fix for the bug you found, so I rewrote your commit in 3/3. The diff is different, and I slightly modified the 3rd paragraph of the commit message & added my sign-off, but

Re: [PATCH] docs: link to gitsubmodules

2018-06-05 Thread Jonathan Nieder
Hi, Brandon Williams wrote: > Add a link to gitsubmodules(7) under the `submodule.active` entry in > git-config(1). > > Signed-off-by: Brandon Williams > --- > Documentation/config.txt | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/Documentation/config.txt

Re: [PATCH] docs: link to gitsubmodules

2018-06-05 Thread Brandon Williams
On 06/05, Jonathan Nieder wrote: > Jonathan Nieder wrote: > > > --- i/Documentation/config.txt > > +++ w/Documentation/config.txt > > @@ -3327,13 +3327,13 @@ submodule..ignore:: > > submodule..active:: > > Boolean value indicating if the submodule is of interest to git > > commands.

Re: [PATCH] docs: link to gitsubmodules

2018-06-05 Thread Jonathan Nieder
Jonathan Nieder wrote: > --- i/Documentation/config.txt > +++ w/Documentation/config.txt > @@ -3327,13 +3327,13 @@ submodule..ignore:: > submodule..active:: > Boolean value indicating if the submodule is of interest to git > commands. This config option takes precedence over the > -

Re: [PATCHv1 1/3] git-p4: raise exceptions from p4CmdList based on error from p4 server

2018-06-05 Thread Luke Diamand
On 5 June 2018 at 20:41, Eric Sunshine wrote: > On Tue, Jun 5, 2018 at 6:56 AM Luke Diamand wrote: >> On 5 June 2018 at 10:54, Eric Sunshine wrote: >> > On Tue, Jun 5, 2018 at 5:14 AM Luke Diamand wrote: >> >> +m = re.search('Too many rows scanned \(over >> >> (\d+)\)',

Re: git question from a newbie

2018-06-05 Thread Bryan Turner
On Tue, Jun 5, 2018 at 2:33 PM Heinz, Steve wrote: > > Hi. > > I am new to Git and have read quite a few articles on it. > I am planning on setting up a remote repository on a windows 2012 R2 server > and will access it via HTTPS. > I am setting up a local repository on my desk top (others in my

  1   2   >