Re: [PATCH 2/2] submodule: munge paths to submodule git directories

2018-08-28 Thread Jeff King
On Tue, Aug 28, 2018 at 02:35:25PM -0700, Stefan Beller wrote: > 3) (optional) instead of putting it all in modules/, use another >directory gitmodules/ for example. this will make sure we can tell >if a repository has been converted or is stuck with a setup of a >current git. I actua

Re: Thank you for public-inbox!

2018-08-28 Thread Jeff King
On Mon, Aug 27, 2018 at 04:25:13PM +0200, Johannes Schindelin wrote: > I would like to take five minutes to thank you for public-inbox. It is > invaluable for me in the meantime. And I think I will never be able to > thank you enough for it. Let me echo that appreciation. I have always kept my ow

Re: Contributor Summit planning

2018-08-28 Thread Jeff King
On Tue, Aug 28, 2018 at 12:49:55AM +0200, Johannes Schindelin wrote: > On Mon, 13 Aug 2018, Ævar Arnfjörð Bjarmason wrote: > > > * Re the second half of "Not everyone can travel or can afford to do > >so" from Derrick, there's been travel sponsorships in past years. > > Just to make sure th

Re: Contributor Summit planning

2018-08-28 Thread Jeff King
On Mon, Aug 27, 2018 at 03:34:16PM +0200, Johannes Schindelin wrote: > > - format > > > > For those who haven't attended before, it's basically 25-ish Git > > (and associated project) developers sitting in a room for a day > > chatting about the project. Topics go on a whiteboard in

Re: Contributor Summit planning

2018-08-28 Thread Jeff King
On Mon, Aug 27, 2018 at 03:22:39PM +0200, Johannes Schindelin wrote: > Having said that, I believe that we core contributors can learn to have a > fruitful online meeting. With 30+ participants, too. > > Learning from my past life in academia (it is hard for me to imagine a > less disciplined cro

Re: [PATCH v3 01/11] t: add tool to translate hash-related values

2018-08-28 Thread Jonathan Nieder
Hi, brian m. carlson wrote: > Add a test function helper, test_oid, that produces output that varies > depending on the hash in use. Cool! >Add two additional helpers, > test_oid_cache, which can be used to load data for test_oid from > standard input, and test_o

[RFC PATCH 01/12] sha1-file: rename algorithm to "sha1"

2018-08-28 Thread brian m. carlson
The transition plan anticipates us using a syntax such as "^{sha1}" for disambiguation. Since this is a syntax some people will be typing a lot, it makes sense to provide a short, easy-to-type syntax. Omitting the dash doesn't create any ambiguity, but it does make it shorter and easier to type,

[RFC PATCH 02/12] sha1-file: provide functions to look up hash algorithms

2018-08-28 Thread brian m. carlson
There are several ways we might refer to a hash algorithm: by name, such as in the config file; by format ID, such as in a pack; or internally, by a pointer to the hash_algos array. Provide functions to look up hash algorithms based on these various forms and return the internal constant used for

[RFC PATCH 10/12] sha256: add an SHA-256 implementation using libgcrypt

2018-08-28 Thread brian m. carlson
Generally, one gets better performance out of cryptographic routines written in assembly than C, and this is also true for SHA-256. In addition, most Linux distributions cannot distribute Git linked against OpenSSL for licensing reasons. Most systems with GnuPG will also have libgcrypt, since it

[RFC PATCH 12/12] commit-graph: specify OID version for SHA-256

2018-08-28 Thread brian m. carlson
Since the commit-graph code wants to serialize the hash algorithm into the data store, specify a version number for each supported algorithm. Note that we don't use the values of the constants themselves, as they are internal and could change in the future. Signed-off-by: brian m. carlson --- co

[RFC PATCH 11/12] hash: add an SHA-256 implementation using OpenSSL

2018-08-28 Thread brian m. carlson
We already have OpenSSL routines available for SHA-1, so add routines for SHA-256 as well. Signed-off-by: brian m. carlson --- Makefile | 7 +++ hash.h | 2 ++ 2 files changed, 9 insertions(+) diff --git a/Makefile b/Makefile index 86867af083..8b7df4dfc5 100644 --- a/Makefile +++ b/Makefi

[RFC PATCH 09/12] Add a base implementation of SHA-256 support

2018-08-28 Thread brian m. carlson
SHA-1 is weak and we need to transition to a new hash function. For some time, we have referred to this new function as NewHash. The selection criteria for NewHash specify that it should (a) be 256 bits in length, (b) have high quality implementations available, (c) should match Git's needs in te

[RFC PATCH 07/12] t/helper: add a test helper to compute hash speed

2018-08-28 Thread brian m. carlson
Add a utility (which is less for the testsuite and more for developers) that can compute hash speeds for whatever hash algorithms are implemented. This allows developers to test their personal systems to determine the performance characteristics of various algorithms. Signed-off-by: brian m. carl

[RFC PATCH 08/12] commit-graph: convert to using the_hash_algo

2018-08-28 Thread brian m. carlson
Instead of using hard-coded constants for object sizes, use the_hash_algo to look them up. In addition, use a function call to look up the object ID version and produce the correct value. Signed-off-by: brian m. carlson --- commit-graph.c | 31 --- 1 file changed, 16

[RFC PATCH 05/12] t: make the sha1 test-tool helper generic

2018-08-28 Thread brian m. carlson
Since we're going to have multiple hash algorithms to test, it makes sense to share as much of the test code as possible. Convert the sha1 helper for the test-tool to be generic and move it out into its own module. This will allow us to share most of this code with our NewHash implementation. Si

[RFC PATCH 06/12] sha1-file: add a constant for hash block size

2018-08-28 Thread brian m. carlson
There is one place we need the hash algorithm block size: the HMAC code for push certs. Expose this constant in struct git_hash_algo and expose values for SHA-1 and for the largest value of any hash. Signed-off-by: brian m. carlson --- cache.h | 4 hash.h | 3 +++ sha1-file.c | 2

[RFC PATCH 03/12] hex: introduce functions to print arbitrary hashes

2018-08-28 Thread brian m. carlson
Currently, we have functions that turn an arbitrary SHA-1 value or an object ID into hex format, either using a static buffer or with a user-provided buffer. Add variants of these functions that can handle an arbitrary hash algorithm, specified by constant. Update the documentation as well. Whil

[RFC PATCH 04/12] t: add basic tests for our SHA-1 implementation

2018-08-28 Thread brian m. carlson
We have in the past had some unfortunate endianness issues with some SHA-1 implementations we ship, especially on big-endian machines. Add an explicit test using the test helper to catch these issues and point them out prominently. This test can also be used as a staging ground for people testing

[RFC PATCH 00/12] Base SHA-256 algorithm implementation

2018-08-28 Thread brian m. carlson
This RFC series provides an actual SHA-256 implementation and wires it up, along with a few housekeeping patches to make it usable for testing. As discussed in some threads, this changes the algorithm name from "sha-1" to "sha1" (and also adds "sha256") because it's far easier to type. I introduc

[PATCH v3 06/11] t0064: make hash size independent

2018-08-28 Thread brian m. carlson
Compute test values of the appropriate size instead of hard-coding 40-character values. Rename the echo20 function to echoid, since the values may be of varying sizes. Signed-off-by: brian m. carlson --- t/t0064-sha1-array.sh | 49 --- 1 file changed, 27

[PATCH v3 02/11] t0000: use hash translation table

2018-08-28 Thread brian m. carlson
If the hash we're using is 32 bytes in size, attempting to insert a 20-byte object name won't work. Since these are synthesized objects that are almost all zeros, look them up in a translation table. Signed-off-by: brian m. carlson --- t/t-basic.sh | 13 +++-- 1 file changed, 7 inse

[PATCH v3 08/11] t1400: switch hard-coded object ID to variable

2018-08-28 Thread brian m. carlson
Switch a hard-coded all-zeros object ID to use a variable instead. Signed-off-by: brian m. carlson --- t/t1400-update-ref.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t1400-update-ref.sh b/t/t1400-update-ref.sh index 7c8df20955..6072650686 100755 --- a/t/t1400-update-

[PATCH v3 03/11] t0000: update tests for SHA-256

2018-08-28 Thread brian m. carlson
Test t tests the "basics of the basics" and as such, checks that we have various fixed hard-coded object IDs. The tests relying on these assertions have been marked with the SHA1 prerequisite, as they will obviously not function in their current form with SHA-256. Use the test_oid helper to u

[PATCH v3 07/11] t1006: make hash size independent

2018-08-28 Thread brian m. carlson
Compute the size of the tree and commit objects we're creating by checking for the size of an object ID and computing the resulting sizes accordingly. Signed-off-by: brian m. carlson --- t/t1006-cat-file.sh | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/t/t1006-cat-fil

[PATCH v3 09/11] t1405: make hash size independent

2018-08-28 Thread brian m. carlson
Instead of hard-coding a 40-based constant, split the output of for-each-ref and for-each-reflog by field. Signed-off-by: brian m. carlson --- t/t1405-main-ref-store.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/t1405-main-ref-store.sh b/t/t1405-main-ref-store.sh i

[PATCH v3 11/11] t1407: make hash size independent

2018-08-28 Thread brian m. carlson
Instead of hard-coding a 40-based constant, split the output of for-each-ref and for-each-reflog by field. Signed-off-by: brian m. carlson --- t/t1407-worktree-ref-store.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/t1407-worktree-ref-store.sh b/t/t1407-worktree-re

[PATCH v3 10/11] t1406: make hash-size independent

2018-08-28 Thread brian m. carlson
Instead of hard-coding a 40-based constant, split the output of for-each-ref and for-each-reflog by field. Signed-off-by: brian m. carlson --- t/t1406-submodule-ref-store.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/t/t1406-submodule-ref-store.sh b/t/t1406-submodu

[PATCH v3 04/11] t0002: abstract away SHA-1 specific constants

2018-08-28 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/t0002-gitfile.sh | 27 +++ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/t/t0002-gitfile.sh b/t/t0002-gitfile.sh index

[PATCH v3 05/11] t0027: make hash size independent

2018-08-28 Thread brian m. carlson
We transform various object IDs into all-zero object IDs for comparison. Adjust the length as well so that this works for all hash algorithms. Signed-off-by: brian m. carlson --- t/t0027-auto-crlf.sh | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/t/t0027-auto-crlf.sh b

[PATCH v3 01/11] t: add tool to translate hash-related values

2018-08-28 Thread brian m. carlson
Add a test function helper, test_oid, that produces output that varies depending on the hash in use. Add two additional helpers, test_oid_cache, which can be used to load data for test_oid from standard input, and test_oid_init, which can be used to load certain fixed values from lookup charts. C

[PATCH v3 00/11] Hash-independent tests (part 3)

2018-08-28 Thread brian m. carlson
This is the next in the series of improvements to make tests hash-independent. A range-diff is below. Changes from v2: * Fix a typo in "zero_2". * Provide better matching of expected output. * Add and use test_oid_init instead of filename-based test_oid_cache. * Add test_set_hash. * Provide bette

Re: avoid "Set preference list" during make test?

2018-08-28 Thread brian m. carlson
On Tue, Aug 28, 2018 at 11:53:55PM +, Tacitus Aedifex wrote: > While running `make test` on the git source tree I keep getting asked: > > Set preference list to: >Cipher: ... >Digest: ... >etc... > > Is there any way to turn that prompt off so that `make test` completes > without

Re: [PATCH 0/9] introducing oideq()

2018-08-28 Thread brian m. carlson
On Tue, Aug 28, 2018 at 05:21:27PM -0400, Jeff King wrote: > On Sun, Aug 26, 2018 at 08:56:21PM +, brian m. carlson wrote: > > I would quite like to see this series picked up for v2.20. If we want > > to minimize performance regressions with the SHA-256 work, I think it's > > important. > > T

Re: [PATCH] read-cache.c: optimize reading index format v4

2018-08-28 Thread Ben Peart
On 8/28/2018 3:25 PM, Duy Nguyen wrote: On Mon, Aug 27, 2018 at 9:36 PM Junio C Hamano wrote: PS. I notice that v4 does not pad to align entries at 4 byte boundary like v2/v3. This could cause a slight slow down on x86 and segfault on some other platforms. Care to elaborate? Long time ago

avoid "Set preference list" during make test?

2018-08-28 Thread Tacitus Aedifex
While running `make test` on the git source tree I keep getting asked: Set preference list to: Cipher: ... Digest: ... etc... Is there any way to turn that prompt off so that `make test` completes without any keyboard input? //tæ

Re: [PATCH 2/2] tests: fix non-portable iconv invocation

2018-08-28 Thread Jonathan Nieder
Hi, Ævar Arnfjörð Bjarmason wrote: > The iconv that comes with a FreeBSD 11.2-RELEASE-p2 box I have access > to doesn't support the SHIFT-JIS encoding. Guard a test added in > e92d62253 ("convert: add round trip check based on > 'core.checkRoundtripEncoding'", 2018-04-15) first released with Git

Re: [PATCH v4 10/11] rerere: teach rerere to handle nested conflicts

2018-08-28 Thread Thomas Gummerer
On 08/27, Junio C Hamano wrote: > Thomas Gummerer writes: > > > Agreed. I think it may be solvable if we'd actually get the > > information about what belongs to which side from the merge algorithm > > directly. > > The merge machinery may (eh, rather, "does") know, but we do not > have a way t

Re: [PATCH 1/1] commit-graph: define GIT_TEST_COMMIT_GRAPH

2018-08-28 Thread Eric Sunshine
On Tue, Aug 28, 2018 at 5:31 PM Derrick Stolee wrote: > On 8/28/2018 4:41 PM, Stefan Beller wrote: > > On Tue, Aug 28, 2018 at 1:33 PM Derrick Stolee via GitGitGadget > > wrote: > >> + GIT_TEST_COMMIT_GRAPH=0 && > >> + test_must_fail git merge -m final G > > This could

Re: [PATCH 2/2] submodule.c: warn about missing submodule git directories

2018-08-28 Thread Stefan Beller
On Tue, Aug 28, 2018 at 11:56 AM Junio C Hamano wrote: > > Stefan Beller writes: > > > This is the continuation of f2d48994dc1 (submodule.c: submodule_move_head > > works with broken submodules, 2017-04-18), which tones down the case of > > "broken submodule" in case of a missing git directory of

Re: [PATCH] commit-reach: correct accidental #include of C file

2018-08-28 Thread Derrick Stolee
On 8/28/2018 5:36 PM, Jonathan Nieder wrote: Without this change, the build breaks with clang: For some reason, it didn't fail with GCC for me, but this is an obviously correct change to make. Thanks! libgit/ref-filter.pic.o: multiple definition of 'filter_refs' libgit/commit-reach.pic.o: p

[PATCH] commit-reach: correct accidental #include of C file

2018-08-28 Thread Jonathan Nieder
Without this change, the build breaks with clang: libgit/ref-filter.pic.o: multiple definition of 'filter_refs' libgit/commit-reach.pic.o: previous definition here Signed-off-by: Jonathan Nieder --- Jonathan Nieder wrote: > Derrick Stolee wrote: >> --- a/commit-reach.c >> +++ b/commit-reach.c

Re: [PATCH 0/9] introducing oideq()

2018-08-28 Thread Derrick Stolee
On 8/28/2018 5:21 PM, Jeff King wrote: On Sun, Aug 26, 2018 at 08:56:21PM +, brian m. carlson wrote: Due to the simplicity of the current code and our inlining, the compiler can usually figure this out for now. So I wouldn't expect this patch to actually improve performance right away. But

Re: [PATCH 2/2] submodule: munge paths to submodule git directories

2018-08-28 Thread Stefan Beller
> > > - echo "gitdir: > > > ../../../.git/modules/sub3/modules/dirdir/subsub" > > > >./sub3/dirdir/subsub/.git_expect > > > + echo "gitdir: > > > ../../../.git/modules/sub3/modules/dirdir%2fsubsub" > > > >./sub3/dirdir/subsub/.git_expect > > > > One interesting thing about u

Re: [PATCH] doc: Don't echo sed command for manpage-base-url.xsl

2018-08-28 Thread Junio C Hamano
Tim Schumacher writes: > Previously, the sed command for generating manpage-base-url.xsl > was printed to the console when being run. > > For the purpose of silencing it, define a $(QUIET) variable which > contains an '@' if verbose mode isn't enabled and which is empty > otherwise. This just sil

Re: [PATCH v2 04/18] commit-reach: move commit_contains from ref-filter

2018-08-28 Thread Derrick Stolee
On 8/28/2018 5:24 PM, Jonathan Nieder wrote: Hi, Derrick Stolee wrote: There are several commit walks in the codebase. Group them together into a new commit-reach.c file and corresponding header. After we group these walks into one place, we can reduce duplicate logic by calling equivalent met

Re: [PATCH 0/1] Define GIT_TEST_COMMIT_GRAPH for commit-graph test coverage

2018-08-28 Thread Derrick Stolee
On 8/28/2018 4:37 PM, Stefan Beller wrote: On Tue, Aug 28, 2018 at 1:33 PM Derrick Stolee via GitGitGadget wrote: The commit-graph (and multi-pack-index) features are optional data structures that can make Git operations faster. Since they are optional, we do not enable them in most Git tests.

Re: [PATCH 1/1] commit-graph: define GIT_TEST_COMMIT_GRAPH

2018-08-28 Thread Derrick Stolee
On 8/28/2018 4:41 PM, Stefan Beller wrote: On Tue, Aug 28, 2018 at 1:33 PM Derrick Stolee via GitGitGadget wrote: From: Derrick Stolee The commit-graph feature is tested in isolation by t5318-commit-graph.sh and t6600-test-reach.sh, but there are many more interesting scenarios involving comm

[PATCH v2 2/2] rerere: add note about files with existing conflict markers

2018-08-28 Thread Thomas Gummerer
When a file contains lines that look like conflict markers, 'git rerere' may fail not be able to record a conflict resolution. Emphasize that in the man page, and mention a possible workaround for the issue. Suggested-by: Junio C Hamano Signed-off-by: Thomas Gummerer --- Compared to v1, this no

[PATCH v2 1/2] rerere: mention caveat about unmatched conflict markers

2018-08-28 Thread Thomas Gummerer
4af3220 ("rerere: teach rerere to handle nested conflicts", 2018-08-05) introduced slightly better behaviour if the user commits conflict markers and then gets another conflict in 'git rerere'. However this is just a heuristic to punt on such conflicts better, and doesn't deal with any unmatched c

Re: [PATCH] doc: Don't echo sed command for manpage-base-url.xsl

2018-08-28 Thread Eric Sunshine
On Tue, Aug 28, 2018 at 5:21 PM Tim Schumacher wrote: > Previously, the sed command for generating manpage-base-url.xsl > was printed to the console when being run. > > For the purpose of silencing it, define a $(QUIET) variable which > contains an '@' if verbose mode isn't enabled and which is em

Re: [PATCH v2 04/18] commit-reach: move commit_contains from ref-filter

2018-08-28 Thread Jonathan Nieder
Hi, Derrick Stolee wrote: > There are several commit walks in the codebase. Group them together into > a new commit-reach.c file and corresponding header. After we group these > walks into one place, we can reduce duplicate logic by calling > equivalent methods. > > All methods are direct moves,

Re: [PATCH v6] Implement --first-parent for git rev-list --bisect

2018-08-28 Thread Junio C Hamano
Junio C Hamano writes: > Something like the following, perhaps? Having said all that. > +# See the drawing near the top --- e4 is in the middle of the first parent > chain > +printf "%s\n" e4 | > +test_output_expect_success '--bisect --first-parent' ' > + git rev-list --bisect --first-pare

[PATCH v2 8/9] read-cache: use oideq() in ce_compare functions

2018-08-28 Thread Jeff King
These functions return the full oidcmp() value, but the callers really only care whether it is non-zero. We can use the more strict !oideq(), which a compiler may be able to optimize further. This does change the meaning of the return value subtly, but it's unlikely that anybody would try to use t

[PATCH v2 5/9] convert "oidcmp() != 0" to "!oideq()"

2018-08-28 Thread Jeff King
This is the flip side of the previous two patches: checking for a non-zero oidcmp() can be more strictly expressed as inequality. Like those patches, we write "!= 0" in the coccinelle transformation, which covers by isomorphism the more common: if (oidcmp(E1, E2)) As with the previous two patch

[PATCH v2 9/9] show_dirstat: simplify same-content check

2018-08-28 Thread Jeff King
We use two nested conditionals to store a content_changed variable, but only bother to look at the result once, directly after we set it. We can drop the variable entirely and just use a single "if". This needless complexity is the result of 2ff3a80334 (Teach --dirstat not to completely ignore rea

[PATCH v2 6/9] convert "hashcmp() != 0" to "!hasheq()"

2018-08-28 Thread Jeff King
This rounds out the previous three patches, covering the inequality logic for the "hash" variant of the functions. As with the previous three, the accompanying code changes are the mechanical result of applying the coccinelle patch; see those patches for more discussion. Signed-off-by: Jeff King

[PATCH v2 7/9] convert hashmap comparison functions to oideq()

2018-08-28 Thread Jeff King
The comparison functions used for hashmaps don't care about strict ordering; they only want to compare entries for equality. Let's use the oideq() function instead, which can potentially be better optimized. Note that unlike the previous patches mass-converting calls like "!oidcmp()", this patch co

[PATCH v2 4/9] convert "hashcmp() == 0" to hasheq()

2018-08-28 Thread Jeff King
This is the partner patch to the previous one, but covering the "hash" variants instead of "oid". Note that our coccinelle rule is slightly more complex to avoid triggering the call in hasheq(). I didn't bother to add a new rule to convert: - hasheq(E1->hash, E2->hash) + oideq(E1, E2) Since

[PATCH v2 2/9] introduce hasheq() and oideq()

2018-08-28 Thread Jeff King
The main comparison functions we provide for comparing object ids are hashcmp() and oidcmp(). These are more flexible than a strict equality check, since they also express ordering. That makes them useful for sorting and binary searching. However, it also makes them potentially slower than a strict

[PATCH v2 3/9] convert "oidcmp() == 0" to oideq()

2018-08-28 Thread Jeff King
Using the more restrictive oideq() should, in the long run, give the compiler more opportunities to optimize these callsites. For now, this conversion should be a complete noop with respect to the generated code. The result is also perhaps a little more readable, as it avoids the "zero is equal" i

[PATCH v2 1/9] coccinelle: use <...> for function exclusion

2018-08-28 Thread Jeff King
Sometimes we want to suppress a coccinelle transformation inside a particular function. For example, in finding conversions of hashcmp() to oidcmp(), we should not convert the call in oidcmp() itself, since that would cause infinite recursion. We write that like this: @@ identifier f != oidcmp

[PATCH] doc: Don't echo sed command for manpage-base-url.xsl

2018-08-28 Thread Tim Schumacher
Previously, the sed command for generating manpage-base-url.xsl was printed to the console when being run. For the purpose of silencing it, define a $(QUIET) variable which contains an '@' if verbose mode isn't enabled and which is empty otherwise. This just silences the command invocation without

Re: [PATCH 0/9] introducing oideq()

2018-08-28 Thread Jeff King
On Sun, Aug 26, 2018 at 08:56:21PM +, brian m. carlson wrote: > > Due to the simplicity of the current code and our inlining, the compiler > > can usually figure this out for now. So I wouldn't expect this patch to > > actually improve performance right away. But as that discussion shows, > >

[PATCH 5/9] worktree: disallow adding same path multiple times

2018-08-28 Thread Eric Sunshine
A given path should only ever be associated with a single registered worktree. This invariant is enforced by refusing to create a new worktree at a given path if that path already exists. For example: $ git worktree add -q --detach foo $ git worktree add -q --detach foo fatal: 'foo' al

[PATCH 4/9] worktree: prepare for more checks of whether path can become worktree

2018-08-28 Thread Eric Sunshine
Certain conditions must be met for a path to be a valid candidate as the location of a new worktree; for instance, the path must not exist or must be an empty directory. Although the number of conditions is small, new conditions will soon be added so factor out the existing checks into a separate f

[PATCH 9/9] worktree: delete .git/worktrees if empty after 'remove'

2018-08-28 Thread Eric Sunshine
For cleanliness, "git worktree prune" deletes the .git/worktrees directory if it is empty after pruning is complete. For consistency, make "git worktree remove " likewise delete .git/worktrees if it is empty after the removal. Signed-off-by: Eric Sunshine --- builtin/worktree.c | 8 +

[PATCH 6/9] worktree: teach 'add' to respect --force for registered but missing path

2018-08-28 Thread Eric Sunshine
For safety, "git worktree add " will refuse to add a new worktree at if is already associated with a worktree entry, even if is missing (for instance, has been deleted or resides on non-mounted removable media or network share). The typical way to re-create a worktree at in such a situation is

[PATCH 0/9] worktree: fix bugs and broaden --force applicability

2018-08-28 Thread Eric Sunshine
This series started as a fix for a bug reported by Peff[1] in which the "database" of worktrees could be corrupted (or at least become internally inconsistent) by having multiple worktree entries associated with the same path. Peff's particular use-case for git-worktree is Documentation/doc-diff w

[PATCH 7/9] worktree: teach 'move' to override lock when --force given twice

2018-08-28 Thread Eric Sunshine
For consistency with "add -f -f", which allows a missing but locked worktree path to be re-used, allow "move -f -f" to override a lock, as well, as a convenience. Signed-off-by: Eric Sunshine --- Documentation/git-worktree.txt | 3 +++ builtin/worktree.c | 13 + t/t2028-

[PATCH 3/9] worktree: generalize delete_git_dir() to reduce code duplication

2018-08-28 Thread Eric Sunshine
prune_worktrees() and delete_git_dir() both remove worktree administrative entries from .git/worktrees, and their implementations are nearly identical. The only difference is that prune_worktrees() is also capable of removing a bogus non-worktree-related file from .git/worktrees. Simplify by exten

[PATCH 8/9] worktree: teach 'remove' to override lock when --force given twice

2018-08-28 Thread Eric Sunshine
For consistency with "add -f -f" and "move -f -f" which override the lock on a worktree, allow "remove -f -f" to do so, as well, as a convenience. Signed-off-by: Eric Sunshine --- Documentation/git-worktree.txt | 1 + builtin/worktree.c | 11 ++- t/t2028-worktree-move.sh

[PATCH 1/9] worktree: don't die() in library function find_worktree()

2018-08-28 Thread Eric Sunshine
Callers don't expect library function find_worktree() to die(); they expect it to return the named worktree if found, or NULL if not. Although find_worktree() itself never invokes die(), it calls real_pathdup() with 'die_on_error' incorrectly set to 'true', thus will die() indirectly if the user-pr

[PATCH 2/9] worktree: move delete_git_dir() earlier in file for upcoming new callers

2018-08-28 Thread Eric Sunshine
This is a pure code movement to avoid having to forward-declare the function when new callers are subsequently added. Signed-off-by: Eric Sunshine --- builtin/worktree.c | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/builtin/worktree.c b/builti

Trivial enhancement: All commands which require an author should accept --author

2018-08-28 Thread Ulrich Gemkow
Hello, A trivial enhancement request: All commands which require that the author is set (and complain if it is not set) should accept the option --author. At least the command stash does not accept this option. We are using git version 2.17.1 (Ubuntu 18.04). Thanks for the great work! Best reg

Re: [PATCH v6] Implement --first-parent for git rev-list --bisect

2018-08-28 Thread Junio C Hamano
Junio C Hamano writes: > Johannes Schindelin writes: > >> I would have preferred to reuse the already existing commits generated in >> the `setup` phase rather than generating yet another batch, and to not >> introduce an inconsistent way to present a commit graph (compare your >> diagram with t

Re: [PATCH 1/1] commit-graph: define GIT_TEST_COMMIT_GRAPH

2018-08-28 Thread Stefan Beller
On Tue, Aug 28, 2018 at 1:33 PM Derrick Stolee via GitGitGadget wrote: > > From: Derrick Stolee > > The commit-graph feature is tested in isolation by > t5318-commit-graph.sh and t6600-test-reach.sh, but there are many > more interesting scenarios involving commit walks. Many of these > scenarios

Re: [PATCH 0/1] Define GIT_TEST_COMMIT_GRAPH for commit-graph test coverage

2018-08-28 Thread Stefan Beller
On Tue, Aug 28, 2018 at 1:33 PM Derrick Stolee via GitGitGadget wrote: > > The commit-graph (and multi-pack-index) features are optional data > structures that can make Git operations faster. Since they are optional, we > do not enable them in most Git tests. The commit-graph is tested in > t5318-

[PATCH 0/1] Define GIT_TEST_COMMIT_GRAPH for commit-graph test coverage

2018-08-28 Thread Derrick Stolee via GitGitGadget
The commit-graph (and multi-pack-index) features are optional data structures that can make Git operations faster. Since they are optional, we do not enable them in most Git tests. The commit-graph is tested in t5318-commit-graph.sh (and t6600-test-reach.sh in ds/reachable), but that one script can

[PATCH 1/1] commit-graph: define GIT_TEST_COMMIT_GRAPH

2018-08-28 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee The commit-graph feature is tested in isolation by t5318-commit-graph.sh and t6600-test-reach.sh, but there are many more interesting scenarios involving commit walks. Many of these scenarios are covered by the existing test suite, but we need to maintain coverage when the op

Re: [PATCH v4 4/6] tests: use shorter here-docs in chainlint.sed for AIX sed

2018-08-28 Thread Eric Sunshine
On Tue, Aug 28, 2018 at 4:14 PM Ævar Arnfjörð Bjarmason wrote: > On Fri, Aug 24 2018, Eric Sunshine wrote: > > Shortening the names makes them ugly and often unreadable. That's not > > a complaint with this patch; just a general observation regarding > > 8-byte limitation with this platform's "sed

Re: [PATCH v4 4/6] tests: use shorter here-docs in chainlint.sed for AIX sed

2018-08-28 Thread Ævar Arnfjörð Bjarmason
On Fri, Aug 24 2018, Eric Sunshine wrote: > On Fri, Aug 24, 2018 at 11:20 AM Ævar Arnfjörð Bjarmason > wrote: >> Improve the portability of chainlint by using shorter here-docs. On >> AIX sed will complain about: >> >> sed: 0602-417 The label :hereslurp is greater than eight >> characte

Re: [PATCH 02/21] read-cache.c: remove 'const' from index_has_changes()

2018-08-28 Thread Stefan Beller
> "r" it is! I forgot about it. But this is for local variable or > argument names only right? The field name (in diff_options for > example) should stay something more descriptive like repo, I think. Yea I agree, we should have more descriptive things in long lived structs. Thanks, Stefan

Re: Git clean removing tracked files semi-regularly

2018-08-28 Thread Derrick Stolee
On 8/28/2018 2:29 PM, Brennan Conroy wrote: I'm using windows. Have had it happen on 8.1 and 10. "git status" shows "nothing to commit, working tree clean". I am using git version 2.17.1.windows.2 I tested on my machine and could not reproduce this issue. Could you find a full repro (first c

Re: [PATCH 1/2] tests: fix non-portable "${var:-"str"}" construct

2018-08-28 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > On both AIX 7200-00-01-1543 and FreeBSD 11.2-RELEASE-p2 the > "${var:-"str"}" syntax means something different than what it does > under the bash or dash shells. > > Both will consider the start of the new unescaped quotes to be a new > argument to test_expect_s

Re: GIT_TRACE doesn't show content filter files it's operating on

2018-08-28 Thread Stas Bekman
On 2018-08-27 06:13 PM, Stas Bekman wrote: [...] > I now know how get the filenames for "clean/smudge" filters. Can you > please help with the same for "textconv". %f doesn't work - it gets > stuck there waiting for stdin, the following seems to pass, but I'm not > sure it's correct: On a closer l

[PATCH 1/2] tests: fix non-portable "${var:-"str"}" construct

2018-08-28 Thread Ævar Arnfjörð Bjarmason
On both AIX 7200-00-01-1543 and FreeBSD 11.2-RELEASE-p2 the "${var:-"str"}" syntax means something different than what it does under the bash or dash shells. Both will consider the start of the new unescaped quotes to be a new argument to test_expect_success, resulting in the following error:

[PATCH 0/2] FreeBSD & AIX test portability fixes

2018-08-28 Thread Ævar Arnfjörð Bjarmason
This makes the vanilla test suite pass without errors on the FreeBSD system noted in the commit messages. On AIX things are still horribly broken, but this fixes one more issue that also affects that system. Ævar Arnfjörð Bjarmason (2): tests: fix non-portable "${var:-"str"}" construct tests:

[PATCH 2/2] tests: fix non-portable iconv invocation

2018-08-28 Thread Ævar Arnfjörð Bjarmason
The iconv that comes with a FreeBSD 11.2-RELEASE-p2 box I have access to doesn't support the SHIFT-JIS encoding. Guard a test added in e92d62253 ("convert: add round trip check based on 'core.checkRoundtripEncoding'", 2018-04-15) first released with Git v2.18.0 with a prerequisite that checks for i

Re: Feature request: be able to pass arguments to difftool command

2018-08-28 Thread Junio C Hamano
"H.Merijn Brand" writes: > So, my wish would be to have an option, possibly using -- to pass > additional command line arguments to git difftool, so that > > $ git difftool $commit~1..$commit -- -m -v2 > > would pass the arguments after -- transparantly to ccdiff (in my case) At the syntax leve

Re: [PATCH 00/21] Kill the_index part 4

2018-08-28 Thread Duy Nguyen
On Mon, Aug 27, 2018 at 7:32 PM Stefan Beller wrote: > > Besides some small conflicts on 'pu', like the previous part, it also > > breaks 'pu' because of API changes. The fix is trivial though, just > > prepend the_repository as the first argument for the broken function > > calls. > > This sounds

Re: [PATCH 02/21] read-cache.c: remove 'const' from index_has_changes()

2018-08-28 Thread Duy Nguyen
On Mon, Aug 27, 2018 at 8:37 PM Stefan Beller wrote: > > On Sun, Aug 26, 2018 at 3:03 AM Nguyễn Thái Ngọc Duy > wrote: > > > > This function calls do_diff_cache() which eventually needs to set this > > "istate" to unpack_options->src_index (*). This is an unfornate fact > > unfortunate > > > dif

Re: [PATCH] read-cache.c: optimize reading index format v4

2018-08-28 Thread Duy Nguyen
On Mon, Aug 27, 2018 at 9:36 PM Junio C Hamano wrote: > > PS. I notice that v4 does not pad to align entries at 4 byte boundary > > like v2/v3. This could cause a slight slow down on x86 and segfault on > > some other platforms. > > Care to elaborate? > > Long time ago, we used to mmap and read di

Re: Contributor Summit planning

2018-08-28 Thread Jonathan Nieder
Jonathan Nieder wrote: > The current IRC experience might be a bit unrepresentative, due to > https://freenode.net/news/spam-shake: https://freenode.net/news/spambot-attack may be a better link. Thanks, Jonathan

Re: Contributor Summit planning

2018-08-28 Thread Jonathan Nieder
Hi Derrick, Derrick Stolee wrote: > A focused aside, since you brought up the online "standup": it seems the IRC > channel has been less than ideal, with people trying to participate but > having nickname issues or being muted. You also describe another issue: the > timing. Having a real-time dis

Re: [PATCH 2/2] submodule.c: warn about missing submodule git directories

2018-08-28 Thread Junio C Hamano
Stefan Beller writes: > This is the continuation of f2d48994dc1 (submodule.c: submodule_move_head > works with broken submodules, 2017-04-18), which tones down the case of > "broken submodule" in case of a missing git directory of the submodule to > be only a warning. After seeing this warning,

Re: [PATCH v1 00/25] RFC: structured logging

2018-08-28 Thread Jeff Hostetler
On 8/28/2018 1:38 PM, Junio C Hamano wrote: g...@jeffhostetler.com writes: From: Jeff Hostetler This RFC patch series adds structured logging to git. The motivation, ... Jeff Hostetler (25): structured-logging: design document structured-logging: add STRUCTURED_LOGGING=1 to Makefil

Re: [PATCH v6] Implement --first-parent for git rev-list --bisect

2018-08-28 Thread Junio C Hamano
Johannes Schindelin writes: > Hi Tiago, > > On Tue, 28 Aug 2018, Tiago Botelho wrote: > >> This will enable users to implement bisecting on first parents >> which can be useful for when the commits from a feature branch >> that we want to merge are not always tested. > > This message is still lac

RE: Git clean removing tracked files semi-regularly

2018-08-28 Thread Brennan Conroy
I'm using windows. Have had it happen on 8.1 and 10. "git status" shows "nothing to commit, working tree clean". I am using git version 2.17.1.windows.2 -Original Message- From: brian m. carlson Sent: Monday, August 27, 2018 5:58 PM To: Brennan Conroy Cc: git@vger.kernel.org Subject:

Re: [PATCH] add -p: coalesce hunks before testing applicability

2018-08-28 Thread Junio C Hamano
Jochen Sprickerhof writes: > When a hunk was split before being edited manually, it does not apply > anymore cleanly. Apply coalesce_overlapping_hunks() first to make it > work. Enable test for it as well. > > Signed-off-by: Jochen Sprickerhof > --- > git-add--interactive.perl | 8 >

Re: [PATCH v1 00/25] RFC: structured logging

2018-08-28 Thread Junio C Hamano
g...@jeffhostetler.com writes: > From: Jeff Hostetler > > This RFC patch series adds structured logging to git. The motivation, > ... > > Jeff Hostetler (25): > structured-logging: design document > structured-logging: add STRUCTURED_LOGGING=1 to Makefile > structured-logging: add structur

  1   2   >