[PATCH v2 09/14] bisect.c: use commit-slab for commit weight instead of commit->util

2018-05-12 Thread Nguyễn Thái Ngọc Duy
It's done so that commit->util can be removed. See more explanation in the commit that removes commit->util. Signed-off-by: Nguyễn Thái Ngọc Duy --- bisect.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/bisect.c b/bisect.c index

[PATCH v2 04/14] describe: use commit-slab for commit names instead of commit->util

2018-05-12 Thread Nguyễn Thái Ngọc Duy
It's done so that commit->util can be removed. See more explanation in the commit that removes commit->util. Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/describe.c | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/builtin/describe.c

[PATCH v2 06/14] sequencer.c: use commit-slab to mark seen commits

2018-05-12 Thread Nguyễn Thái Ngọc Duy
It's done so that commit->util can be removed. See more explanation in the commit that removes commit->util. Signed-off-by: Nguyễn Thái Ngọc Duy --- sequencer.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/sequencer.c b/sequencer.c index

[PATCH v2 05/14] shallow.c: use commit-slab for commit depth instead of commit->util

2018-05-12 Thread Nguyễn Thái Ngọc Duy
It's done so that commit->util can be removed. See more explanation in the commit that removes commit->util. While at there, plug a leak for keeping track of depth in this code. Signed-off-by: Nguyễn Thái Ngọc Duy --- shallow.c | 41 +

[PATCH v2 12/14] log: use commit-slab in prepare_bases() instead of commit->util

2018-05-12 Thread Nguyễn Thái Ngọc Duy
It's done so that commit->util can be removed. See more explanation in the commit that removes commit->util. Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/log.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/builtin/log.c b/builtin/log.c

[PATCH v2 10/14] name-rev: use commit-slab for rev-name instead of commit->util

2018-05-12 Thread Nguyễn Thái Ngọc Duy
It's done so that commit->util can be removed. See more explanation in the commit that removes commit->util. Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/name-rev.c | 23 --- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git

[PATCH v2 01/14] commit-slab.h: code split

2018-05-12 Thread Nguyễn Thái Ngọc Duy
The struct declaration and implementation macros are moved to commit-slab-hdr.h and commit-slab-impl.h respectively. This right now is not needed for current users but if we share a commit-slab for multiple files, we need something better than the current structure. Signed-off-by: Nguyễn Thái

[PATCH v2 00/14] Die commit->util, die!

2018-05-12 Thread Nguyễn Thái Ngọc Duy
v2 is mostly refinements with a big change: commit-slab.h is restructured to allow sharing commit slabs. Other changes are - rename struct source_slab to revision_sources - keep revision_sources_* functinons (and one static variable) to revision.c instead of duplicating them whenver revision.h

[PATCH v2 11/14] show-branch: use commit-slab for commit-name instead of commit->util

2018-05-12 Thread Nguyễn Thái Ngọc Duy
It's done so that commit->util can be removed. See more explanation in the commit that removes commit->util. Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/show-branch.c | 39 +++ 1 file changed, 27 insertions(+), 12 deletions(-) diff

[PATCH v2 03/14] blame: use commit-slab for blame suspects instead of commit->util

2018-05-12 Thread Nguyễn Thái Ngọc Duy
It's done so that commit->util can be removed. See more explanation in the commit that removes commit->util. Signed-off-by: Nguyễn Thái Ngọc Duy --- blame.c | 42 +++--- blame.h | 2 ++ builtin/blame.c | 2 +- 3 files

[PATCH v2 07/14] sequencer.c: use commit-slab to associate todo items to commits

2018-05-12 Thread Nguyễn Thái Ngọc Duy
It's done so that commit->util can be removed. See more explanation in the commit that removes commit->util. Signed-off-by: Nguyễn Thái Ngọc Duy --- sequencer.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/sequencer.c b/sequencer.c index

[PATCH v2 02/14] commit-slab: support shared commit-slab

2018-05-12 Thread Nguyễn Thái Ngọc Duy
define_shared_commit_slab() could be used in a header file to define a commit-slab. One of these C files must include commit-slab-impl.h and "call" implement_shared_commit_slab(). Signed-off-by: Nguyễn Thái Ngọc Duy --- commit-slab-hdr.h | 13 +

[PATCH v2 08/14] revision.c: use commit-slab for show_source

2018-05-12 Thread Nguyễn Thái Ngọc Duy
Instead of relying on commit->util to store the source string, let the user provide a commit-slab to store the source strings in. It's done so that commit->util can be removed. See more explanation in the commit that removes commit->util. Signed-off-by: Nguyễn Thái Ngọc Duy

[PATCH v2 14/14] commit.h: delete 'util' field in struct commit

2018-05-12 Thread Nguyễn Thái Ngọc Duy
If you have come this far, you probably have seen that this 'util' pointer is used for many different purposes. Some are not even contained in a command code, but buried deep in common code with no clue who will use it and how. The move to using commit-slab gives us a much better picture of how

[PATCH v2 13/14] merge: use commit-slab in merge remote desc instead of commit->util

2018-05-12 Thread Nguyễn Thái Ngọc Duy
It's done so that commit->util can be removed. See more explanation in the commit that removes commit->util. Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/merge.c | 25 + commit.c | 12 ++-- commit.h | 2 +-

Re: [PATCH 00/12] Die commit->util, die!

2018-05-12 Thread Duy Nguyen
On Sat, May 12, 2018 at 8:50 PM, Jakub Narebski wrote: > I just wonder if most of those transformation could not be done with > Coccinelle, instead of doing it by hand. I doubt coccinelle is smart enough to figure out the convoluted use of 'util' pointer (but then I'm not a

[PATCH v2 16/28] t4008: abstract away SHA-1-specific constants

2018-05-12 Thread brian m. carlson
Adjust the test so that it computes variables for blobs instead of using hard-coded hashes. Signed-off-by: brian m. carlson --- t/t4008-diff-break-rewrite.sh | 59 +++ 1 file changed, 32 insertions(+), 27 deletions(-) diff --git

[PATCH v2 14/28] t3905: abstract away SHA-1-specific constants

2018-05-12 Thread brian m. carlson
Adjust the test so that it computes variables for blobs instead of using hard-coded hashes. Signed-off-by: brian m. carlson --- t/t3905-stash-include-untracked.sh | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git

[PATCH v2 25/28] t4042: abstract away SHA-1-specific constants

2018-05-12 Thread brian m. carlson
Adjust the test so that it computes variables for blobs instead of using hard-coded hashes. Signed-off-by: brian m. carlson --- t/t4042-diff-textconv-caching.sh | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git

[PATCH v2 24/28] t4205: sort log output in a hash-independent way

2018-05-12 Thread brian m. carlson
This test enumerates log entries and then sorts them. For SHA-1, this produces results that happen to sort in the order specified in the test, but for other hash algorithms they sort differently. Ensure we sort the log entries in a hash-independent way by sorting on the ref name instead of the

[PATCH v2 23/28] t/lib-diff-alternative: abstract away SHA-1-specific constants

2018-05-12 Thread brian m. carlson
Adjust the test code so that it computes variables for blobs instead of using hard-coded hashes. This makes t4033 and t4050 (the patience and histogram tests) pass. Signed-off-by: brian m. carlson --- t/lib-diff-alternative.sh | 12 1 file changed, 8

[PATCH v2 17/28] t4014: abstract away SHA-1-specific constants

2018-05-12 Thread brian m. carlson
Adjust the test so that it computes values for blobs instead of using hard-coded hashes. Signed-off-by: brian m. carlson --- t/t4014-format-patch.sh | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/t/t4014-format-patch.sh

[PATCH v2 13/28] t3702: abstract away SHA-1-specific constants

2018-05-12 Thread brian m. carlson
Strip out the index lines in the diff before comparing them, as these will differ between hash algorithms. This leads to a smaller, simpler change than editing the index line. Signed-off-by: brian m. carlson --- t/t3702-add-edit.sh | 7 +++ 1 file changed, 3

[PATCH v2 27/28] t4208: abstract away SHA-1-specific constants

2018-05-12 Thread brian m. carlson
Adjust the test so that it computes variables for object IDs instead of using hard-coded hashes. Signed-off-by: brian m. carlson --- t/t4208-log-magic-pathspec.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/t/t4208-log-magic-pathspec.sh

[PATCH v2 18/28] t4020: abstract away SHA-1-specific constants

2018-05-12 Thread brian m. carlson
Adjust the test so that it computes variables for blobs instead of using hard-coded hashes. Signed-off-by: brian m. carlson --- t/t4020-diff-external.sh | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/t/t4020-diff-external.sh

[PATCH v2 20/28] t4029: fix test indentation

2018-05-12 Thread brian m. carlson
We typically indent our tests with a single tab, partially so that we can take advantage of indented heredocs. Make this change and move the quote marks to be in the typical position for our tests. Signed-off-by: brian m. carlson --- t/t4029-diff-trailing-space.sh

[PATCH v2 21/28] t4029: abstract away SHA-1-specific constants

2018-05-12 Thread brian m. carlson
Adjust the test so that it computes variables for blobs instead of using hard-coded hashes. Signed-off-by: brian m. carlson --- t/t4029-diff-trailing-space.sh | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/t/t4029-diff-trailing-space.sh

[PATCH v2 26/28] t4045: abstract away SHA-1-specific constants

2018-05-12 Thread brian m. carlson
Adjust the test so that it computes variables for blobs instead of using hard-coded hashes. Signed-off-by: brian m. carlson --- t/t4045-diff-relative.sh | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/t/t4045-diff-relative.sh

[PATCH v2 11/28] t2203: abstract away SHA-1-specific constants

2018-05-12 Thread brian m. carlson
Adjust the test so that it computes variables for blobs instead of using hard-coded hashes. Signed-off-by: brian m. carlson --- t/t2203-add-intent.sh | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/t/t2203-add-intent.sh

[PATCH v2 08/28] t1512: skip test if not using SHA-1

2018-05-12 Thread brian m. carlson
This test relies on objects with colliding short names which are necessarily dependent on the hash used. Skip the test if we're not using SHA-1. Signed-off-by: brian m. carlson --- t/t1512-rev-parse-disambiguation.sh | 6 ++ 1 file changed, 6 insertions(+)

[PATCH v2 19/28] t4022: abstract away SHA-1-specific constants

2018-05-12 Thread brian m. carlson
Adjust the test so that it computes variables for blobs instead of using hard-coded hashes. Signed-off-by: brian m. carlson --- t/t4022-diff-rewrite.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/t/t4022-diff-rewrite.sh

[PATCH v2 10/28] t: skip pack tests if not using SHA-1

2018-05-12 Thread brian m. carlson
These tests rely on creating packs with specially named objects which are necessarily dependent on the hash used. Skip these tests if we're not using SHA-1. Signed-off-by: brian m. carlson --- t/t5308-pack-detect-duplicates.sh | 6 ++

[PATCH v2 06/28] t0000: annotate with SHA1 prerequisite

2018-05-12 Thread brian m. carlson
Since this is a core test that tests basic functionality, annotate the assertions that have dependencies on SHA-1 with the appropriate prerequisite. Signed-off-by: brian m. carlson --- t/t-basic.sh | 24 1 file changed, 12

[PATCH v2 09/28] t4044: skip test if not using SHA-1

2018-05-12 Thread brian m. carlson
This test relies on objects with colliding short names which are necessarily dependent on the hash used. Skip the test if we're not using SHA-1. Signed-off-by: brian m. carlson --- t/t4044-diff-index-unique-abbrev.sh | 6 ++ 1 file changed, 6 insertions(+)

[PATCH v2 07/28] t1007: annotate with SHA1 prerequisite

2018-05-12 Thread brian m. carlson
Since this is a core test that tests basic functionality, annotate the assertions that have dependencies on SHA-1 with the appropriate prerequisite. Signed-off-by: brian m. carlson --- t/t1007-hash-object.sh | 16 1 file changed, 8 insertions(+), 8

[PATCH v2 22/28] t4030: abstract away SHA-1-specific constants

2018-05-12 Thread brian m. carlson
Adjust the test so that it computes variables for blobs instead of using hard-coded hashes. Signed-off-by: brian m. carlson --- t/t4030-diff-textconv.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/t/t4030-diff-textconv.sh

[PATCH v2 12/28] t3103: abstract away SHA-1-specific constants

2018-05-12 Thread brian m. carlson
Adjust the test so that it uses variables and command substitution for trees instead of hard-coded hashes. This also has the benefit of making it more obvious how the test works. Signed-off-by: brian m. carlson --- t/t3103-ls-tree-misc.sh | 3 ++- 1 file changed,

[PATCH v2 28/28] t5300: abstract away SHA-1-specific constants

2018-05-12 Thread brian m. carlson
Adjust the test so that it computes variables for object IDs instead of using hard-coded hashes. Signed-off-by: brian m. carlson --- t/t5300-pack-object.sh | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/t/t5300-pack-object.sh

[PATCH v2 15/28] t4007: abstract away SHA-1-specific constants

2018-05-12 Thread brian m. carlson
Adjust the test so that it computes variables for blobs and uses the ZERO_OID variable instead of using hard-coded hashes. Signed-off-by: brian m. carlson --- t/t4007-rename-3.sh | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git

[PATCH v2 04/28] t/test-lib: introduce OID_REGEX

2018-05-12 Thread brian m. carlson
Currently we have a variable, $_x40, which contains a regex that matches a full 40-character hex constant. However, with NewHash, we'll have object IDs that are longer than 40 characters. In such a case, $_x40 will be a confusing name. Create a $OID_REGEX variable which will always reflect a

[PATCH v2 03/28] t: switch $_z40 to $ZERO_OID

2018-05-12 Thread brian m. carlson
Switch all uses of $_z40 to $ZERO_OID so that they work correctly with larger hashes. This commit was created by using the following sed command to modify all files in the t directory except t/test-lib.sh: sed -i 's/\$_z40/$ZERO_OID/g' Signed-off-by: brian m. carlson

[PATCH v2 05/28] t: switch $_x40 to $OID_REGEX

2018-05-12 Thread brian m. carlson
Switch all uses of $_x40 to $OID_REGEX so that they work correctly with larger hashes. This commit was created by using the following sed command to modify all files in the t directory except t/test-lib.sh: sed -i 's/\$_x40/$OID_REGEX/g' Signed-off-by: brian m. carlson

[PATCH v2 02/28] t/test-lib: introduce ZERO_OID

2018-05-12 Thread brian m. carlson
Currently we have a variable, $_z40, which contains the all-zero object ID. However, with NewHash, we'll have an all-zero object ID which is longer than 40 hex characters. In such a case, $_z40 will be a confusing name. Create a $ZERO_OID variable which will always reflect the all-zeros object

[PATCH v2 00/28] Hash-independent tests (part 2)

2018-05-12 Thread brian m. carlson
This is part 2 in the series to make tests hash independent. This series introduces an SHA1 prerequisite which checks if the hash in use is SHA-1, and can be used to skip the test if it is not. Additionally, because NewHash will be 256-bit, I introduced aliases for the test constants $_x40 and

[PATCH v2 01/28] t/test-lib: add an SHA1 prerequisite

2018-05-12 Thread brian m. carlson
There are some basic tests in our codebase that test that we get fixed SHA-1 values. These are valuable because they make sure that our SHA-1 implementation is free of bugs, but obviously these tests will fail with a different hash. There are also tests which intentionally produce objects that

[PATCH 3/3] doc: update doc for strict usage of -- checkout

2018-05-12 Thread Dannier Castro L
The flag '--' must always be before any file path when command is used. The main documentation about the usage of command is updated to include the strict usage of the flag '--' so that the user can specify file names over branch names. Signed-off-by: Dannier Castro L :

[PATCH 1/3] checkout.c: add strict usage of -- before file_path

2018-05-12 Thread Dannier Castro L
Currently, is a complex command able to handle both branches and files without any distintion other than their names, taking into account that depending on the type (branch or file), the functionality is completely different, the easier example: $ git checkout # Switch from current branch to .

[PATCH 2/3] test: update tests for strict usage of -- checkout

2018-05-12 Thread Dannier Castro L
The flag '--' must always be before any file path when command is used. The list of 34 test files updated is shown: t0021-conversion.sh t0027-auto-crlf.sh t1011-read-tree-sparse-checkout.sh t1050-large.sh t1051-large-conversion.sh t2009-checkout-statinfo.sh

Re: [PATCH 2/4] mark_parents_uninteresting(): drop missing object check

2018-05-12 Thread Junio C Hamano
Jeff King writes: > 2. It "lies" about the commit by setting the parsed flag, > even though we didn't load any useful data into the > struct. This shouldn't matter for the UNINTERESTING > case, but we may later clear our flags and do another > traversal in

Re: [PATCH] commit.h: rearrange 'index' to shrink struct commit

2018-05-12 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > On linux 64-bit architecture, pahole finds that there's a 4 bytes > padding after 'index'. Moving it to the end reduces this struct's size > from 72 to 64 bytes (because of another 4 bytes padding after > graph_pos). On linux 32-bit, the struct

[PATCHv2 0/1] add git-p4 unshelve command

2018-05-12 Thread Luke Diamand
This is another attempt to make a "git p4 unshelve" command. Unshelving in p4 is a bit like a cross between cherry-pick and "am", and is very commonly used for review. This command helps git users who want to try out a shelved p4 change from some other repo: e.g. $ git p4 unshelve 12345

[PATCH 1/1] git-p4: add unshelve command

2018-05-12 Thread Luke Diamand
This can be used to "unshelve" a shelved P4 commit into a git commit. For example: $ git p4 unshelve 12345 The resulting commit ends up in the branch: refs/remotes/p4/unshelved/12345 If that branch already exists, it is renamed - for example the above branch would be saved as

Re: [PATCH v2 08/12] commit-graph: verify commit contents against odb

2018-05-12 Thread Martin Ågren
On 11 May 2018 at 23:15, Derrick Stolee wrote: > When running 'git commit-graph verify', compare the contents of the > commits that are loaded from the commit-graph file with commits that are > loaded directly from the object database. This includes checking the > root tree

Re: [BUG] git send-email: incorrectly parses email address with comma

2018-05-12 Thread Heinrich Schuchardt
On 05/12/2018 11:48 AM, Jeff King wrote: > On Sat, May 12, 2018 at 10:21:46AM +0200, Heinrich Schuchardt wrote: > >> Git send-email allows to combine multiple email addresses in one >> parameter, e.g. >> >> --to="a...@example.com, b...@example.com" >> >> But email addresses may contain commas

Re: [PATCH v2 07/12] commit-graph: load a root tree from specific graph

2018-05-12 Thread Martin Ågren
On 11 May 2018 at 23:15, Derrick Stolee wrote: > -struct tree *get_commit_tree_in_graph(const struct commit *c) > +static struct tree *get_commit_tree_in_graph_one(struct commit_graph *g, > +const struct commit *c) > { >

Re: [PATCH v2 06/12] commit: force commit to parse from object database

2018-05-12 Thread Martin Ågren
On 11 May 2018 at 23:15, Derrick Stolee wrote: > -int parse_commit_gently(struct commit *item, int quiet_on_missing) > +int parse_commit_internal(struct commit *item, int quiet_on_missing, int > use_commit_graph) > { > enum object_type type; > void

Re: [PATCH v2 04/12] commit-graph: parse commit from chosen graph

2018-05-12 Thread Martin Ågren
> -int parse_commit_in_graph(struct commit *item) > +int parse_commit_in_graph_one(struct commit_graph *g, struct commit *item) I think this function should be static.

RE: [Best Practices Request] clean/smudge configuration - Avoiding the chicken and egg

2018-05-12 Thread Randall S. Becker
On May 11, 2018 3:26 PM, I wrote: > On May 10, 2018 10:27 PM, Junio C Hamano wrote: > > "Randall S. Becker" writes: > > > > > What if we create a ../.gitconfig like ../.gitattributes, that is > > > loaded before .git/config? > > > > You should not forget one of the two

Re: [PATCH 03/12] shallow.c: use commit-slab for commit depth instead of commit->util

2018-05-12 Thread Jeff King
On Sat, May 12, 2018 at 02:09:18PM +0200, Duy Nguyen wrote: > > That wastes an extra 4 bytes per slot over storing an int directly, but > > it's the same as storing an 8-byte pointer, plus you avoid the storage > > and runtime overhead of malloc. > > Or we could have a way to let the user decide

Re: [PATCH 06/12] revision.c: use commit-slab for show_source

2018-05-12 Thread Jeff King
On Sat, May 12, 2018 at 04:13:59PM +0200, Duy Nguyen wrote: > > Should this one be global in the first place? Can we tie it to say > > "struct rev_info" or something? I'd somehow anticipate a far future > > where object flag bits used for traversal book-keeping would be moved > > out of the

Re: [PATCH 00/12] Die commit->util, die!

2018-05-12 Thread Jakub Narebski
Nguyễn Thái Ngọc Duy writes: > There's not much to write here. It's basically a copy from 12/12: > > This 'util' pointer can be used for many different purposes, > controlled in different ways. Some are not even contained in a command > code, but buried deep in common code

[GSoC] GSoC with git, week 2

2018-05-12 Thread Alban Gruin
Hi, I published a new blog post about this week. You can read it here: https://blog.pa1ch.fr/posts/2018/05/12/en/gsoc2018-week-2.html Please tell me what you think about it :) Cheers, Alban

Re: [PATCH v6 11/13] command-list.txt: documentation and guide line

2018-05-12 Thread Philip Oakley
Hi Duy, From: "Nguyễn Thái Ngọc Duy" : Monday, May 07, 2018 This is intended to help anybody who needs to update command-list.txt. It gives a brief introduction of all attributes a command can take. --- command-list.txt | 44 1

Re: [PATCH 06/12] revision.c: use commit-slab for show_source

2018-05-12 Thread Duy Nguyen
On Sat, May 12, 2018 at 3:58 PM, Junio C Hamano wrote: > Jeff King writes: > >> On Sat, May 12, 2018 at 10:00:22AM +0200, Nguyễn Thái Ngọc Duy wrote: >> >>> diff --git a/revision.h b/revision.h >>> index b8c47b98e2..72404e2599 100644 >>> --- a/revision.h >>> +++

Re: [PATCH 04/12] sequencer.c: use commit-slab to mark seen commits

2018-05-12 Thread Duy Nguyen
On Sat, May 12, 2018 at 3:43 PM, Junio C Hamano wrote: > Jeff King writes: > >> On Sat, May 12, 2018 at 10:00:20AM +0200, Nguyễn Thái Ngọc Duy wrote: >> >>> +define_commit_slab(commit_seen, int); >> >> Yay, this one is nice and simple. :) This is what I had

Re: [RFC] Other chunks for commit-graph, part 1 - Bloom filters, topo order, etc.

2018-05-12 Thread Jakub Narebski
Derrick Stolee writes: > On 5/4/2018 3:40 PM, Jakub Narebski wrote: >> >> With early parts of commit-graph feature (ds/commit-graph and >> ds/lazy-load-trees) close to being merged into "master", see >> https://public-inbox.org/git/xmqq4ljtz87g@gitster-ct.c.googlers.com/ >>

Re: [PATCH 07/12] bisect.c: use commit-slab for commit weight instead of commit->util

2018-05-12 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > It's done so that commit->util can be removed. See more explanation in > the commit that removes commit->util. > > Signed-off-by: Nguyễn Thái Ngọc Duy > --- Yup, this one is a no-brainer. > bisect.c | 12 +--- > 1

Re: [PATCH 06/12] revision.c: use commit-slab for show_source

2018-05-12 Thread Junio C Hamano
Jeff King writes: > On Sat, May 12, 2018 at 10:00:22AM +0200, Nguyễn Thái Ngọc Duy wrote: > >> diff --git a/revision.h b/revision.h >> index b8c47b98e2..72404e2599 100644 >> --- a/revision.h >> +++ b/revision.h >> @@ -6,6 +6,7 @@ >> #include "notes.h" >> #include "pretty.h" >>

Re: [PATCH v2 03/12] commit-graph: test that 'verify' finds corruption

2018-05-12 Thread Martin Ågren
On 11 May 2018 at 23:15, Derrick Stolee wrote: > +test_expect_success 'detect bad signature' ' > + cd "$TRASH_DIRECTORY/full" && I was a bit surprised at the "cd outside subshell", but then realized that this file already does that. It will only be a problem if

Re: [PATCH 04/12] sequencer.c: use commit-slab to mark seen commits

2018-05-12 Thread Junio C Hamano
Jeff King writes: > On Sat, May 12, 2018 at 10:00:20AM +0200, Nguyễn Thái Ngọc Duy wrote: > >> +define_commit_slab(commit_seen, int); > > Yay, this one is nice and simple. :) This is what I had hoped for all > along with the slab concept. > > -Peff Does it need to use a full int,

Re: [PATCH v2 02/12] commit-graph: verify file header information

2018-05-12 Thread Martin Ågren
On 11 May 2018 at 23:15, Derrick Stolee wrote: > During a run of 'git commit-graph verify', list the issues with the > header information in the commit-graph file. Some of this information > is inferred from the loaded 'struct commit_graph'. Some header > information is

Re: [PATCH v2 01/12] commit-graph: add 'verify' subcommand

2018-05-12 Thread Martin Ågren
On 11 May 2018 at 23:15, Derrick Stolee wrote: > graph_name = get_commit_graph_filename(opts.obj_dir); > graph = load_commit_graph_one(graph_name); > + FREE_AND_NULL(graph_name); > > if (!graph) > die("graph file %s does not

refreshing the gitk colour scheme

2018-05-12 Thread Andrej Shadura
Hello everyone, I’ve been using Gitk with the following colour settings for a year or so, and I found it much more convenient to use that the current default, so I’d like to propose to make them the defaults. These colours are slightly less 80’s i.e. they’re using colours outside of the ‘classic’

Re: [PATCH 01/12] blame: use commit-slab for blame suspects instead of commit->util

2018-05-12 Thread Duy Nguyen
On Sat, May 12, 2018 at 11:22 AM, Jeff King wrote: > On Sat, May 12, 2018 at 10:00:17AM +0200, Nguyễn Thái Ngọc Duy wrote: > >> +define_commit_slab(blame_suspects, struct blame_origin *); >> +static struct blame_suspects blame_suspects; >> + >> +struct blame_origin

Re: [PATCH 03/12] shallow.c: use commit-slab for commit depth instead of commit->util

2018-05-12 Thread Duy Nguyen
On Sat, May 12, 2018 at 11:18 AM, Jeff King wrote: > On Sat, May 12, 2018 at 05:07:48AM -0400, Jeff King wrote: > >> So no, it wouldn't work to directly store depths with the code as >> written. I'm not sure if the depth can ever be 0. If not, then it would >> be a suitable

Re: [PATCH 03/12] shallow.c: use commit-slab for commit depth instead of commit->util

2018-05-12 Thread Duy Nguyen
On Sat, May 12, 2018 at 11:07 AM, Jeff King wrote: > On Sat, May 12, 2018 at 10:00:19AM +0200, Nguyễn Thái Ngọc Duy wrote: > >> @@ -82,25 +84,29 @@ struct commit_list *get_shallow_commits(struct >> object_array *heads, int depth, >> struct object_array stack =

Re: [PATCH v14 4/4] ls-remote: create '--sort' option

2018-05-12 Thread Jeff King
On Sat, May 12, 2018 at 10:45:23AM +0200, René Scharfe wrote: > Why is fetch called outside of the test? Its output is shown among the > test messages, where it doesn't belong: > > ok 23 - overrides work between mixed transfer/upload-pack hideRefs > From /home/lsr/src/git/t/trash

Re: [BUG] git send-email: incorrectly parses email address with comma

2018-05-12 Thread Jeff King
On Sat, May 12, 2018 at 10:21:46AM +0200, Heinrich Schuchardt wrote: > Git send-email allows to combine multiple email addresses in one > parameter, e.g. > > --to="a...@example.com, b...@example.com" > > But email addresses may contain commas themselves: > > --to="LASTNAME, firstname

Re: [PATCH 00/12] Die commit->util, die!

2018-05-12 Thread Jeff King
On Sat, May 12, 2018 at 10:00:16AM +0200, Nguyễn Thái Ngọc Duy wrote: > There's not much to write here. It's basically a copy from 12/12: > > This 'util' pointer can be used for many different purposes, > controlled in different ways. Some are not even contained in a command > code, but buried

Re: [PATCH 06/12] revision.c: use commit-slab for show_source

2018-05-12 Thread Jeff King
On Sat, May 12, 2018 at 10:00:22AM +0200, Nguyễn Thái Ngọc Duy wrote: > diff --git a/revision.h b/revision.h > index b8c47b98e2..72404e2599 100644 > --- a/revision.h > +++ b/revision.h > @@ -6,6 +6,7 @@ > #include "notes.h" > #include "pretty.h" > #include "diff.h" > +#include "commit-slab.h"

Re: [PATCH 05/12] sequencer.c: use commit-slab to associate todo items to commits

2018-05-12 Thread Jeff King
On Sat, May 12, 2018 at 10:00:21AM +0200, Nguyễn Thái Ngọc Duy wrote: > @@ -3446,9 +3451,9 @@ int rearrange_squash(void) > else if (!strchr(p, ' ') && >(commit2 = > lookup_commit_reference_by_name(p)) && > -

[PATCH v2 2/2] git-credential-netrc: accept gpg option

2018-05-12 Thread Luis Marsano
git-credential-netrc was hardcoded to decrypt with 'gpg' regardless of the gpg.program option. This is a problem on distributions like Debian that call modern GnuPG something else, like 'gpg2'. Set the command according to these settings in descending precedence 1. the git-credential-netrc command

[PATCH v2 1/2] git-credential-netrc: adapt to test framework for git

2018-05-12 Thread Luis Marsano
git-credential-netrc tests did not run in a test repository. Reuse the main test framework to stage a temporary repository. To imitate Perl tests under t/ - switch to Test::More module - use File::Basename & File::Spec::Functions Signed-off-by: Luis Marsano Acked-by: Ted

[PATCH v2 0/2] Configurable GnuPG command for git-credential-netrc

2018-05-12 Thread Luis Marsano
Updated per Junio's comments. - clarify commit messages - explain usage placeholder style as conformance with main coding style - drop Unicode dependence Unicode punctuation was initially included for semantics & accessibility, since assistive technology like screenreaders handle … better than

Re: [PATCH 04/12] sequencer.c: use commit-slab to mark seen commits

2018-05-12 Thread Jeff King
On Sat, May 12, 2018 at 10:00:20AM +0200, Nguyễn Thái Ngọc Duy wrote: > +define_commit_slab(commit_seen, int); Yay, this one is nice and simple. :) This is what I had hoped for all along with the slab concept. -Peff

Re: [PATCH 01/12] blame: use commit-slab for blame suspects instead of commit->util

2018-05-12 Thread Jeff King
On Sat, May 12, 2018 at 10:00:17AM +0200, Nguyễn Thái Ngọc Duy wrote: > +define_commit_slab(blame_suspects, struct blame_origin *); > +static struct blame_suspects blame_suspects; > + > +struct blame_origin *get_blame_suspects(struct commit *commit) > +{ > + struct blame_origin **result; > +

Re: [PATCH 03/12] shallow.c: use commit-slab for commit depth instead of commit->util

2018-05-12 Thread Jeff King
On Sat, May 12, 2018 at 05:07:48AM -0400, Jeff King wrote: > So no, it wouldn't work to directly store depths with the code as > written. I'm not sure if the depth can ever be 0. If not, then it would > be a suitable sentinel as: > > int *slot = commit_depth_at(, p->item); > if (!*slot ||

Re: [PATCH 03/12] shallow.c: use commit-slab for commit depth instead of commit->util

2018-05-12 Thread Jeff King
On Sat, May 12, 2018 at 10:00:19AM +0200, Nguyễn Thái Ngọc Duy wrote: > @@ -82,25 +84,29 @@ struct commit_list *get_shallow_commits(struct > object_array *heads, int depth, > struct object_array stack = OBJECT_ARRAY_INIT; > struct commit *commit = NULL; > struct commit_graft

Re: [PATCH] fast-export: avoid NULL pointer arithmetic

2018-05-12 Thread René Scharfe
Am 12.05.2018 um 10:45 schrieb René Scharfe: > Or we could roll our own custom hash map, as I mused in an earlier post. > That would duplicate quite a bit of code; are there reusable pieces > hidden within that could be extracted into common functions? At least it would allow us to save four

Re: [PATCH v14 4/4] ls-remote: create '--sort' option

2018-05-12 Thread René Scharfe
Am 09.04.2018 um 03:42 schrieb Harald Nordgren: > diff --git a/t/t5512-ls-remote.sh b/t/t5512-ls-remote.sh > index 02106c922..83cd35c39 100755 > --- a/t/t5512-ls-remote.sh > +++ b/t/t5512-ls-remote.sh > @@ -170,14 +206,18 @@ test_expect_success 'overrides work between mixed >

Re: [PATCH] fast-export: avoid NULL pointer arithmetic

2018-05-12 Thread René Scharfe
Am 11.05.2018 um 19:42 schrieb Jeff King: > On Fri, May 11, 2018 at 03:34:19PM +0200, Duy Nguyen wrote: > >> On Fri, May 11, 2018 at 03:11:46PM +0200, Duy Nguyen wrote: >>> Back to fast-export, can we just allocate a new int on heap and point >>> it there? Allocating small pieces becomes quite

Re: Bug report for git push

2018-05-12 Thread Jeff King
On Fri, May 11, 2018 at 09:44:54PM -0400, Surenkumar Nihalani wrote: > Push summary: [remote rejected] (cannot lock ref 'refs/heads/master': is at > cf2cc0c147d8215ec87d3ddaf32f0b2c58630423 but expected > fdda486ad43a6e6b5dc5f2795ce27124e0686752) This generally indicates that somebody was

[BUG] git send-email: incorrectly parses email address with comma

2018-05-12 Thread Heinrich Schuchardt
Git send-email allows to combine multiple email addresses in one parameter, e.g. --to="a...@example.com, b...@example.com" But email addresses may contain commas themselves: --to="LASTNAME, firstname " This may lead to an error: $ git send-email

Re: [PATCH v3] add status config and command line options for rename detection

2018-05-12 Thread Eckhard Maaß
On Fri, May 11, 2018 at 12:56:39PM +, Ben Peart wrote: > After performing a merge that has conflicts git status will, by default, > attempt to detect renames which causes many objects to be examined. In a > virtualized repo, those objects do not exist locally so the rename logic > triggers

[PATCH 03/12] shallow.c: use commit-slab for commit depth instead of commit->util

2018-05-12 Thread Nguyễn Thái Ngọc Duy
It's done so that commit->util can be removed. See more explanation in the commit that removes commit->util. While at there, plug a leak for keeping track of depth in this code. Signed-off-by: Nguyễn Thái Ngọc Duy --- shallow.c | 37 + 1

[PATCH 00/12] Die commit->util, die!

2018-05-12 Thread Nguyễn Thái Ngọc Duy
There's not much to write here. It's basically a copy from 12/12: This 'util' pointer can be used for many different purposes, controlled in different ways. Some are not even contained in a command code, but buried deep in common code with no clue who will use it and how. For example, if

[PATCH 01/12] blame: use commit-slab for blame suspects instead of commit->util

2018-05-12 Thread Nguyễn Thái Ngọc Duy
It's done so that commit->util can be removed. See more explanation in the commit that removes commit->util. Signed-off-by: Nguyễn Thái Ngọc Duy --- blame.c | 42 +++--- blame.h | 2 ++ builtin/blame.c | 2 +- 3 files

[PATCH 09/12] show-branch: use commit-slab for commit-name instead of commit->util

2018-05-12 Thread Nguyễn Thái Ngọc Duy
It's done so that commit->util can be removed. See more explanation in the commit that removes commit->util. Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/show-branch.c | 39 +++ 1 file changed, 27 insertions(+), 12 deletions(-) diff

[PATCH 08/12] name-rev: use commit-slab for rev-name instead of commit->util

2018-05-12 Thread Nguyễn Thái Ngọc Duy
It's done so that commit->util can be removed. See more explanation in the commit that removes commit->util. Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/name-rev.c | 23 --- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git

[PATCH 07/12] bisect.c: use commit-slab for commit weight instead of commit->util

2018-05-12 Thread Nguyễn Thái Ngọc Duy
It's done so that commit->util can be removed. See more explanation in the commit that removes commit->util. Signed-off-by: Nguyễn Thái Ngọc Duy --- bisect.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/bisect.c b/bisect.c index

  1   2   >