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

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

[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,

[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 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

[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 ---

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

[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

[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

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

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 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: >> >>>

[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

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

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

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 =

[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

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,

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 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(_oids, unmatched, newlist, > > ->old_oid)) {

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_* > >

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

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

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

[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

[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

[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

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

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

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 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

[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

[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

[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(-)

[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

[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 @@

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

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

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

2018-10-04 Thread Jeff King
On Thu, Oct 04, 2018 at 02:48:33AM -0400, Jeff King wrote: > 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

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

2018-10-04 Thread 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 int initialized" here. Or if we > > want to

Re: git fetch behaves weirdely when run in a worktree

2018-10-04 Thread Kaartic Sivaraam
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 mention there's more comments inline! BTW, is there an issue if .git/HEAD

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

[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

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

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