Re: [PATCH] git-p4: Fix depot path stripping

2018-02-27 Thread Luke Diamand
On 27 February 2018 at 04:16, Nuno Subtil wrote: > When useClientSpec=true, stripping of P4 depot paths doesn't happen > correctly on sync. Modifies stripRepoPath to handle this case better. Can you give an example of how this shows up? I could quickly write a test case for

[PATCH] test case highlighting possible strategy to rebase merge

2018-02-27 Thread Jacob Keller
Add a test case highlighting how the process outlined by Sergey Organov could be used to re-create merges without losing any context. The test currently only uses new files, with the exception of one part involving an evil merge. Unfortunately I'm not sure how to represent merge conflicts that

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

2018-02-27 Thread Jonathan Tan
On Fri, 23 Feb 2018 13:33:15 -0800 Brandon Williams wrote: > On 02/21, Jonathan Tan wrote: > > As someone who is implementing the server side of protocol V2 in JGit, I > > now have a bit more insight into this :-) > > > > First of all, I used to not have a strong opinion on

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

2018-02-27 Thread Johannes Schindelin
Hi Jake, On Mon, 26 Feb 2018, Jacob Keller wrote: > On Mon, Feb 26, 2018 at 4:07 PM, Johannes Schindelin > wrote: > > > > On Tue, 20 Feb 2018, Igor Djordjevic wrote: > > > >> I`m really interested in this topic, which seems to (try to) address the > >> only "bad

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

2018-02-27 Thread Brandon Williams
On 02/26, Jonathan Nieder wrote: > Ævar Arnfjörð Bjarmason wrote: > > On Sat, Feb 24 2018, Jeff King jotted: > > >> I actually wonder if we should just specify that the patterns must > >> _always_ be fully-qualified, but may end with a single "/*" to iterate > >> over wildcards. Or even simpler,

Re: [PATCH v3 19/35] push: pass ref patterns when pushing

2018-02-27 Thread Stefan Beller
On Tue, Feb 6, 2018 at 5:12 PM, Brandon Williams wrote: > Construct a list of ref patterns to be passed to 'get_refs_list()' from > the refspec to be used during the push. This list of ref patterns will > be used to allow the server to filter the ref advertisement when >

Re: [PATCH v3 02/35] pkt-line: introduce struct packet_reader

2018-02-27 Thread Jonathan Nieder
Brandon Williams wrote: > On 02/12, Jonathan Nieder wrote: >>> --- a/pkt-line.h >>> +++ b/pkt-line.h >>> @@ -111,6 +111,64 @@ char *packet_read_line_buf(char **src_buf, size_t >>> *src_len, int *size); >>> */ >>> ssize_t read_packetized_to_strbuf(int fd_in, struct strbuf *sb_out); >>> >>>

Is offloading to GPU a worthwhile feature?

2018-02-27 Thread Konstantin Ryabitsev
Hi, all: This is an entirely idle pondering kind of question, but I wanted to ask. I recently discovered that some edge providers are starting to offer systems with GPU cards in them -- primarily for clients that need to provide streaming video content, I guess. As someone who needs to run a

Re: [PATCH 04/11] t3030-merge-recursive: don't check the stderr of a subshell

2018-02-27 Thread Junio C Hamano
SZEDER Gábor writes: > The two test checking 'git mmerge-recursive' in an empty worktree in > ... > GIT_INDEX_FILE="$PWD/ours-has-rename-index" && > export GIT_INDEX_FILE && > mkdir "$GIT_WORK_TREE" && > - git read-tree

Re: [PATCH 04/11] t3030-merge-recursive: don't check the stderr of a subshell

2018-02-27 Thread Junio C Hamano
Junio C Hamano writes: > SZEDER Gábor writes: > >> The two test checking 'git mmerge-recursive' in an empty worktree in >> ... >> GIT_INDEX_FILE="$PWD/ours-has-rename-index" && >> export GIT_INDEX_FILE && >> mkdir

[PATCH 0/5] roll back locks in various code paths

2018-02-27 Thread Martin Ågren
Patches 2-4 are the actual fixes where I teach some functions to always roll back the lock they're holding. Notably, these are all in "libgit". Patch 1 is a "while at it" to use locks on the stack instead of having them be static. Patch 5 removes code to roll back locks which are already rolled

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

2018-02-27 Thread Brandon Williams
On 02/27, Stefan Beller wrote: > > + > > + /* Add initial haves */ > > + ret = add_haves(_buf, in_vain); > > I like the shortness and conciseness of this send_fetch_request > function as it makes clear what is happening over the wire, however > I wonder if we can improve on that,

Re: [PATCH v2 3/4] sha1_file.c: move delayed getenv(altdb) back to setup_git_env()

2018-02-27 Thread Brandon Williams
On 02/27, Nguyễn Thái Ngọc Duy wrote: > getenv() is supposed to work on the main repository only. This delayed > getenv() code in sha1_file.c makes it more difficult to convert > sha1_file.c to a generic object store that could be used by both > submodule and main repositories. > > Move the

[PATCH] test_must_be_empty: make sure the file exists, not just empty

2018-02-27 Thread Junio C Hamano
The helper function test_must_be_empty is meant to make sure the given file is empty, but its implementation is: if test -s "$1" then ... not empty, we detected a failure ... fi Surely, the file having non-zero size is a sign that the condition "the file

Re: [PATCH v7 0/7] convert: add support for different encodings

2018-02-27 Thread Torsten Bögershausen
On Mon, Feb 26, 2018 at 03:46:35PM -0500, Jeff King wrote: > On Mon, Feb 26, 2018 at 06:35:33PM +0100, Torsten Bögershausen wrote: > > > > diff --git a/userdiff.c b/userdiff.c > > > index dbfb4e13cd..48fa7e8bdd 100644 > > > --- a/userdiff.c > > > +++ b/userdiff.c > > > @@ -161,6 +161,7 @@

[PATCH 5/5] sequencer: do not roll back lockfile unnecessarily

2018-02-27 Thread Martin Ågren
If `commit_lock_file()` or `hold_lock_file_for_update()` fail, there is no need to call `rollback_lock_file()` on the lockfile. It doesn't hurt either, but it does make different callers in this file inconsistent, which might be confusing. While at it, remove a trailing '.' from a recurring error

[PATCH 2/5] sequencer: always roll back lock in `do_recursive_merge()`

2018-02-27 Thread Martin Ågren
If we return early, we forget to roll back the lockfile. Do so. Signed-off-by: Martin Ågren --- sequencer.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sequencer.c b/sequencer.c index 90807c4559..e6bac4692a 100644 --- a/sequencer.c +++

[PATCH 1/5] sequencer: make lockfiles non-static

2018-02-27 Thread Martin Ågren
After 076aa2cbd (tempfile: auto-allocate tempfiles on heap, 2017-09-05), we can have lockfiles on the stack. One of these functions fails to always roll back the lock. That will be fixed in the next commit. Signed-off-by: Martin Ågren --- sequencer.c | 10 +- 1

[PATCH 4/5] merge: always roll back lock in `checkout_fast_forward()`

2018-02-27 Thread Martin Ågren
This function originated in builtin/merge.c. It was moved to merge.c in commit db699a8a1f (Move try_merge_command and checkout_fast_forward to libgit.a, 2012-10-26), but was used from sequencer.c even before that. If a problem occurs, the function returns without rolling back the lockfile. Teach

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

2018-02-27 Thread Brandon Williams
On 02/26, Jonathan Nieder wrote: > Hi, > > Brandon Williams wrote: > > > 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 > > --- > > Yay! > > [...]

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

2018-02-27 Thread Igor Djordjevic
Hi Dscho, On 27/02/2018 17:21, Johannes Schindelin wrote: > > Do you have any way to describe the idea in a simple, 3-5 lines long > paragraph? > > So far, I just know that it is some sort of confusing criss-cross > cherry-picking and merging and stuff, but nothing in those steps > shouts out

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

2018-02-27 Thread Brandon Williams
On 02/26, Jonathan Nieder wrote: > Brandon Williams wrote: > > static char *server_capabilities; > > +static struct argv_array server_capabilities_v2 = ARGV_ARRAY_INIT; > > Can a quick doc comment describe these and how they relate? > > Is only one of them set, based on which protocol version

Re: [PATCH v2 2/4] repository.c: delete dead functions

2018-02-27 Thread Brandon Williams
On 02/27, Nguyễn Thái Ngọc Duy wrote: > Signed-off-by: Nguyễn Thái Ngọc Duy These could technically be removed in the previous patch, it may make understanding what is happening in the previous patch a bit clearer too. > --- > repository.c | 45

Re: [PATCH v2 1/4] repository.c: move env-related setup code back to environment.c

2018-02-27 Thread Brandon Williams
On 02/27, Nguyễn Thái Ngọc Duy wrote: > It does not make sense that generic repository code contains handling > of environment variables, which are specific for the main repository > only. Refactor repo_set_gitdir() function to take $GIT_DIR and > optionally _all_ other customizable paths. These

Re: [PATCH] docs/pretty-formats: fix typo '% <()' -> '%<|()'

2018-02-27 Thread Jonathan Nieder
Mårten Kongstad wrote: > Remove erroneous space between % and < in '% <()'. > > Signed-off-by: Mårten Kongstad > --- > Documentation/pretty-formats.txt | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Looks correct to me. The space was introduced in

Re: [PATCH 04/11] t3030-merge-recursive: don't check the stderr of a subshell

2018-02-27 Thread Junio C Hamano
SZEDER Gábor writes: > + git read-tree -i -m $c3 2>actual-err && > + test_must_be_empty expected-err && > + git update-index --ignore-missing --refresh 2>>actual-err && > + test_must_be_empty expected-err && > +

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

2018-02-27 Thread Brandon Williams
On 02/27, Jonathan Tan wrote: > On Fri, 23 Feb 2018 13:33:15 -0800 > Brandon Williams wrote: > > > On 02/21, Jonathan Tan wrote: > > > As someone who is implementing the server side of protocol V2 in JGit, I > > > now have a bit more insight into this :-) > > > > > > First of

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

2018-02-27 Thread Jonathan Nieder
Brandon Williams wrote: > On 02/26, Jonathan Nieder wrote: >> Brandon Williams wrote: >>> +++ b/transport.c >>> @@ -230,12 +230,8 @@ static int fetch_refs_via_pack(struct transport >>> *transport, >>> args.cloning = transport->cloning; >>> args.update_shallow =

Re: What's cooking in git.git (Feb 2018, #03; Wed, 21)

2018-02-27 Thread Junio C Hamano
Johannes Schindelin writes: >> > Not quite. I have two more changes lined up. Let me send v4. >> >> Picked up and started looking at it. Thanks. > > FWIW v4's patches are identical to v5, but the interdiff as well as the > pushed tags are completely broken in v4

Re: [PATCH v2 0/4] Delete ignore_env member in struct repository

2018-02-27 Thread Stefan Beller
On Tue, Feb 27, 2018 at 1:58 AM, Nguyễn Thái Ngọc Duy wrote: > v2 fixes the incorrect use of consecutive getenv() and adds a comment > to clarify the role of old_gitdir > > Interdiff: > > diff --git a/environment.c b/environment.c > index 95de419de8..47c6e31559 100644 > ---

Re: [PATCH v3 22/35] upload-pack: support shallow requests

2018-02-27 Thread Jonathan Nieder
Hi, Brandon Williams wrote: > Add the 'shallow' feature to the protocol version 2 command 'fetch' > which indicates that the server supports shallow clients and deepen > requets. > > Signed-off-by: Brandon Williams > --- > Documentation/technical/protocol-v2.txt | 67

Re: [PATCH 2/2] t5556: replace test_i18ngrep with a simple grep

2018-02-27 Thread Junio C Hamano
Junio C Hamano writes: > Jeff King writes: > >> If I understand Gábor's patch correctly, it is using test_i18ngrep for >> the specific lines we care about so that we don't have to worry about >> other cruft lines that may or may not appear (including the hangup

Re: [PATCH v7 0/7] convert: add support for different encodings

2018-02-27 Thread Jeff King
On Tue, Feb 27, 2018 at 10:05:17PM +0100, Torsten Bögershausen wrote: > The other question is: > Would this help showing diffs of UTF-16 encoded files on a "git hoster", > github/bitbucket/ ? Almost. There's probably one more thing needed. We don't currently read in-tree .gitattributes when

Re: [PATCH 04/11] t3030-merge-recursive: don't check the stderr of a subshell

2018-02-27 Thread SZEDER Gábor
On Tue, Feb 27, 2018 at 10:10 PM, Junio C Hamano wrote: > Junio C Hamano writes: > >> SZEDER Gábor writes: >> >>> The two test checking 'git mmerge-recursive' in an empty worktree in >>> ... >>>

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

2018-02-27 Thread Junio C Hamano
Sergey Organov writes: > You've already bit this poor thingy to death. Please rather try your > teeth on the proposed Trivial Merge (TM) method. Whatever you do, do *NOT* call any part of your proposal "trivial merge", unless you are actually using the term to mean what Git

Re: [PATCH v3 02/35] pkt-line: introduce struct packet_reader

2018-02-27 Thread Brandon Williams
On 02/12, Jonathan Nieder wrote: > [...] > > --- a/pkt-line.h > > +++ b/pkt-line.h > > @@ -111,6 +111,64 @@ char *packet_read_line_buf(char **src_buf, size_t > > *src_len, int *size); > > */ > > ssize_t read_packetized_to_strbuf(int fd_in, struct strbuf *sb_out); > > > > +struct

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

2018-02-27 Thread Stefan Beller
On Tue, Feb 6, 2018 at 5:12 PM, Brandon Williams wrote: > When communicating with a v2 server, perform a fetch by requesting the > 'fetch' command. > > Signed-off-by: Brandon Williams > --- > builtin/fetch-pack.c | 2 +- > fetch-pack.c | 252

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

2018-02-27 Thread Brandon Williams
On 02/27, Jonathan Nieder wrote: > Brandon Williams wrote: > > On 02/26, Jonathan Nieder wrote: > >> Brandon Williams wrote: > > >>> +++ b/transport.c > >>> @@ -230,12 +230,8 @@ static int fetch_refs_via_pack(struct transport > >>> *transport, > >>> args.cloning = transport->cloning; > >>>

Re: [PATCH v5 11/13] commit-graph: read only from specific pack-indexes

2018-02-27 Thread Stefan Beller
> @@ -76,10 +77,18 @@ static int graph_read(int argc, const char **argv) > > static int graph_write(int argc, const char **argv) > { > + const char **pack_indexes = NULL; > + int packs_nr = 0; > + const char **lines = NULL; > + int lines_nr = 0; > + int lines_alloc

[PATCH v8 30/29] fixup! merge-recursive: apply necessary modifications for directory renames

2018-02-27 Thread Elijah Newren
Use is_null_oid() instead of is_null_sha1() --- This is just a fixup to patch 23/29 in my v8 series for detecting directory renames; should squash cleanly. merge-recursive.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/merge-recursive.c b/merge-recursive.c index

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

2018-02-27 Thread Brandon Williams
On 02/26, Jonathan Nieder wrote: > Brandon Williams wrote: > > > 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

Re: [PATCH v5 00/13] Serialized Git Commit Graph

2018-02-27 Thread Stefan Beller
On Mon, Feb 26, 2018 at 6:32 PM, Derrick Stolee wrote: > This patch series is another big difference from version 4, but I do > think we are converging on a stable design. > > This series depends on a few things in flight: > > * jt/binsearch-with-fanout for bsearch_graph() > > *

Re: [PATCH v3 22/35] upload-pack: support shallow requests

2018-02-27 Thread Brandon Williams
On 02/27, Jonathan Nieder wrote: I'll make the documentation changes you suggested. > > +deepen > > + Request that the fetch/clone should be shallow having a commit depth of > > nit: s/Request/Requests/, for consistency with the others? > > > +relative to the remote side. > > What

Re: What's cooking in git.git (Feb 2018, #03; Wed, 21)

2018-02-27 Thread Junio C Hamano
Elijah Newren writes: > patches. It's a trivial change and squashes cleanly, but if you're > merging this series to next, I'm curious whether I should submit this > change as a new patch on top of the series, if you'd prefer a full > re-roll of the whole series, or something

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

2018-02-27 Thread Igor Djordjevic
On 27/02/2018 19:55, Igor Djordjevic wrote: > > It would be more along the lines of "(1) rebase old merge commit parents, > (2) generate separate diff between old merge commit and each of its > parents, (3) apply each diff to their corresponding newly rebased > parent respectively (as a

Re: [PATCH v2 4/4] repository: delete ignore_env member

2018-02-27 Thread Brandon Williams
On 02/27, Nguyễn Thái Ngọc Duy wrote: > This variable was added because the repo_set_gitdir() was created to > cover both submodule and main repos, but these two are initialized a > bit differently so ignore_env == 0 means main repo, while ignore_env > != 0 is submodules. > > Since the difference

[PATCH] docs/pretty-formats: fix typo '% <()' -> '%<|()'

2018-02-27 Thread Mårten Kongstad
Remove erroneous space between % and < in '% <()'. Signed-off-by: Mårten Kongstad --- Documentation/pretty-formats.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/pretty-formats.txt b/Documentation/pretty-formats.txt index

[PATCH v2 2/4] repository.c: delete dead functions

2018-02-27 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- repository.c | 45 - 1 file changed, 45 deletions(-) diff --git a/repository.c b/repository.c index 343efe7282..7654b8ada9 100644 --- a/repository.c +++ b/repository.c @@ -16,51 +16,6 @@

[PATCH v2 3/4] sha1_file.c: move delayed getenv(altdb) back to setup_git_env()

2018-02-27 Thread Nguyễn Thái Ngọc Duy
getenv() is supposed to work on the main repository only. This delayed getenv() code in sha1_file.c makes it more difficult to convert sha1_file.c to a generic object store that could be used by both submodule and main repositories. Move the getenv() back in setup_git_env() where other env vars

[PATCH v2 4/4] repository: delete ignore_env member

2018-02-27 Thread Nguyễn Thái Ngọc Duy
This variable was added because the repo_set_gitdir() was created to cover both submodule and main repos, but these two are initialized a bit differently so ignore_env == 0 means main repo, while ignore_env != 0 is submodules. Since the difference part (env variables) has been moved out of

Re: [PATCH 1/4] repository.c: move env-related setup code back to environment.c

2018-02-27 Thread Duy Nguyen
On Tue, Feb 27, 2018 at 1:57 AM, Eric Sunshine wrote: > Can: > > char *old_gitdir = repo->gitdir; > repo->gitdir = xstrdup(...); > free(old_gitdir); > > be simplified to: > > free(repo->gitdir); > repo->gitdir = xstrdup(...); > > ? No because I think

[PATCH v2 0/4] Delete ignore_env member in struct repository

2018-02-27 Thread Nguyễn Thái Ngọc Duy
v2 fixes the incorrect use of consecutive getenv() and adds a comment to clarify the role of old_gitdir Interdiff: diff --git a/environment.c b/environment.c index 95de419de8..47c6e31559 100644 --- a/environment.c +++ b/environment.c @@ -14,6 +14,7 @@ #include "fmt-merge-msg.h" #include

[PATCH v2 1/4] repository.c: move env-related setup code back to environment.c

2018-02-27 Thread Nguyễn Thái Ngọc Duy
It does not make sense that generic repository code contains handling of environment variables, which are specific for the main repository only. Refactor repo_set_gitdir() function to take $GIT_DIR and optionally _all_ other customizable paths. These optional paths can be NULL and will be

Re:

2018-02-27 Thread René Scharfe
Am 27.02.2018 um 02:18 schrieb Alan Gage: > Hello, I recently noticed a bug involving GitBash and Python. I was > running a function that would post the system time once every second > using a while loop but the text was only sent after the while loop > ended due to a timer I had set.

Re: [PATCH 1/4] repository.c: move env-related setup code back to environment.c

2018-02-27 Thread Duy Nguyen
On Tue, Feb 27, 2018 at 1:57 AM, Eric Sunshine wrote: >> + repo_set_commondir(repo, o->shared_root); > > The repo_set_gitdir() prototype (below) makes it seem as if the last > argument ('o', in this case) is optional, presumably by passing in > NULL, however, this

Re: [PATCH v2 0/4] Delete ignore_env member in struct repository

2018-02-27 Thread Eric Sunshine
On Tue, Feb 27, 2018 at 4:58 AM, Nguyễn Thái Ngọc Duy wrote: > v2 fixes the incorrect use of consecutive getenv() and adds a comment > to clarify the role of old_gitdir > > diff --git a/environment.c b/environment.c > @@ -148,18 +149,34 @@ static char *expand_namespace(const

Re: What's cooking in git.git (Feb 2018, #03; Wed, 21)

2018-02-27 Thread Jeff Hostetler
On 2/21/2018 7:31 PM, Junio C Hamano wrote: * jh/status-no-ahead-behind (2018-01-24) 4 commits - status: support --no-ahead-behind in long format - status: update short status to respect --no-ahead-behind - status: add --[no-]ahead-behind to status and commit for V2 format. -

[PATCH v3 8/9] add -p: fix counting when splitting and coalescing

2018-02-27 Thread Phillip Wood
From: Phillip Wood When a file has no trailing new line at the end diff records this by appending "\ No newline at end of file" below the last line of the file. This line should not be counted in the hunk header. Fix the splitting and coalescing code to count files

[PATCH v3 2/9] t3701: indent here documents

2018-02-27 Thread Phillip Wood
From: Phillip Wood Indent here documents in line with the current style for tests. Signed-off-by: Phillip Wood --- t/t3701-add-interactive.sh | 174 ++--- 1 file changed, 87 insertions(+), 87

[PATCH v3 3/9] t3701: use test_write_lines and write_script

2018-02-27 Thread Phillip Wood
From: Phillip Wood Simplify things slightly by using the above helpers. Signed-off-by: Phillip Wood --- Notes: changes since v2 - fixed use of test_set_editor to match what was in pu t/t3701-add-interactive.sh | 33

[PATCH v3 4/9] t3701: don't hard code sha1 hash values

2018-02-27 Thread Phillip Wood
From: Phillip Wood Use a filter when comparing diffs to fix the value of non-zero hashes in diff index lines so we're not hard coding sha1 hash values in the expected output. This makes it easier to change the expected output if a test is edited as we don't need to

[PATCH v3 0/9] Correct offsets of hunks when one is skipped

2018-02-27 Thread Phillip Wood
From: Phillip Wood I've fixed the use of test_set_editor most of which was already in pu and reworked the sha1 comparisons to rewrite the hashes in the index lines rather than deleting the index lines. Cover letter to v1: While working on a patch series to stage

[PATCH v3 9/9] add -p: don't rely on apply's '--recount' option

2018-02-27 Thread Phillip Wood
From: Phillip Wood Now that add -p counts patches properly it should be possible to turn off the '--recount' option when invoking 'git apply' Signed-off-by: Phillip Wood --- Notes: I can't think of a reason why this shouldn't be OK

[PATCH v3 6/9] add -p: Adjust offsets of subsequent hunks when one is skipped

2018-02-27 Thread Phillip Wood
From: Phillip Wood Since commit 8cbd431082 ("git-add--interactive: replace hunk recounting with apply --recount", 2008-7-2) if a hunk is skipped then we rely on the context lines to apply subsequent hunks in the right place. While this works most of the time it is

[PATCH v3 5/9] t3701: add failing test for pathological context lines

2018-02-27 Thread Phillip Wood
From: Phillip Wood When a hunk is skipped by add -i the offsets of subsequent hunks are not adjusted to account for any missing insertions due to the skipped hunk. Most of the time this does not matter as apply uses the context lines to apply the subsequent hunks in

[PATCH v3 7/9] add -p: calculate offset delta for edited patches

2018-02-27 Thread Phillip Wood
From: Phillip Wood Recount the number of preimage and postimage lines in a hunk after it has been edited so any change in the number of insertions or deletions can be used to adjust the offsets of subsequent hunks. If an edited hunk is subsequently split then the

[PATCH v3 1/9] add -i: add function to format hunk header

2018-02-27 Thread Phillip Wood
From: Phillip Wood This code is duplicated in a couple of places so make it into a function as we're going to add some more callers shortly. Signed-off-by: Phillip Wood --- git-add--interactive.perl | 21 +++-- 1 file

Re: [PATCH] git-p4: Fix depot path stripping

2018-02-27 Thread Luke Diamand
On 27 February 2018 at 08:43, Nuno Subtil wrote: > The issue is that passing in --use-client-spec will always cause git-p4 to > preserve the full depot path in the working tree that it creates, even when > --keep-path is not used. > > The repro case is fairly simple: cloning a

[PATCH v2] sha1_name: fix uninitialized memory errors

2018-02-27 Thread Derrick Stolee
Peff made an excellent point about the nested if statements. This goes back to Christian's original recommendation. -- >8 -- During abbreviation checks, we navigate to the position within a pack-index that an OID would be inserted and check surrounding OIDs for the maximum matching prefix. This

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

2018-02-27 Thread Sergey Organov
Hi Johannes, Johannes Schindelin writes: > Hi Buga, > > On Tue, 20 Feb 2018, Igor Djordjevic wrote: > >> I`m really interested in this topic, which seems to (try to) address the >> only "bad feeling" I had with rebasing merges - being afraid of silently >> losing

Re: [PATCH v8 5/7] convert: add 'working-tree-encoding' attribute

2018-02-27 Thread Lars Schneider
> On 25 Feb 2018, at 08:15, Eric Sunshine wrote: > > On Sat, Feb 24, 2018 at 11:27 AM, wrote: >> Git recognizes files encoded with ASCII or one of its supersets (e.g. >> UTF-8 or ISO-8859-1) as text files. All other encodings are usually

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

2018-02-27 Thread Sergey Organov
Jacob Keller writes: > On Tue, Feb 27, 2018 at 10:14 AM, Junio C Hamano wrote: >> Sergey Organov writes: >> >>> You've already bit this poor thingy to death. Please rather try your >>> teeth on the proposed Trivial Merge (TM)

Re: [PATCH 0/5] roll back locks in various code paths

2018-02-27 Thread Jeff King
On Tue, Feb 27, 2018 at 10:30:08PM +0100, Martin Ågren wrote: > Patches 2-4 are the actual fixes where I teach some functions to always > roll back the lock they're holding. Notably, these are all in "libgit". > > Patch 1 is a "while at it" to use locks on the stack instead of having > them be

Re: [PATCH] test_must_be_empty: make sure the file exists, not just empty

2018-02-27 Thread Jeff King
On Tue, Feb 27, 2018 at 01:27:29PM -0800, Junio C Hamano wrote: > The helper function test_must_be_empty is meant to make sure the > given file is empty, but its implementation is: > > if test -s "$1" > then > ... not empty, we detected a failure ... > fi > >

Re: Is offloading to GPU a worthwhile feature?

2018-02-27 Thread Stefan Beller
On Tue, Feb 27, 2018 at 12:52 PM, Konstantin Ryabitsev wrote: > compression offload Currently there is a series under review that introduces a commit graph file[1], which would allow to not need decompressing objects for a rev walk, but have the walking

Re: [PATCH 2/5] sequencer: always roll back lock in `do_recursive_merge()`

2018-02-27 Thread Jeff King
On Tue, Feb 27, 2018 at 11:08:12PM +0100, Martin Ågren wrote: > > So I think it's correct as-is, but I wonder if writing it as: > > > > if (!active_cache_changed) > > rollback_lock_file(_lock); > > else if (write_locked_index(_index, _lock, COMMIT_LOCK)) > > return error(...);

Re: [PATCH v3 26/35] transport-helper: remove name parameter

2018-02-27 Thread Jonathan Nieder
Brandon Williams wrote: > 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

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

2018-02-27 Thread Johannes Schindelin
Hi Buga, thank you for making this a lot more understandable to this thick developer. On Tue, 27 Feb 2018, Igor Djordjevic wrote: > On 27/02/2018 19:55, Igor Djordjevic wrote: > > > > It would be more along the lines of "(1) rebase old merge commit parents, > > (2) generate separate diff

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

2018-02-27 Thread Jacob Keller
On Tue, Feb 27, 2018 at 3:40 PM, Igor Djordjevic wrote: > On 27/02/2018 20:59, Igor Djordjevic wrote: >> >> (3) ---X1---o---o---o---o---o---X2 >>|\ |\ >>| A1---A2---A3---U1 | A1'--A2'--A3'--U1' >>| \

Re: [Problem] test_must_fail makes possibly questionable assumptions about exit_code.

2018-02-27 Thread Eric Wong
Jeff King wrote: > On Wed, Feb 28, 2018 at 04:07:18AM +, Eric Wong wrote: > > > > In the rest of git, die() makes a command exit with status 128. The > > > trouble here is that our code in Perl is assuming the same meaning for > > > die() but using perl's die builtin instead.

Darlehen

2018-02-27 Thread Scotwest Credit Union Limited
Gre an Dich, GELD VERFGBAR ZU VERLEIHEN. Holen Sie sich das Geld / Darlehen, das Sie bei Scotwest Credit Union Limited bentigen. Wir sind private Kreditgeber / Investoren und bieten sowohl Privatdarlehen, Startdarlehen, Bildungs- / Agrarkredit, Immobilien- / Baudarlehen, Immobilienkredit,

Re: [Problem] test_must_fail makes possibly questionable assumptions about exit_code.

2018-02-27 Thread Jeff King
On Wed, Feb 28, 2018 at 07:42:51AM +, Eric Wong wrote: > > > > a) We could override the meaning of die() in Git.pm. This feels > > > > ugly but if it works, it would be a very small patch. > > > > > > Unlikely to work since I think we use eval {} to trap exceptions > > > from die. > >

Re: [PATCH 2/5] sequencer: always roll back lock in `do_recursive_merge()`

2018-02-27 Thread Jeff King
On Tue, Feb 27, 2018 at 10:30:10PM +0100, Martin Ågren wrote: > diff --git a/sequencer.c b/sequencer.c > index 90807c4559..e6bac4692a 100644 > --- a/sequencer.c > +++ b/sequencer.c > @@ -465,8 +465,10 @@ static int do_recursive_merge(struct commit *base, > struct commit *next, >

Re: [PATCH v7 0/7] convert: add support for different encodings

2018-02-27 Thread Junio C Hamano
Jeff King writes: > Of the three solutions, I think the relative merits are something like > this: > ... > 3. w-t-e (Lars's patch) I thought Lars's w-t-e was about keeping the in-repo contents in UTF-8 and externalize in whatever encoding (e.g. UTF-16), so it won't help the

Re: [PATCH v7 0/7] convert: add support for different encodings

2018-02-27 Thread Junio C Hamano
Jeff King writes: > On Tue, Feb 27, 2018 at 01:55:02PM -0800, Junio C Hamano wrote: > >> Jeff King writes: >> >> > Of the three solutions, I think the relative merits are something like >> > this: >> > ... >> > 3. w-t-e (Lars's patch) >> >> I thought Lars's

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

2018-02-27 Thread Eric Sunshine
On Tue, Feb 27, 2018 at 5:04 PM, Jeff King wrote: > On Tue, Feb 27, 2018 at 01:58:00PM -0800, Junio C Hamano wrote: >> So are we looking for a natural name to call an array of trings? I >> personally do not mind argv_array too much, but perhaps we can call >> it a string_array and

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

2018-02-27 Thread Jeff King
On Tue, Feb 27, 2018 at 05:10:09PM -0500, Eric Sunshine wrote: > > That would be fine with me. Though I would love it if we could find a > > shorter name for the associated functions. For example, > > argv_array_pushf() can make lines quite long, and something like > > argv_pushf() is easier to

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

2018-02-27 Thread Jonathan Nieder
Hi, Brandon Williams wrote: > 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,

[PATCH] protocol: treat unrecognized protocol.version setting as 0

2018-02-27 Thread Jonathan Nieder
If I share my .gitconfig or .git/config file between multiple machines (or between multiple Git versions on a single machine) and set [protocol] version = 2 then running "git fetch" with a Git version that does not support protocol v2 errors out with fatal:

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

2018-02-27 Thread Junio C Hamano
Jonathan Nieder writes: > Jonathan Tan wrote: >> On Thu, 22 Feb 2018 13:26:58 -0500 >> Jeff King wrote: > >>> I agree that it shouldn't matter much here. But if the name argv_array >>> is standing in the way of using it, I think we should consider giving it

Re: [PATCH v3 2/9] t3701: indent here documents

2018-02-27 Thread Junio C Hamano
Phillip Wood writes: > From: Phillip Wood > > Indent here documents in line with the current style for tests. > > Signed-off-by: Phillip Wood > --- This loses the hand-edit-while-queuing done based on Eric's

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

2018-02-27 Thread Junio C Hamano
Jeff King writes: >> struct strs {...}; >> >> void strs_init(struct strs *); >> void strs_push(struct strs *, const char *); >> void strs_pushf(struct strs *, const char *fmt, ...); >> void strs_pushl(struct strs *, ...); >> void strs_pushv(struct strs *, const char **); >> void

Re: [PATCH 04/11] t3030-merge-recursive: don't check the stderr of a subshell

2018-02-27 Thread SZEDER Gábor
On Tue, Feb 27, 2018 at 10:17 PM, Junio C Hamano wrote: > SZEDER Gábor writes: > >> + git read-tree -i -m $c3 2>actual-err && >> + test_must_be_empty expected-err && >> + git update-index --ignore-missing --refresh

Re: [PATCH 2/5] sequencer: always roll back lock in `do_recursive_merge()`

2018-02-27 Thread Martin Ågren
On 27 February 2018 at 22:44, Jeff King wrote: > I want to note one thing that confused me while reviewing. While looking > to see if there were other returns, I noticed that the lines right near > the end of your context are funny: > > if (active_cache_changed && >

Re: [PATCH v2] sha1_name: fix uninitialized memory errors

2018-02-27 Thread Jeff King
On Tue, Feb 27, 2018 at 02:30:39PM -0800, Junio C Hamano wrote: > -- >8 -- > From: Derrick Stolee > Date: Tue, 27 Feb 2018 06:47:04 -0500 > Subject: [PATCH] sha1_name: fix uninitialized memory errors > > During abbreviation checks, we navigate to the position within a >

Re: [PATCH v5 0/2] diff: add --compact-summary (aka nd/diff-stat-with-summary)

2018-02-27 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > ... and v5 fixes the commit message of 2/2 where in v4 it still > mentions --stat-with-summary instead of --compact-summary. Sorry. > > Nguyễn Thái Ngọc Duy (2): > diff.c: refactor pprint_rename() to use strbuf > diff: add --compact-summary

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

2018-02-27 Thread Jacob Keller
On Tue, Feb 27, 2018 at 8:21 AM, Johannes Schindelin wrote: > Hi Jake, > > On Mon, 26 Feb 2018, Jacob Keller wrote: > >> On Mon, Feb 26, 2018 at 4:07 PM, Johannes Schindelin >> wrote: >> > >> > On Tue, 20 Feb 2018, Igor Djordjevic wrote: >>

Re: [PATCH 2/2] t5556: replace test_i18ngrep with a simple grep

2018-02-27 Thread SZEDER Gábor
On Wed, Feb 28, 2018 at 12:47 AM, Ramsay Jones wrote: > > > On 27/02/18 22:05, Junio C Hamano wrote: >> Junio C Hamano writes: >> >>> OK, somehow I had the version from Ramsay on a topic branch that was >>> not merged to 'pu'. Here is the

[PATCH] hooks/pre-auto-gc-battery: allow gc to run on non-laptops

2018-02-27 Thread Adam Borowski
Desktops and servers tend to have no power sensor, thus on_ac_power returns 255 ("unknown"). If that tool returns "unknown", there's no point in querying other sources as it already queried them, and is smarter than us (can handle multiple adapters). Reported by: Xin Li

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

2018-02-27 Thread Sergey Organov
Junio C Hamano writes: > Sergey Organov writes: > >> You've already bit this poor thingy to death. Please rather try your >> teeth on the proposed Trivial Merge (TM) method. > > Whatever you do, do *NOT* call any part of your proposal "trivial > merge",

  1   2   >