Re: [PATCH] doc: fix a typo and clarify a sentence

2018-10-04 Thread Junio C Hamano
Mihir Mehta writes: > diff --git a/Documentation/git-diff.txt b/Documentation/git-diff.txt > index b180f1fa5..6173f569e 100644 > --- a/Documentation/git-diff.txt > +++ b/Documentation/git-diff.txt > @@ -72,8 +72,9 @@ two blob objects, or changes between two files on disk. > This form is to

Re: [PATCH v3 0/6] Fix the racy split index problem

2018-10-04 Thread Junio C Hamano
SZEDER Gábor writes: > On Fri, Sep 28, 2018 at 06:24:53PM +0200, SZEDER Gábor wrote: >> Interdiff: >> diff --git a/t/t1700-split-index.sh b/t/t1700-split-index.sh >> index c8acbc50d0..f053bf83eb 100755 >> --- a/t/t1700-split-index.sh >> +++ b/t/t1700-split-index.sh >> @@ -6,6 +6,9 @@ test_descrip

Re: [PATCH v4 1/7] t/README: reformat Do, Don't, Keep in mind lists

2018-10-04 Thread Junio C Hamano
Matthew DeVore writes: > diff --git a/t/README b/t/README > index 9028b47d9..85024aba6 100644 > --- a/t/README > +++ b/t/README > @@ -393,13 +393,13 @@ This test harness library does the following things: > consistently when command line arguments --verbose (or -v), > --debug (or -d), and

Re: [PATCH v2] gpg-interface.c: detect and reject multiple signatures on commits

2018-10-04 Thread Junio C Hamano
Michał Górny writes: > On Fri, 2018-08-17 at 09:34 +0200, Michał Górny wrote: >> GnuPG supports creating signatures consisting of multiple signature >> packets. If such a signature is verified, it outputs all the status >> messages for each signature separately. However, git currently does not

Re: We should add a "git gc --auto" after "git clone" due to commit graph

2018-10-04 Thread Junio C Hamano
SZEDER Gábor writes: >> git-gc - Cleanup unnecessary files and optimize the local repository >> >> Creating these indexes like the commit-graph falls under "optimize the >> local repository", > > But it doesn't fall under "cleanup unnecessary files", which the > commit-graph file is, since,

Re: [PATCH v3] coccicheck: process every source file at once

2018-10-04 Thread Jacob Keller
On Tue, Oct 2, 2018 at 1:18 PM Jacob Keller wrote: > > On Tue, Oct 2, 2018 at 1:07 PM Jacob Keller wrote: > > > > From: Jacob Keller > > > > make coccicheck is used in order to apply coccinelle semantic patches, > > and see if any of the transformations found within contrib/coccinelle/ > > can b

Info

2018-10-04 Thread SYARIKAT MISTI JAYA SDN BHD
Let's work together to execute this Business ,contact ( dongeh...@hotmail.com) for more details

Re: [PATCH 1/1] protocol: limit max protocol version per service

2018-10-04 Thread Josh Steadmon
On 2018.10.03 15:47, Stefan Beller wrote: > On Wed, Oct 3, 2018 at 2:34 PM Josh Steadmon wrote: > > > > Is there a method or design for advertising multiple acceptable versions > > from the client? > > I think the client can send multiple versions, looking through protocol.c > (and not the docume

Re: [PATCH v3 2/5] fetch-pack: load tip_oids eagerly iff needed

2018-10-04 Thread Jeff King
On Thu, Oct 04, 2018 at 03:52:05PM -0700, Jonathan Tan wrote: > > Or I am even OK with leaving the existing tablesize > > check. It is a little intimate with the implementation details, but I > > suspect that if oidset were to change (e.g., to initialize the buckets > > immediately), the problem w

[RFC PATCH 2/2] fuzz: Add fuzz testing for packfile indices.

2018-10-04 Thread Josh Steadmon
Signed-off-by: Josh Steadmon --- .gitignore | 1 + Makefile| 5 - fuzz-pack-idx.c | 13 + packfile.c | 44 +--- packfile.h | 13 + 5 files changed, 56 insertions(+), 20 deletions(-) create mode 100644 fu

[RFC PATCH 0/2] add fuzzing targets for use with LLVM libFuzzer

2018-10-04 Thread Josh Steadmon
libFuzzer[1] is a fuzzing engine included in recent versions of LLVM. It is used by OSS-Fuzz[2] for continuous fuzzing of OSS projects. This series adds two basic fuzzing targets covering packfile header and index code. It is not particularly portable, and requires the use of LLVM v4.0 (the latest

[RFC PATCH 1/2] fuzz: Add basic fuzz testing target.

2018-10-04 Thread Josh Steadmon
Signed-off-by: Josh Steadmon --- .gitignore | 2 ++ Makefile| 30 +- fuzz-pack-headers.c | 14 ++ 3 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 fuzz-pack-headers.c diff --git a/.gitignore b/.gitignore index 9d13

Re: [PATCH 15/16] commit-reach: make can_all_from_reach... linear

2018-10-04 Thread René Scharfe
Am 01.10.2018 um 22:37 schrieb René Scharfe: > Am 01.10.2018 um 21:26 schrieb Derrick Stolee: >> On 10/1/2018 3:16 PM, René Scharfe wrote: >>> Am 28.06.2018 um 14:31 schrieb Derrick Stolee via GitGitGadget: diff --git a/commit-reach.c b/commit-reach.c index c58e50fbb..ac132c8e4 100644 >>>

Re: [PATCH v3 2/5] fetch-pack: load tip_oids eagerly iff needed

2018-10-04 Thread Jonathan Tan
> Yes, I agree with you that the loops are still entwined. They're at > least now in a single function, though, which IMHO is a slight > improvement. Hmm...originally, the main functionality was in a single loop in a single function. But I say that because I consider the lazy loading in tip_oids_c

Re: [PATCH v2] gpg-interface.c: detect and reject multiple signatures on commits

2018-10-04 Thread Tacitus Aedifex
I think that there is a more simple way to catch multiple signatures see below. Other than that, I like this patch. Signed-off-by: Tacitus Aedifex --- gpg-interface.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/gpg-interface.c b/gpg-interface.c index db17d65f8..a4dba

Re: [PATCH v3 0/5] oidset: use khash

2018-10-04 Thread Jeff King
On Thu, Oct 04, 2018 at 05:05:37PM +0200, René Scharfe wrote: > Two new patches to avoid using oidset internals in fetch-pack: > > fetch-pack: factor out is_unmatched_ref() > fetch-pack: load tip_oids eagerly iff needed > > Unchanged patch: > > khash: factor out kh_release_* > > Unchange

Re: [PATCH v3 2/5] fetch-pack: load tip_oids eagerly iff needed

2018-10-04 Thread Jeff King
On Thu, Oct 04, 2018 at 02:38:13PM -0700, Jonathan Tan wrote: > > - if ((allow_unadvertised_object_request & > > -(ALLOW_TIP_SHA1 | ALLOW_REACHABLE_SHA1)) || > > - tip_oids_contain(&tip_oids, unmatched, newlist, > > -&ref->old

Re: [PATCH v3 2/5] fetch-pack: load tip_oids eagerly iff needed

2018-10-04 Thread René Scharfe
Am 04.10.2018 um 23:38 schrieb Jonathan Tan: >> Determine if the oidset needs to be populated upfront and then do that >> instead. This duplicates a loop, but simplifies the existing one by >> separating concerns between the two. > > [snip] > >> +if (strict) { >> +for (i = 0; i <

Re: [PATCH v3 2/5] fetch-pack: load tip_oids eagerly iff needed

2018-10-04 Thread Jeff King
On Thu, Oct 04, 2018 at 05:09:39PM +0200, René Scharfe wrote: > tip_oids_contain() lazily loads refs into an oidset at its first call. > It abuses the internal (sub)member .map.tablesize of that oidset to > check if it has done that already. > > Determine if the oidset needs to be populated upfro

Re: [BUG] Error while trying to git apply a patch; works with patch -p1

2018-10-04 Thread SZEDER Gábor
On Thu, Oct 04, 2018 at 06:01:11PM -0300, Eneas Queiroz wrote: > I've sent this to the list 2 days ago, but I can't find it in the list > archives, so I'm sending it again without files attached. I apologize > if this is a duplicate. One should be able to reproduce this with the > current PR files

[RFC PATCH] We should add a "git gc --auto" after "git clone" due to commit graph

2018-10-04 Thread Ævar Arnfjörð Bjarmason
On Wed, Oct 03 2018, Ævar Arnfjörð Bjarmason wrote: > Don't have time to patch this now, but thought I'd send a note / RFC > about this. > > Now that we have the commit graph it's nice to be able to set > e.g. core.commitGraph=true & gc.writeCommitGraph=true in ~/.gitconfig or > /etc/gitconfig t

Re: [PATCH v3 2/5] fetch-pack: load tip_oids eagerly iff needed

2018-10-04 Thread Jonathan Tan
> Determine if the oidset needs to be populated upfront and then do that > instead. This duplicates a loop, but simplifies the existing one by > separating concerns between the two. [snip] > + if (strict) { > + for (i = 0; i < nr_sought; i++) { > + ref = sough

[BUG] Error while trying to git apply a patch; works with patch -p1

2018-10-04 Thread Eneas Queiroz
I've sent this to the list 2 days ago, but I can't find it in the list archives, so I'm sending it again without files attached. I apologize if this is a duplicate. One should be able to reproduce this with the current PR files, but if not, I can provide them. I've hit a strange error while tryin

Re: [PATCH v2 5/5] diff --color-moved: fix a memory leak

2018-10-04 Thread Stefan Beller
On Thu, Oct 4, 2018 at 3:07 AM Phillip Wood wrote: > > From: Phillip Wood > > Free the hashmap items as well as the hashmap itself. This was found > with asan. > > Signed-off-by: Phillip Wood Thanks for this series, all 5 patches are Reviewed-by: Stefan Beller

Re: [PATCH] [Outreachy] git/userdiff.c fix regex pattern error

2018-10-04 Thread Johannes Schindelin
Hi Ananya, On Thu, 4 Oct 2018, Ananya Krishna Maram wrote: > On Thu, 4 Oct 2018 at 20:56, Johannes Schindelin > wrote: > > > > [... talking about the reason why a slash does not need to be escaped > > in a C string specifying a regular expression...] > > > > But it does not need to be escaped, w

Re: Git Evolve

2018-10-04 Thread Stefan Xenos
Gerrit uses notes and branches of meta-commits internally for its database, but it still uses the change-id footers to associate an uploaded commit with a change within its database. On Thu, Oct 4, 2018 at 9:05 AM, Jakub Narebski wrote: > Junio C Hamano writes: >> Stefan Xenos writes: >> >>> Wh

Re: [PATCH] [Outreachy] git/userdiff.c fix regex pattern error

2018-10-04 Thread Ananya Krishna Maram
On Thu, 4 Oct 2018 at 20:56, Johannes Schindelin wrote: > > Hi Ananya, > > On Thu, 4 Oct 2018, Ananya Krishna Maram wrote: > > > On Thu, 4 Oct 2018 at 19:56, Johannes Schindelin > > wrote: > > > > > > Hi Ananya, > > > > > > thank you for taking the time to write this patch! > > > > > > On Thu, 4

Re: Git Evolve

2018-10-04 Thread Jakub Narebski
Junio C Hamano writes: > Stefan Xenos writes: > >> What is the evolve command? >> ... >> - Systems like gerrit would no longer need to rely on "change-id" tags >> in commit comments to associate commits with the change that they >> edit, since git itself would have that information. >> ... >> Is

Re: [PATCH] [Outreachy] git/userdiff.c fix regex pattern error

2018-10-04 Thread Johannes Schindelin
Hi Ananya, On Thu, 4 Oct 2018, Ananya Krishna Maram wrote: > On Thu, 4 Oct 2018 at 19:56, Johannes Schindelin > wrote: > > > > Hi Ananya, > > > > thank you for taking the time to write this patch! > > > > On Thu, 4 Oct 2018, Ananya Krishna Maram wrote: > > > > > the forward slash character shoul

[PATCH 5/5] oidset: uninline oidset_init()

2018-10-04 Thread René Scharfe
There is no need to inline oidset_init(), as it's typically only called twice in the lifetime of an oidset (once at the beginning and at the end by oidset_clear()) and kh_resize_* is quite big, so move its definition to oidset.c. Document it while we're at it. Signed-off-by: Rene Scharfe --- oi

[PATCH v3 4/5] oidset: use khash

2018-10-04 Thread René Scharfe
Reimplement oidset using khash.h in order to reduce its memory footprint and make it faster. Performance of a command that mainly checks for duplicate objects using an oidset, with master and Clang 6.0.1: $ cmd="./git-cat-file --batch-all-objects --unordered --buffer --batch-check='%(objectnam

[PATCH v3 3/5] khash: factor out kh_release_*

2018-10-04 Thread René Scharfe
Add a function for releasing the khash-internal allocations, but not the khash structure itself. It can be used with on-stack khash structs. Signed-off-by: Rene Scharfe --- 1 tab = 4 spaces here. khash.h | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/khash.h b/kha

[PATCH v3 2/5] fetch-pack: load tip_oids eagerly iff needed

2018-10-04 Thread René Scharfe
tip_oids_contain() lazily loads refs into an oidset at its first call. It abuses the internal (sub)member .map.tablesize of that oidset to check if it has done that already. Determine if the oidset needs to be populated upfront and then do that instead. This duplicates a loop, but simplifies the

[PATCH v3 1/5] fetch-pack: factor out is_unmatched_ref()

2018-10-04 Thread René Scharfe
Move the code to determine if a request is unmatched to its own little helper. This allows us to reuse it in a subsequent patch. Signed-off-by: Rene Scharfe --- fetch-pack.c | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/fetch-pack.c b/fetch-pack.c inde

Re: [PATCH v2 2/2] oidset: use khash

2018-10-04 Thread René Scharfe
Am 04.10.2018 um 08:48 schrieb Jeff King: > On Thu, Oct 04, 2018 at 07:56:44AM +0200, René Scharfe wrote: > >>> As the comment above notes, I think we're really looking at the case >>> where this gets populated on the first call, but not subsequent ones. It >>> might be less hacky to use a "static

Re: [PATCH] [Outreachy] git/userdiff.c fix regex pattern error

2018-10-04 Thread Ananya Krishna Maram
On Thu, 4 Oct 2018 at 19:56, Johannes Schindelin wrote: > > Hi Ananya, > > thank you for taking the time to write this patch! > > On Thu, 4 Oct 2018, Ananya Krishna Maram wrote: > > > the forward slash character should be escaped with backslash. Fix > > Unescaped forward slash error in Python rege

[PATCH v3 0/5] oidset: use khash

2018-10-04 Thread René Scharfe
Two new patches to avoid using oidset internals in fetch-pack: fetch-pack: factor out is_unmatched_ref() fetch-pack: load tip_oids eagerly iff needed Unchanged patch: khash: factor out kh_release_* Unchanged, except it doesn't touch fetch-pack anymore: oidset: use khash A new patch, t

Re: [PATCH] [Outreachy] git/userdiff.c fix regex pattern error

2018-10-04 Thread Johannes Schindelin
Hi Ananya, thank you for taking the time to write this patch! On Thu, 4 Oct 2018, Ananya Krishna Maram wrote: > the forward slash character should be escaped with backslash. Fix > Unescaped forward slash error in Python regex statements. > > Signed-off-by: Ananya Krishna Maram That explains pr

Re: inside the git folder

2018-10-04 Thread Stephen Smith
Chris - You may want to look at "git bundle" to transfer the repository contents. Then the recipient could fetch from the bundle to get the source git history. Just a thought. sps On Thursday, October 4, 2018 4:03:27 AM MST Johannes Schindelin wrote: > Hi Chris, > > as mentioned by Stefan (

[PATCH] [Outreachy] git/userdiff.c fix regex pattern error

2018-10-04 Thread Ananya Krishna Maram
the forward slash character should be escaped with backslash. Fix Unescaped forward slash error in Python regex statements. Signed-off-by: Ananya Krishna Maram --- userdiff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/userdiff.c b/userdiff.c index f565f6731..f4ff9b9e5 100

Re: inside the git folder

2018-10-04 Thread Johannes Schindelin
Hi Chris, as mentioned by Stefan (who is a respected, active core Git contributor, if you need any more arguments to listen to him), it is inappropriate to copy the contents of the .git/ directory wholesale to another user's machine. For one, it would horribly break in case the user overrode `use

[PATCH v2 5/5] diff --color-moved: fix a memory leak

2018-10-04 Thread Phillip Wood
From: Phillip Wood Free the hashmap items as well as the hashmap itself. This was found with asan. Signed-off-by: Phillip Wood --- diff.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/diff.c b/diff.c index 69f6309db6..100d24b9c4 100644 --- a/diff.c +++ b/diff.c @@ -57

[PATCH v2 4/5] diff --color-moved-ws: fix another memory leak

2018-10-04 Thread Phillip Wood
From: Phillip Wood This is obvious in retrospect, it was found with asan. Signed-off-by: Phillip Wood --- diff.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/diff.c b/diff.c index 9bf41bad0d..69f6309db6 100644 --- a/diff.c +++ b/diff.c @@ -969,6 +969,8 @@ static void pmb_advance_or_nu

[PATCH v2 0/5] diff --color-moved-ws: fix double free crash

2018-10-04 Thread Phillip Wood
From: Phillip Wood Thanks to Stefan and Martin for their comments on v1. This version has some small changes to patches 1-3 based on that feedback - see the individual patches for what has changed. Phillip Wood (5): diff --color-moved-ws: fix double free crash diff --color-moved-ws: fix out

[PATCH v2 2/5] diff --color-moved-ws: fix out of bounds string access

2018-10-04 Thread Phillip Wood
From: Phillip Wood When adjusting the start of the string to take account of the change in indentation the code was not checking that the string being adjusted was in fact longer than the indentation change. This was detected by asan. Signed-off-by: Phillip Wood --- Notes: Changes since v1

[PATCH v2 1/5] diff --color-moved-ws: fix double free crash

2018-10-04 Thread Phillip Wood
From: Phillip Wood Running git diff --color-moved-ws=allow-indentation-change v2.18.0 v2.19.0 results in a crash due to a double free. This happens when two potential moved blocks start with consecutive lines. As pmb_advance_or_null_multi_match() advances it copies the ws_delta from the last ma

[PATCH v2 3/5] diff --color-moved-ws: fix a memory leak

2018-10-04 Thread Phillip Wood
From: Phillip Wood Don't duplicate the indentation string if we're not going to use it. This was found with asan. Signed-off-by: Phillip Wood --- Notes: Changes since v1: - simplified code as suggested by Martin Ågren diff.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-)

Re: inside the git folder

2018-10-04 Thread Chris Jeschke
Hi Stefan, thanks for your answer. The Goal after sending the files is to have a copy on the remote site. This includes that the working directory is the same (what we already guarantee with our tool) and that git is at the same 'state' (that means that we have the same history and that we checko

Re: git fetch behaves weirdely when run in a worktree

2018-10-04 Thread Duy Nguyen
On Thu, Oct 4, 2018 at 8:55 AM Kaartic Sivaraam wrote: > > > > On 3 October 2018 00:13:06 GMT+05:30, Kaartic Sivaraam > wrote: > >Hi, > > > >Sorry for the delay. Got a little busy over the weekend. I seem to have > >found the reason behind the issue in the mean time :-) > > > > Oops, I forgot to