Re: [PATCH] alloc: allow arbitrary repositories for alloc functions

2018-05-15 Thread Junio C Hamano
Stefan Beller writes: > We have to convert all of the alloc functions at once, because alloc_report > uses a funky macro for reporting. It is better for the sake of mechanical > conversion to convert multiple functions at once rather than changing the > structure of the

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

2018-05-15 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 v3 20/28] t4029: fix test indentation

2018-05-15 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 v3 18/28] t4020: abstract away SHA-1-specific constants

2018-05-15 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 | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/t/t4020-diff-external.sh

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

2018-05-15 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 | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/t/t4022-diff-rewrite.sh

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

2018-05-15 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 v3 12/28] t3103: abstract away SHA-1-specific constants

2018-05-15 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 v3 08/28] t1512: skip test if not using SHA-1

2018-05-15 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 v3 06/28] t0000: annotate with SHA1 prerequisite

2018-05-15 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 v3 16/28] t4008: abstract away SHA-1-specific constants

2018-05-15 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 v3 25/28] t4042: abstract away SHA-1-specific constants

2018-05-15 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 v3 22/28] t4030: abstract away SHA-1-specific constants

2018-05-15 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 v3 24/28] t4205: sort log output in a hash-independent way

2018-05-15 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 v3 28/28] t5300: abstract away SHA-1-specific constants

2018-05-15 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 v3 26/28] t4045: abstract away SHA-1-specific constants

2018-05-15 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 v3 23/28] t/lib-diff-alternative: abstract away SHA-1-specific constants

2018-05-15 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 v3 27/28] t4208: abstract away SHA-1-specific constants

2018-05-15 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 v3 17/28] t4014: abstract away SHA-1-specific constants

2018-05-15 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 | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/t/t4014-format-patch.sh

[PATCH v3 00/28] Hash-independent tests

2018-05-15 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 v3 07/28] t1007: annotate with SHA1 prerequisite

2018-05-15 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 v3 02/28] t/test-lib: introduce ZERO_OID

2018-05-15 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 v3 10/28] t: skip pack tests if not using SHA-1

2018-05-15 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 v3 04/28] t/test-lib: introduce OID_REGEX

2018-05-15 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 v3 03/28] t: switch $_z40 to $ZERO_OID

2018-05-15 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 v3 09/28] t4044: skip test if not using SHA-1

2018-05-15 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 v3 01/28] t/test-lib: add an SHA1 prerequisite

2018-05-15 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 v3 21/28] t4029: abstract away SHA-1-specific constants

2018-05-15 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 | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/t/t4029-diff-trailing-space.sh

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

2018-05-15 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 v3 11/28] t2203: abstract away SHA-1-specific constants

2018-05-15 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 v3 14/28] t3905: abstract away SHA-1-specific constants

2018-05-15 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

Re: [PATCH 3/3] Inform about fast-forwarding of submodules during merge

2018-05-15 Thread Junio C Hamano
Stefan Beller writes: > From: Leif Middelschulte > > Inform the user about an automatically fast-forwarded submodule. The > silent merge behavior was introduced by commit 68d03e4a6e44 ("Implement > automatic fast-forward merge for submodules",

Re: [PATCH 3/3] Inform about fast-forwarding of submodules during merge

2018-05-15 Thread Junio C Hamano
Stefan Beller writes: > From: Leif Middelschulte > Subject: merge-recursive: give notice when submodule commit gets fast-forwarded perhaps? > /* Case #1: a is contained in b or vice versa */ > if (in_merge_bases(commit_a,

Re: [PATCH 3/3] Inform about fast-forwarding of submodules during merge

2018-05-15 Thread Elijah Newren
On Tue, May 15, 2018 at 1:00 PM, Stefan Beller wrote: > From: Leif Middelschulte > > Inform the user about an automatically fast-forwarded submodule. The > silent merge behavior was introduced by commit 68d03e4a6e44 ("Implement > automatic

Re: [PATCH 2/3] merge-recursive: i18n submodule merge output and respect verbosity

2018-05-15 Thread Junio C Hamano
Stefan Beller writes: > +static int merge_submodule(struct merge_options *o, > +struct object_id *result, const char *path, > const struct object_id *base, const struct object_id > *a, > -const struct

Re: [PATCH 01/35] refspec: move refspec parsing logic into its own file

2018-05-15 Thread Junio C Hamano
Brandon Williams writes: > On 05/15, Junio C Hamano wrote: >> Brandon Williams writes: >> >> > In preperation for performing a refactor on refspec related code, move >> >> Preparation? > > Oops, I'll fix that. Thanks. And sorry for forcing you to page

Re: [PATCH] grep: handle corrupt index files early

2018-05-15 Thread Junio C Hamano
Stefan Beller writes: > Any other caller of 'repo_read_index' dies upon a negative return of > it, so grep should, too. Makes sense. When the function returns a failure, there is no sensible fallback action anyway, so dying here is alright. Will queue; thanks. > >

[PATCH 04/19] commit: add repository argument to register_commit_graft

2018-05-15 Thread Stefan Beller
From: Jonathan Nieder Add a repository argument to allow callers of register_commit_graft to be more specific about which repository to handle. This is a small mechanical change; it doesn't change the implementation to handle repositories other than the_repository yet. As

[PATCH 03/19] commit: add repository argument to commit_graft_pos

2018-05-15 Thread Stefan Beller
From: Jonathan Nieder Add a repository argument to allow callers of commit_graft_pos to be more specific about which repository to handle. This is a small mechanical change; it doesn't change the implementation to handle repositories other than the_repository yet. As with

[PATCH 11/19] shallow: add repository argument to is_repository_shallow

2018-05-15 Thread Stefan Beller
Signed-off-by: Stefan Beller --- builtin/fetch.c| 2 +- builtin/pack-objects.c | 4 ++-- builtin/prune.c| 2 +- builtin/rev-parse.c| 3 ++- commit.c | 2 +- commit.h | 3 ++- fetch-pack.c | 4 ++-- send-pack.c

[PATCH 10/19] shallow: add repository argument to check_shallow_file_for_update

2018-05-15 Thread Stefan Beller
Signed-off-by: Stefan Beller --- shallow.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/shallow.c b/shallow.c index 0fadd5330d2..0028e4ea776 100644 --- a/shallow.c +++ b/shallow.c @@ -217,7 +217,8 @@ struct commit_list

[PATCH 07/19] commit: add repository argument to lookup_commit_graft

2018-05-15 Thread Stefan Beller
From: Jonathan Nieder Add a repository argument to allow callers of lookup_commit_graft to be more specific about which repository to handle. This is a small mechanical change; it doesn't change the implementation to handle repositories other than the_repository yet. As with

[PATCH 17/19] shallow: migrate shallow information into the object parser

2018-05-15 Thread Stefan Beller
Signed-off-by: Stefan Beller --- commit.h | 9 +++-- object.c | 3 +++ object.h | 4 shallow.c | 50 -- 4 files changed, 34 insertions(+), 32 deletions(-) diff --git a/commit.h b/commit.h index

[PATCH 13/19] commit: convert register_commit_graft to handle arbitrary repositories

2018-05-15 Thread Stefan Beller
From: Brandon Williams Signed-off-by: Brandon Williams Signed-off-by: Stefan Beller --- commit.c | 29 +++-- commit.h | 3 +-- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/commit.c

[PATCH 08/19] shallow: add repository argument to set_alternate_shallow_file

2018-05-15 Thread Stefan Beller
Signed-off-by: Stefan Beller --- commit.h | 3 ++- environment.c | 2 +- git.c | 2 +- shallow.c | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/commit.h b/commit.h index f6746125766..f88c854e2f6 100644 --- a/commit.h +++ b/commit.h @@

[PATCH 14/19] commit: convert read_graft_file to handle arbitrary repositories

2018-05-15 Thread Stefan Beller
From: Brandon Williams Signed-off-by: Brandon Williams Signed-off-by: Stefan Beller --- commit.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/commit.c b/commit.c index 8a2ab53fc67..3fcb2fd66ce 100644 ---

[PATCH 01/19] object-store: move object access functions to object-store.h

2018-05-15 Thread Stefan Beller
This should make these functions easier to find and cache.h less overwhelming to read. In particular, this moves: - read_object_file - oid_object_info - write_object_file As a result, most of the codebase needs to #include object-store.h. In this patch the #include is only added to files that

[PATCH 18/19] commit: allow prepare_commit_graft to handle arbitrary repositories

2018-05-15 Thread Stefan Beller
Signed-off-by: Stefan Beller --- commit.c | 14 ++ object.h | 2 ++ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/commit.c b/commit.c index 24028fd257a..eef1675d692 100644 --- a/commit.c +++ b/commit.c @@ -196,19 +196,17 @@ static int

[PATCH 19/19] commit: allow lookup_commit_graft to handle arbitrary repositories

2018-05-15 Thread Stefan Beller
Signed-off-by: Stefan Beller --- commit.c | 8 commit.h | 3 +-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/commit.c b/commit.c index eef1675d692..b01cc0c3e0c 100644 --- a/commit.c +++ b/commit.c @@ -209,14 +209,14 @@ static void

[PATCH 12/19] commit: convert commit_graft_pos() to handle arbitrary repositories

2018-05-15 Thread Stefan Beller
From: Brandon Williams Signed-off-by: Brandon Williams Signed-off-by: Stefan Beller --- commit.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/commit.c b/commit.c index 684eeaa2ccd..0ec3d22813a 100644 ---

[PATCH 15/19] cache: convert get_graft_file to handle arbitrary repositories

2018-05-15 Thread Stefan Beller
Signed-off-by: Stefan Beller --- cache.h | 2 +- commit.c | 2 +- environment.c | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cache.h b/cache.h index ab716011b7e..cb1aeb1dcbf 100644 --- a/cache.h +++ b/cache.h @@ -476,7 +476,7 @@ extern

[PATCH 16/19] path.c: migrate git_path_ to take a repository argument

2018-05-15 Thread Stefan Beller
Signed-off-by: Stefan Beller --- blame.c | 8 +--- branch.c | 14 +++--- builtin/commit.c | 38 +++--- builtin/fetch.c | 4 ++-- builtin/merge.c | 37 +++-- builtin/pull.c | 4

[PATCH 09/19] shallow: add repository argument to register_shallow

2018-05-15 Thread Stefan Beller
Signed-off-by: Stefan Beller --- builtin/pack-objects.c | 2 +- builtin/receive-pack.c | 2 +- commit.h | 3 ++- fetch-pack.c | 2 +- shallow.c | 4 ++-- upload-pack.c | 7 --- 6 files changed, 11 insertions(+), 9 deletions(-)

[RFC PATCH 00/19] object store: grafts and shallow.

2018-05-15 Thread Stefan Beller
This applies on top of sb/object-store-alloc[1], and is the next part of the object store series. I think we're getting close to actually being done in the object store series, as the next series to build on top of this will convert the lookup_{object, commit, ...} functions. However I marked

[PATCH 05/19] commit: add repository argument to read_graft_file

2018-05-15 Thread Stefan Beller
From: Jonathan Nieder Add a repository argument to allow the caller of read_graft_file to be more specific about which repository to handle. This is a small mechanical change; it doesn't change the implementation to handle repositories other than the_repository yet. As with

[PATCH 02/19] object: move grafts to object parser

2018-05-15 Thread Stefan Beller
From: Jonathan Nieder Grafts are only meaningful in the context of a single repository. Therefore they cannot be global. Signed-off-by: Stefan Beller Signed-off-by: Jonathan Nieder --- commit.c | 42

[PATCH 06/19] commit: add repository argument to prepare_commit_graft

2018-05-15 Thread Stefan Beller
From: Jonathan Nieder Add a repository argument to allow the caller of prepare_commit_graft to be more specific about which repository to handle. This is a small mechanical change; it doesn't change the implementation to handle repositories other than the_repository yet. As

[PATCH] alloc: allow arbitrary repositories for alloc functions

2018-05-15 Thread Stefan Beller
We have to convert all of the alloc functions at once, because alloc_report uses a funky macro for reporting. It is better for the sake of mechanical conversion to convert multiple functions at once rather than changing the structure of the reporting function. We record all memory allocation in

What would travis do?

2018-05-15 Thread Stefan Beller
Hi, in a context unrelated to Git, I found https://github.com/grosser/wwtd ("What would travis do?"), which may be interesting for those who tweak the travis file. Just for your information, Stefan

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

2018-05-15 Thread Martin Ågren
On 11 May 2018 at 23:15, Derrick Stolee wrote: I finally sat down today and familiarized myself with the commit-graph code a little. My biggest surprise was when I noticed that there is a hash checksum at the end of the commit-graph-file. That in combination with the tests

Re: [PATCHv2 0/3] Reroll of sb/submodule-merge-in-merge-recursive

2018-05-15 Thread Stefan Beller
On Tue, May 15, 2018 at 1:15 PM, Leif Middelschulte wrote: > Hello Stefan, > > thank you once again for your effort. > > Am 15. Mai 2018 um 22:00:34, Stefan Beller > (sbel...@google.com(mailto:sbel...@google.com)) schrieb: > >> This rerolls the two commits found at

Re: [PATCHv2 0/3] Reroll of sb/submodule-merge-in-merge-recursive

2018-05-15 Thread Leif Middelschulte
Hello Stefan, thank you once again for your effort. Am 15. Mai 2018 um 22:00:34, Stefan Beller (sbel...@google.com(mailto:sbel...@google.com)) schrieb: > This rerolls the two commits found at [1] with the feedback of Eliah > and puts Leifs patch[2] on top, that I edited according to Eliahs

Re: [PATCH] git-submodule.sh: try harder to fetch a submodule

2018-05-15 Thread Jonathan Nieder
Stefan Beller wrote: > I'll resend it with a warning (using say()). Thanks, makes sense. > I think we have 2 bugs and this is merely fixing the second bug. I'm fearing that there are more than two. [...] > $ git init confused-head > $ (cd confused-head && git branch test \ > $(git

Re: [PATCHv2 0/3] Reroll of sb/submodule-merge-in-merge-recursive

2018-05-15 Thread Stefan Beller
And I resent two of my earlier patches, please ignore those (0001-grep-handle-corrupt-index-files-early.patch and 0001-git-submodule.sh-try-harder-to-fetch-a-submodule.patch) Stefan

[PATCH 1/3] submodule.c: move submodule merging to merge-recursive.c

2018-05-15 Thread Stefan Beller
In a later patch we want to improve submodule merging by using the output() function in merge-recursive.c for submodule merges to deliver a consistent UI to users. To do so we could either make the output() function globally available so we can use it in submodule.c#merge_submodule(), or we could

[PATCH] grep: handle corrupt index files early

2018-05-15 Thread Stefan Beller
Any other caller of 'repo_read_index' dies upon a negative return of it, so grep should, too. Signed-off-by: Stefan Beller --- Found while reviewing the series https://public-inbox.org/git/20180514105823.8378-1-...@ao2.it/ builtin/grep.c | 3 ++- 1 file changed, 2

[PATCH 2/3] merge-recursive: i18n submodule merge output and respect verbosity

2018-05-15 Thread Stefan Beller
The submodule merge code now uses the output() function that is used by all the rest of the merge-recursive-code. This allows for respecting internationalisation as well as the verbosity setting. Signed-off-by: Stefan Beller --- merge-recursive.c | 33

[PATCH 3/3] Inform about fast-forwarding of submodules during merge

2018-05-15 Thread Stefan Beller
From: Leif Middelschulte Inform the user about an automatically fast-forwarded submodule. The silent merge behavior was introduced by commit 68d03e4a6e44 ("Implement automatic fast-forward merge for submodules", 2010-07-07)). Signed-off-by: Leif Middelschulte

[PATCH] git-submodule.sh: try harder to fetch a submodule

2018-05-15 Thread Stefan Beller
This is the logical continuum of fb43e31f2b4 (submodule: try harder to fetch needed sha1 by direct fetching sha1, 2016-02-23) and fixes it as some assumptions were not correct. The commit states: > If $sha1 was not part of the default fetch ... fail ourselves here > assumes that the

[PATCHv2 0/3] Reroll of sb/submodule-merge-in-merge-recursive

2018-05-15 Thread Stefan Beller
This rerolls the two commits found at [1] with the feedback of Eliah and puts Leifs patch[2] on top, that I edited according to Eliahs feedback, but kept Leifs ownership. This has addressed all of Eliahs feedback AFAICT. You'll find a branch-diff below[3], which lacks the new patch of Leif in

[PATCH] git-submodule.sh: try harder to fetch a submodule

2018-05-15 Thread Stefan Beller
This is the logical continuum of fb43e31f2b4 (submodule: try harder to fetch needed sha1 by direct fetching sha1, 2016-02-23) and fixes it as some assumptions were not correct. The commit states: > If $sha1 was not part of the default fetch ... fail ourselves here > assumes that the

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

2018-05-15 Thread René Scharfe
Am 14.05.2018 um 03:37 schrieb Junio C Hamano: > René Scharfe writes: > >> Storing integer values in pointers is a trick that seems to have worked >> so far for fast-export. A portable way to avoid that trick without >> requiring more memory would be to use a union. >> >> Or we

Re: [PATCH] git-submodule.sh: try harder to fetch a submodule

2018-05-15 Thread Stefan Beller
On Fri, May 11, 2018 at 5:03 PM, Junio C Hamano wrote: >> A more typical example would be if the ref simply doesn't exist (i.e., >> is a branch yet to be born). > > Indeed this is interesting. At first glance I thought this was > about underlying "git clone" failing to grab

Re: [PATCH 04/35] refspec: introduce struct refspec

2018-05-15 Thread Brandon Williams
On 05/15, Junio C Hamano wrote: > Brandon Williams writes: > > > diff --git a/refspec.h b/refspec.h > > index 173cea882..f6fb251f3 100644 > > --- a/refspec.h > > +++ b/refspec.h > > @@ -20,4 +20,29 @@ struct refspec_item *parse_push_refspec(int nr_refspec, > > const char

Re: [PATCH 03/35] refspec: rename struct refspec to struct refspec_item

2018-05-15 Thread Brandon Williams
On 05/15, Junio C Hamano wrote: > Brandon Williams writes: > > > In preperation for introducing an abstraction around a collection of > > refspecs (much like how a 'struct pathspec' is a collection of 'struct > > pathspec_item's) rename the existing 'struct refspec' to 'struct

Re: git diff: meaning of ^M at line ends ?

2018-05-15 Thread Frank Schäfer
Am 14.05.2018 um 20:13 schrieb Torsten Bögershausen: > ^M is the representation of a "Carriage Return" or CR. > Under Linux/Unix/Mac OS X a line is terminated with a single > "line feed", LF. > > Windows typically uses CRLF at the end of the line. > "git diff" uses the LF to detect the end of

Re: [PATCH 00/35] refactoring refspecs

2018-05-15 Thread Brandon Williams
On 05/15, Ævar Arnfjörð Bjarmason wrote: > > On Mon, May 14 2018, Brandon Williams wrote: > > > When working on protocol v2 I noticed that working with refspecs was a > > little difficult because of the various api's that existed. Some > > functions expected an array of "const char *" while

Re: [PATCH 14/35] remote: convert fetch refspecs to struct refspec

2018-05-15 Thread Brandon Williams
On 05/15, Ævar Arnfjörð Bjarmason wrote: > > On Mon, May 14 2018, Brandon Williams wrote: > > > void add_prune_tags_to_fetch_refspec(struct remote *remote) > > { > > - int nr = remote->fetch_refspec_nr; > > - int bufsize = nr + 1; > > - int size = sizeof(struct refspec_item); > > - > >

Re: [PATCH] grep: handle corrupt index files early

2018-05-15 Thread Brandon Williams
On 05/14, Stefan Beller wrote: > Any other caller of 'repo_read_index' dies upon a negative return of > it, so grep should, too. > > Signed-off-by: Stefan Beller > --- > > Found while reviewing the series > https://public-inbox.org/git/20180514105823.8378-1-...@ao2.it/ > >

Re: [PATCH 35/35] submodule: convert push_unpushed_submodules to take a struct refspec

2018-05-15 Thread Brandon Williams
On 05/15, Ævar Arnfjörð Bjarmason wrote: > > On Mon, May 14 2018, Brandon Williams wrote: > > > Convert 'push_unpushed_submodules()' to take a 'struct refspec' as a > > parameter instead of an array of 'const char *'. > > [...] > > diff --git a/submodule.h b/submodule.h > > index

Re: [PATCH 35/35] submodule: convert push_unpushed_submodules to take a struct refspec

2018-05-15 Thread Stefan Beller
On Tue, May 15, 2018 at 1:11 AM, Ævar Arnfjörð Bjarmason wrote: > > On Mon, May 14 2018, Brandon Williams wrote: > >> Convert 'push_unpushed_submodules()' to take a 'struct refspec' as a >> parameter instead of an array of 'const char *'. >> [...] >> diff --git a/submodule.h

Re: [PATCH 01/35] refspec: move refspec parsing logic into its own file

2018-05-15 Thread Brandon Williams
On 05/15, Junio C Hamano wrote: > Brandon Williams writes: > > > In preperation for performing a refactor on refspec related code, move > > Preparation? Oops, I'll fix that. -- Brandon Williams

Re: [PATCH] grep: handle corrupt index files early

2018-05-15 Thread Stefan Beller
On Tue, May 15, 2018 at 6:13 AM, Duy Nguyen wrote: > On Tue, May 15, 2018 at 3:04 AM, Stefan Beller wrote: >> Any other caller of 'repo_read_index' dies upon a negative return of >> it, so grep should, too. >> >> Signed-off-by: Stefan Beller

Re: [PATCH] grep: handle corrupt index files early

2018-05-15 Thread Duy Nguyen
On Tue, May 15, 2018 at 3:04 AM, Stefan Beller wrote: > Any other caller of 'repo_read_index' dies upon a negative return of > it, so grep should, too. > > Signed-off-by: Stefan Beller > --- > > Found while reviewing the series >

[no subject]

2018-05-15 Thread Joseph Obieke
¿Todo lo que necesito es una persona honesta en quien pueda confiar? ¿Puedo confiar en que transfiera la suma de $ 12.500.000.00 millones de dólares estadounidenses a su cuenta si es posible, contáctenos para obtener más detalles a través de mi dirección de correo electrónico privada

Re: [PATCH] grep: handle corrupt index files early

2018-05-15 Thread Johannes Schindelin
Hi Stefan, On Mon, 14 May 2018, Stefan Beller wrote: > Any other caller of 'repo_read_index' dies upon a negative return of > it, so grep should, too. > > Signed-off-by: Stefan Beller > --- > > Found while reviewing the series >

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

2018-05-15 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

[PATCHv3 0/1] git-p4 unshelve

2018-05-15 Thread Luke Diamand
This is a git-p4 unshelve command which detects when extra changes are going to be included, and refuses to unhshelve. As in my earlier unshelve change, this uses git fast-import to do the actual delta generation, but now checks to see if the files unshelved are based on the same revisions that

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

2018-05-15 Thread Johannes Schindelin
Hi Kuba, On Mon, 14 May 2018, Jakub Narebski wrote: > [... lots and lots of discussions...] > > All right. > > Here is my [allegedly] improved version, which assumes that we always > want to start from commit with maximum generation number (there may be > more than one such commit). > > Let's

Re: [PATCH 05/35] refspec: convert valid_fetch_refspec to use parse_refspec

2018-05-15 Thread Junio C Hamano
Brandon Williams writes: > Convert 'valid_fetch_refspec()' to use the new 'parse_refspec()' > function to only parse a single refspec an eliminate an allocation. s/an/and/, perhaps? > -int valid_fetch_refspec(const char *fetch_refspec_str) > -{ > - struct refspec_item

Re: [PATCH 04/35] refspec: introduce struct refspec

2018-05-15 Thread Junio C Hamano
Brandon Williams writes: > diff --git a/refspec.h b/refspec.h > index 173cea882..f6fb251f3 100644 > --- a/refspec.h > +++ b/refspec.h > @@ -20,4 +20,29 @@ struct refspec_item *parse_push_refspec(int nr_refspec, > const char **refspec); > > void free_refspec(int nr_refspec,

Re: [PATCH v1 2/8] Add initial odb remote support

2018-05-15 Thread Ævar Arnfjörð Bjarmason
On Sun, May 13 2018, Christian Couder wrote: > "sha1_file.c"[...] sha1-file.c these days :)

Re: [PATCH 00/35] refactoring refspecs

2018-05-15 Thread Ævar Arnfjörð Bjarmason
On Mon, May 14 2018, Brandon Williams wrote: > When working on protocol v2 I noticed that working with refspecs was a > little difficult because of the various api's that existed. Some > functions expected an array of "const char *" while others expected an > array of "struct refspec". In all

Re: [PATCH 14/35] remote: convert fetch refspecs to struct refspec

2018-05-15 Thread Ævar Arnfjörð Bjarmason
On Mon, May 14 2018, Brandon Williams wrote: > void add_prune_tags_to_fetch_refspec(struct remote *remote) > { > - int nr = remote->fetch_refspec_nr; > - int bufsize = nr + 1; > - int size = sizeof(struct refspec_item); > - > - remote->fetch = xrealloc(remote->fetch, size *

Re: could `git merge --no-ff origin/master` be made more useful?

2018-05-15 Thread demerphq
On 15 May 2018 at 00:58, Ævar Arnfjörð Bjarmason wrote: > > On Mon, May 14 2018, demerphq wrote: > >> The first time I tried to use --no-ff I tried to do something like this: >> >> git checkout master >> git commit -a -m'whatever' >> git commit -a -m'whatever2' >> git

Re: [PATCH 03/35] refspec: rename struct refspec to struct refspec_item

2018-05-15 Thread Junio C Hamano
Brandon Williams writes: > In preperation for introducing an abstraction around a collection of > refspecs (much like how a 'struct pathspec' is a collection of 'struct > pathspec_item's) rename the existing 'struct refspec' to 'struct > refspec_item'. Makes sense. > /* See

Re: [PATCH 35/35] submodule: convert push_unpushed_submodules to take a struct refspec

2018-05-15 Thread Ævar Arnfjörð Bjarmason
On Mon, May 14 2018, Brandon Williams wrote: > Convert 'push_unpushed_submodules()' to take a 'struct refspec' as a > parameter instead of an array of 'const char *'. > [...] > diff --git a/submodule.h b/submodule.h > index e5526f6aa..aae0c9c8f 100644 > --- a/submodule.h > +++ b/submodule.h > @@

Re: [PATCH 01/35] refspec: move refspec parsing logic into its own file

2018-05-15 Thread Junio C Hamano
Brandon Williams writes: > In preperation for performing a refactor on refspec related code, move Preparation? > the refspec parsing logic into its own file. > > Signed-off-by: Brandon Williams > --- > Makefile| 1 + > branch.c

Re: [PATCH 00/35] refactoring refspecs

2018-05-15 Thread Junio C Hamano
Brandon Williams writes: > This series refactors how refspecs are handled through out the code base > by renaming the existing struct refspec to refspec_item and introducing > a new 'struct refspec' which is a container of refspec_items, much like > how a pathspec contains

Re: [PATCH 1/1] Inform about fast-forwarding of submodules during merge

2018-05-15 Thread Junio C Hamano
Elijah Newren writes: > Hi Leif, > > On Mon, May 14, 2018 at 1:57 PM, Leif Middelschulte > wrote: > > Thanks for updating the patch on top of Stefan's series. :-) > >> /* Case #1: a is contained in b or vice versa */ >> if