Re: RFC v3: Another proposed hash function transition plan

2017-09-18 Thread Jonathan Nieder
Hi, Gilles Van Assche wrote: > Hi Johannes, >> SHA-256 got much more cryptanalysis than SHA3-256 […]. > > I do not think this is true. Keccak/SHA-3 actually got (and is still > getting) a lot of cryptanalysis, with papers published at renowned > crypto conferences [1]. > > Keccak/SHA-3 is recogni

Re: [PATCH v2] git-svn: Fix svn.pushmergeinfo handling of svn+ssh usernames.

2017-09-15 Thread Jonathan Nieder
ot; > > So, let's call remove_username (as we do for svn info) before comparing > rooturl to branchurl. > > Signed-off-by: Jason Merrill > Reviewed-by: Jonathan Nieder > --- > git-svn.perl | 1 + > 1 file changed, 1 insertion(+) This is indeed Reviewed-by: Jonathan Nieder th

Re: [PATCH] Fix merge parent checking with svn.pushmergeinfo.

2017-09-15 Thread Jonathan Nieder
Jason Merrill wrote: > On Fri, Sep 15, 2017 at 1:52 PM, Jonathan Nieder wrote: > > Jason Merrill wrote: >>> Subject: Fix merge parent checking with svn.pushmergeinfo. >>> >>> Without this fix, svn dcommit of a merge with svn.pushmergeinfo set would >>&g

Re: [PATCH] for_each_string_list_item(): behave correctly for empty list

2017-09-15 Thread Jonathan Nieder
Hi, Michael Haggerty wrote: > If you pass a newly-initialized or newly-cleared `string_list` to > `for_each_string_list_item()`, then the latter does > > for ( > item = (list)->items; /* note, this is NULL */ > item < (list)->items + (list)->nr; /* note: NULL + 0 */ >

Re: [PATCH] Fix merge parent checking with svn.pushmergeinfo.

2017-09-15 Thread Jonathan Nieder
Hi, Jason Merrill wrote: > Subject: Fix merge parent checking with svn.pushmergeinfo. > > Without this fix, svn dcommit of a merge with svn.pushmergeinfo set would > get error messages like "merge parent for is on branch > svn+ssh://gcc.gnu.org/svn/gcc/trunk, which is not under the git-svn root

Re: [PATCH 0/3] Improve abbreviation disambiguation

2017-09-15 Thread Jonathan Nieder
Hi, Derrick Stolee wrote: > This is my first patch submission, and I look forward to your feedback. Thanks for writing this. Looks exciting. [...] > When displaying object ids, we frequently want to see an abbreviation [etc] > Note that performance improves in all cases, but the performance ga

Re: RFC v3: Another proposed hash function transition plan

2017-09-14 Thread Jonathan Nieder
Johannes Schindelin wrote: > On Wed, 13 Sep 2017, Jonathan Nieder wrote: >> As a side note, I am probably misreading, but I found this set of >> paragraphs a bit condescending. It sounds to me like you are saying >> "You are making the wrong choice of hash function and

Re: RFC v3: Another proposed hash function transition plan

2017-09-14 Thread Jonathan Nieder
Hi, Johannes Schindelin wrote: > On Wed, 13 Sep 2017, Jonathan Nieder wrote: >> [3] https://www.imperialviolet.org/2017/05/31/skipsha3.html, > > I had read this short after it was published, and had missed the updates. > One link in particular caught my eye: > >

Re: [PATCH v2] test-lib: don't use ulimit in test prerequisites on cygwin

2017-09-14 Thread Jonathan Nieder
LIMIT and ULIMIT_FILE_DESCRIPTORS prerequisites. > > Signed-off-by: Ramsay Jones > --- > t/t1400-update-ref.sh | 5 - > t/t6120-describe.sh | 1 - > t/t7004-tag.sh| 1 - > t/test-lib.sh | 10 -- > 4 files changed, 12 insertions(+), 5 deletions(-) Reviewed-by: Jonathan Nieder Thank you.

Re: RFC v3: Another proposed hash function transition plan

2017-09-13 Thread Jonathan Nieder
Hi, Yves wrote: > On 13 September 2017 at 14:05, Johannes Schindelin >> For example, I am still in favor of SHA-256 over SHA3-256, after learning >> some background details from in-house cryptographers: it provides >> essentially the same level of security, according to my sources, while >> hardw

Re: RFC v3: Another proposed hash function transition plan

2017-09-13 Thread Jonathan Nieder
Junio C Hamano wrote: > In the proposed transition plan, the treatment of various signatures > (deliberately) makes the conversion not quite roundtrip. That's not precisely true. Details below. > When existing SHA-1 history in individual clones are converted to > NewHash, we obviously cannot re

Re: RFC v3: Another proposed hash function transition plan

2017-09-13 Thread Jonathan Nieder
Hi, Stefan Beller wrote: > On Wed, Sep 13, 2017 at 2:52 PM, Junio C Hamano wrote: >> This is a tangent, but it may be fine for a shallow clone to treat >> the cut-off points in the history as if they are root commits and >> compute generation numbers locally, just like everybody else does. [...]

Re: [PATCH 7/7] config: flip return value of store_write_*()

2017-09-13 Thread Jonathan Nieder
ike the following (as a patch to squash in): With or without that tweak, Reviewed-by: Jonathan Nieder diff --git i/config.c w/config.c index 272a32aac0..8f92d452bf 100644 --- i/config.c +++ w/config.c @@ -2297,11 +2297,10 @@ static int write_error(const char *filename) return 4; } -stat

Re: [PATCH 6/7] notes-merge: use ssize_t for write_in_full() return value

2017-09-13 Thread Jonathan Nieder
sented in "long" and "unsigned > long", and if your size_t is larger than a "long" (as it is > on 64-bit Windows). > > Signed-off-by: Jeff King > --- > notes-merge.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Yikes. Good catch.

Re: [PATCH 5/7] pkt-line: check write_in_full() errors against "< 0"

2017-09-13 Thread Jonathan Nieder
hese > conditionals to our usual style. > > Signed-off-by: Jeff King > --- > pkt-line.c | 29 ++--- > 1 file changed, 14 insertions(+), 15 deletions(-) Reviewed-by: Jonathan Nieder

Re: [PATCH 4/7] convert less-trivial versions of "write_in_full() != len"

2017-09-13 Thread Jonathan Nieder
s/files-backend.c | 2 +- > streaming.c | 2 +- > 3 files changed, 5 insertions(+), 4 deletions(-) Reviewed-by: Jonathan Nieder

Re: [PATCH 3/7] avoid "write_in_full(fd, buf, len) != len" pattern

2017-09-13 Thread Jonathan Nieder
| 6 +++--- > refs.c | 2 +- > refs/files-backend.c | 8 > rerere.c | 2 +- > shallow.c | 6 +++--- > t/helper/test-delta.c | 2 +- > transport-helper.c | 5 ++--- > wrapper.c | 2 +- > 16 files changed, 26 insertions(+), 27 deletions(-) All of these look correctly done. Reviewed-by: Jonathan Nieder

Re: [PATCH 2/7] get-tar-commit-id: check write_in_full() return against 0

2017-09-13 Thread Jonathan Nieder
this_much_i_mean_it and read_this_much_or_to_eof. Anyway, I think the below is an improvement. With or without this tweak, Reviewed-by: Jonathan Nieder Thanks. diff --git i/builtin/get-tar-commit-id.c w/builtin/get-tar-commit-id.c index 6d9a79f9b3..03ef7c5ba4 100644 --- i/builtin/get-tar-commit-id.c +

Re: [PATCH v2] config: avoid "write_in_full(fd, buf, len) < len" pattern

2017-09-13 Thread Jonathan Nieder
Jeff King wrote: > AFAIK there's no way to turn it on for specific functions, but I'm far > from a gcc-warning guru. Even if you could, though, the error may be far > from the function (e.g., if we store the result in an ssize_t and then > compare that with a size_t). It turns out that yes, we ha

Re: [PATCH] test-lib: don't use ulimit in test prerequisites on cygwin

2017-09-13 Thread Jonathan Nieder
; CMDLINE_LIMIT and ULIMIT_FILE_DESCRIPTORS prerequisites. > > Signed-off-by: Ramsay Jones > --- > t/t1400-update-ref.sh | 11 ++- > t/t6120-describe.sh | 1 - > t/t7004-tag.sh| 1 - > t/test-lib.sh | 22 -- > 4 files changed, 30 inse

Re: [PATCH v2] config: avoid "write_in_full(fd, buf, len) < len" pattern

2017-09-13 Thread Jonathan Nieder
Jeff King wrote: > On Wed, Sep 13, 2017 at 11:24:31AM -0700, Jonathan Nieder wrote: >> Compilers' signed/unsigned comparison warning can be noisy, but I'm >> starting to feel it's worth the suppression noise to turn it on when >> DEVELOPER=1 anyway. What do y

Re: [PATCH 8/7] read_pack_header: handle signed/unsigned comparison in read result

2017-09-13 Thread Jonathan Nieder
RROR tp represent our case. > And anyway, this function reads from pipes and network > sockets. A network error may racily appear as EOF to us > anyway if there's data left in the socket buffers. > > Signed-off-by: Jeff King > --- > sha1_file.c | 2 +- > 1 file changed

Re: [PATCH v2] config: avoid "write_in_full(fd, buf, len) < len" pattern

2017-09-13 Thread Jonathan Nieder
een > two size_t variables, making the result an unsigned size_t. > We can fix this by just checking for a negative return value > directly, as write_in_full() will never return any value > except -1 or the full count. [...] > Reported-by: demerphq > Signed-off-by: Jeff King >

Re: [PATCH 1/7] config: avoid "write_in_full(fd, buf, len) < len" pattern

2017-09-13 Thread Jonathan Nieder
Jeff King wrote: > On Wed, Sep 13, 2017 at 10:47:28AM -0700, Jonathan Nieder wrote: >> Jeff King wrote: >>> I scoured the code base for cases of this, but it turns out >>> that these two in git_config_set_multivar_in_file_gently() >>> are the only ones. Thi

Re: [PATCH 2/7] get-tar-commit-id: check write_in_full() return against 0

2017-09-13 Thread Jonathan Nieder
Jeff King wrote: > We ask to write 41 bytes and make sure that the return value > is at least 41. This is the same "dangerous" pattern that > was fixed in the prior commit (wherein a negative return > value is promoted to unsigned), though it is not dangerous > here because our "41" is a constant,

Re: [PATCH 1/7] config: avoid "write_in_full(fd, buf, len) < len" pattern

2017-09-13 Thread Jonathan Nieder
Hi, Jeff King wrote: > I scoured the code base for cases of this, but it turns out > that these two in git_config_set_multivar_in_file_gently() > are the only ones. This case is actually quite interesting: > we don't have a size_t, but rather use the subtraction of > two pointers. Which you might

Re: RFC v3: Another proposed hash function transition plan

2017-09-13 Thread Jonathan Nieder
Hi Dscho, Johannes Schindelin wrote: > So even if the code to generate a bidirectional old <-> new hash mapping > might be with us forever, it *definitely* should be optional ("optional" > at least as in "config setting"), allowing developers who only work with > new-hash repositories to save the

[PATCH 4/4] packed refs: pass .git dir instead of packed-refs path to init_fn

2017-09-12 Thread Jonathan Nieder
From: Stefan Beller The first argument of a ref_store_init_fn is documented to represent the $GIT_DIR, not the path to the packed-refs file. This brings the packed-refs store more in line with the usual ref store interface. Signed-off-by: Jonathan Nieder Signed-off-by: Stefan Beller

[PATCH 3/4] replace-objects: evaluate replacement refs without using the object store

2017-09-12 Thread Jonathan Nieder
! Noticed while adapting the object store (and in particular its evaluation of replace refs) to handle arbitrary repositories. Signed-off-by: Stefan Beller Signed-off-by: Jonathan Nieder --- refs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/refs.c b/refs.c index

[PATCH 2/4] push, fetch: error out for submodule entries not pointing to commits

2017-09-12 Thread Jonathan Nieder
check to require an actual commit, not a tag pointing to a commit. Also improve the error handling when a submodule entry points to non-commit (e.g., a blob) to error out instead of warning and pretending the pointed to object doesn't exist. Signed-off-by: Stefan Beller Signed-off-by: Jon

[PATCH 1/4] pack: make packed_git_mru global a value instead of a pointer

2017-09-12 Thread Jonathan Nieder
store struct. Signed-off-by: Stefan Beller Signed-off-by: Jonathan Nieder Acked-by: Jeff King --- Unchanged from https://public-inbox.org/git/20170830064827.gb153...@aiede.mtv.corp.google.com/. I agree with the comments there that it would be nice to make this use list.h (#leftoverbits) and wo

[PATCH 0/4] Fixes from the per-repository object store series

2017-09-12 Thread Jonathan Nieder
e out should make them easier to review and for people to benefit from these fixes without having to wait for the rest of the series to settle. Thoughts of all kinds welcome. Jonathan Nieder (1): pack: make packed_git_mru global a value instead of a pointer Stefan Beller (3): push, fetch: error ou

Re: Commit dropped when swapping commits with rebase -i -p

2017-09-01 Thread Jonathan Nieder
Hi, Sebastian Schuberth wrote: > On Wed, Aug 30, 2017 at 8:07 PM, Martin Ågren wrote: >> The man-page for git rebase says that combining -p with -i is "generally >> not a good idea unless you know what you are doing (see BUGS below)". > > Thanks for pointing this out again. I remember to have re

Re: [PATCH] hashmap: add API to disable item counting when threaded

2017-09-01 Thread Jonathan Nieder
Hi, Johannes Schindelin wrote: > On Wed, 30 Aug 2017, Jeff Hostetler wrote: >> This is to address concerns raised by ThreadSanitizer on the mailing >> list about threaded unprotected R/W access to map.size with my previous >> "disallow rehash" change (0607e10009ee4e37cb49b4cec8d28a9dda1656a4). N

Re: [PATCH] doc/for-each-ref: explicitly specify option names

2017-09-01 Thread Jonathan Nieder
Kevin Daudt wrote: > For count, sort and format, only the argument names were listed under > OPTIONS, not the option names. > > Add the option names to make it clear the options exist nit: missing full-stop (.) at end of sentence. > Signed-off-by: Kevin Daudt > --- > Documentation/git-for-each

Re: [PATCH] pull: honor submodule.recurse config option

2017-09-01 Thread Jonathan Nieder
Hi, Nicolas Morey-Chaisemartin wrote: > git pull used to not parse the submodule.recurse config option and simply > consider the --recurse-submodules CLI option. > When using the config option, submodules would only be fetched recursively > while the CLi option would tigger both fetch and update/

Re: [PATCH 0/1] Add stash entry count summary to short status output

2017-08-31 Thread Jonathan Nieder
Hi Sonny, Sonny Michaud wrote: > Any assistance would be greatly appreciated; I just wanted to get > started by hacking first and asking questions later!      Welcome to the Git project, and sorry for the silence before. Getting to see what people are working on is one of th

[PATCH 39/39] pack: allow sha1_loose_object_info to handle arbitrary repositories

2017-08-30 Thread Jonathan Nieder
Signed-off-by: Stefan Beller Signed-off-by: Jonathan Nieder --- That's the end of the series. Thanks for reading. sha1_file.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/sha1_file.c b/sha1_file.c index dc3c0b07ea..0f302a8c48 100644 --- a/sha1_file.c

[PATCH 37/39] pack: allow map_sha1_file_1 to handle arbitrary repositories

2017-08-30 Thread Jonathan Nieder
Signed-off-by: Stefan Beller Signed-off-by: Jonathan Nieder --- sha1_file.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/sha1_file.c b/sha1_file.c index 930705f59b..7fc5ebf2af 100644 --- a/sha1_file.c +++ b/sha1_file.c @@ -876,10 +876,8 @@ static int

[PATCH 38/39] pack: allow map_sha1_file to handle arbitrary repositories

2017-08-30 Thread Jonathan Nieder
Signed-off-by: Stefan Beller Signed-off-by: Jonathan Nieder --- object-store.h | 3 +-- sha1_file.c| 5 +++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/object-store.h b/object-store.h index fe2187fd65..57b8d89738 100644 --- a/object-store.h +++ b/object-store.h @@ -61,8

[PATCH 36/39] pack: allow open_sha1_file to handle arbitrary repositories

2017-08-30 Thread Jonathan Nieder
Signed-off-by: Stefan Beller Signed-off-by: Jonathan Nieder --- sha1_file.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/sha1_file.c b/sha1_file.c index 282ed7bd1b..930705f59b 100644 --- a/sha1_file.c +++ b/sha1_file.c @@ -846,22 +846,21 @@ static int

[PATCH 35/39] pack: allow stat_sha1_file to handle arbitrary repositories

2017-08-30 Thread Jonathan Nieder
Signed-off-by: Stefan Beller Signed-off-by: Jonathan Nieder --- sha1_file.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/sha1_file.c b/sha1_file.c index ac57eea0f2..282ed7bd1b 100644 --- a/sha1_file.c +++ b/sha1_file.c @@ -822,19 +822,18 @@ int

[PATCH 34/39] pack: allow sha1_file_name to handle arbitrary repositories

2017-08-30 Thread Jonathan Nieder
Signed-off-by: Stefan Beller Signed-off-by: Jonathan Nieder --- object-store.h | 3 +-- sha1_file.c| 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/object-store.h b/object-store.h index 518da80367..fe2187fd65 100644 --- a/object-store.h +++ b/object-store.h @@ -60,8

[PATCH 32/39] pack: allow prepare_packed_git to handle arbitrary repositories

2017-08-30 Thread Jonathan Nieder
Signed-off-by: Stefan Beller Signed-off-by: Jonathan Nieder --- packfile.c | 18 +- packfile.h | 3 +-- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/packfile.c b/packfile.c index 4652be0b6e..23a835f7fb 100644 --- a/packfile.c +++ b/packfile.c @@ -865,19

[PATCH 33/39] pack: allow reprepare_packed_git to handle arbitrary repositories

2017-08-30 Thread Jonathan Nieder
Signed-off-by: Stefan Beller Signed-off-by: Jonathan Nieder --- packfile.c | 8 packfile.h | 3 +-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/packfile.c b/packfile.c index 23a835f7fb..67274d01fd 100644 --- a/packfile.c +++ b/packfile.c @@ -880,11 +880,11 @@ void

[PATCH 30/39] pack: allow prepare_packed_git_mru to handle arbitrary repositories

2017-08-30 Thread Jonathan Nieder
Signed-off-by: Stefan Beller Signed-off-by: Jonathan Nieder --- packfile.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/packfile.c b/packfile.c index 977e714d9a..9bb93ce256 100644 --- a/packfile.c +++ b/packfile.c @@ -857,14 +857,13 @@ static void

[PATCH 31/39] pack: allow prepare_packed_git_one to handle arbitrary repositories

2017-08-30 Thread Jonathan Nieder
Signed-off-by: Stefan Beller Signed-off-by: Jonathan Nieder --- packfile.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/packfile.c b/packfile.c index 9bb93ce256..4652be0b6e 100644 --- a/packfile.c +++ b/packfile.c @@ -719,8 +719,8 @@ static void

[PATCH 28/39] pack: allow install_packed_git to handle arbitrary repositories

2017-08-30 Thread Jonathan Nieder
Signed-off-by: Stefan Beller Signed-off-by: Jonathan Nieder --- packfile.c | 6 +++--- packfile.h | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/packfile.c b/packfile.c index 86c3964018..51af035965 100644 --- a/packfile.c +++ b/packfile.c @@ -664,13 +664,13 @@ struct

[PATCH 29/39] pack: allow rearrange_packed_git to handle arbitrary repositories

2017-08-30 Thread Jonathan Nieder
Signed-off-by: Stefan Beller Signed-off-by: Jonathan Nieder --- packfile.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packfile.c b/packfile.c index 51af035965..977e714d9a 100644 --- a/packfile.c +++ b/packfile.c @@ -850,11 +850,10 @@ static int sort_pack(const

[PATCH 27/39] object-store: allow foreach_alt_odb to handle arbitrary repositories

2017-08-30 Thread Jonathan Nieder
From: Stefan Beller Signed-off-by: Stefan Beller Signed-off-by: Jonathan Nieder --- object-store.h | 3 +-- sha1_file.c| 14 +++--- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/object-store.h b/object-store.h index fcf36c7370..518da80367 100644 --- a/object

[PATCH 26/39] object-store: allow prepare_alt_odb to handle arbitrary repositories

2017-08-30 Thread Jonathan Nieder
From: Stefan Beller Signed-off-by: Jonathan Nieder Signed-off-by: Stefan Beller --- cache.h| 4 object-store.h | 3 +-- sha1_file.c| 65 ++ 3 files changed, 39 insertions(+), 33 deletions(-) diff --git a/cache.h b

[PATCH 25/39] sha1_file: allow alt_odb_usable to handle arbitrary repositories

2017-08-30 Thread Jonathan Nieder
Signed-off-by: Jonathan Nieder Signed-off-by: Stefan Beller --- sha1_file.c | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/sha1_file.c b/sha1_file.c index e7c86e5363..b854cad970 100644 --- a/sha1_file.c +++ b/sha1_file.c @@ -25,6 +25,7 @@ #include

[PATCH 24/39] pack: add repository argument to map_sha1_file

2017-08-30 Thread Jonathan Nieder
llers passing a repository other than the_repository at compile time. While at it, move the declaration to object-store.h, where it should be easier to find. Signed-off-by: Stefan Beller Signed-off-by: Jonathan Nieder --- cache.h| 1 - object-store.h | 2 ++ sha1_file.c

[PATCH 23/39] pack: add repository argument to sha1_file_name

2017-08-30 Thread Jonathan Nieder
llers passing a repository other than the_repository at compile time. While at it, move the declaration to object-store.h, where it should be easier to find. Signed-off-by: Stefan Beller Signed-off-by: Jonathan Nieder --- cache.h| 8 http-walker.c | 3 ++- http.c

[PATCH 22/39] pack: add repository argument to reprepare_packed_git

2017-08-30 Thread Jonathan Nieder
nelle/packed_git.cocci. As with the previous commits, use a macro to catch callers passing a repository other than the_repository at compile time. Signed-off-by: Stefan Beller Signed-off-by: Jonathan Nieder --- builtin/gc.c| 2 +- builtin/receive-pack.c | 3 ++-

[PATCH 21/39] pack: add repository argument to prepare_packed_git

2017-08-30 Thread Jonathan Nieder
nelle/packed_git.cocci. As with the previous commits, use a macro to catch callers passing a repository other than the_repository at compile time. Signed-off-by: Stefan Beller Signed-off-by: Jonathan Nieder --- builtin/count-objects.c | 2 +- builtin/fsck.c | 2 +- bu

[PATCH 20/39] pack: add repository argument to prepare_packed_git_mru

2017-08-30 Thread Jonathan Nieder
ro to catch callers passing a repository other than the_repository at compile time. Signed-off-by: Stefan Beller Signed-off-by: Jonathan Nieder --- packfile.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packfile.c b/packfile.c index 1d03bf48b4..6a04e4bb1b 100644

[PATCH 19/39] pack: add repository argument to rearrange_packed_git

2017-08-30 Thread Jonathan Nieder
catch callers passing a repository other than the_repository at compile time. Signed-off-by: Stefan Beller Signed-off-by: Jonathan Nieder --- packfile.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packfile.c b/packfile.c index 3a841c0f69..1d03bf48b4 100644

[PATCH 18/39] pack: add repository argument to prepare_packed_git_one

2017-08-30 Thread Jonathan Nieder
ro to catch callers passing a repository other than the_repository at compile time. Signed-off-by: Stefan Beller Signed-off-by: Jonathan Nieder --- packfile.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packfile.c b/packfile.c index cea3698af5..3a841c0f69 100644

[PATCH 17/39] pack: add repository argument to install_packed_git

2017-08-30 Thread Jonathan Nieder
catch callers passing a repository other than the_repository at compile time. Signed-off-by: Stefan Beller Signed-off-by: Jonathan Nieder --- fast-import.c | 2 +- http.c| 3 ++- packfile.c| 4 ++-- packfile.h| 3 ++- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a

[PATCH 16/39] object-store: add repository argument to foreach_alt_odb

2017-08-30 Thread Jonathan Nieder
use a macro to catch callers passing a repository other than the_repository at compile time. While at it, move the declaration to object-store.h, where it should be easier to find. Signed-off-by: Stefan Beller Signed-off-by: Jonathan Nieder --- builtin/count-objects.c | 2 +- builtin/subm

[PATCH 15/39] object-store: add repository argument to prepare_alt_odb

2017-08-30 Thread Jonathan Nieder
use a macro to catch callers passing a repository other than the_repository at compile time. While at it, move the declaration to object-store.h, where it should be easier to find. Signed-off-by: Stefan Beller Signed-off-by: Jonathan Nieder --- builtin/fsck.c | 2 +- cache.h| 1 - o

[PATCH 14/39] sha1_file: add repository argument to sha1_loose_object_info

2017-08-30 Thread Jonathan Nieder
vious commits, use a macro to catch callers passing a repository other than the_repository at compile time. Signed-off-by: Stefan Beller Signed-off-by: Jonathan Nieder --- sha1_file.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sha1_file.c b/sha1_file.c index 3adae

[PATCH 13/39] sha1_file: add repository argument to map_sha1_file_1

2017-08-30 Thread Jonathan Nieder
, use a macro to catch callers passing a repository other than the_repository at compile time. Signed-off-by: Stefan Beller Signed-off-by: Jonathan Nieder --- sha1_file.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/sha1_file.c b/sha1_file.c index 893e3

[PATCH 12/39] sha1_file: add repository argument to open_sha1_file

2017-08-30 Thread Jonathan Nieder
, use a macro to catch callers passing a repository other than the_repository at compile time. Signed-off-by: Stefan Beller Signed-off-by: Jonathan Nieder --- sha1_file.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sha1_file.c b/sha1_file.c index d3573cec62..893e3

[PATCH 11/39] sha1_file: add repository argument to stat_sha1_file

2017-08-30 Thread Jonathan Nieder
, use a macro to catch callers passing a repository other than the_repository at compile time. Signed-off-by: Stefan Beller Signed-off-by: Jonathan Nieder --- sha1_file.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sha1_file.c b/sha1_file.c index 7938bd2a6f..d3573

[PATCH 10/39] sha1_file: add repository argument to link_alt_odb_entries

2017-08-29 Thread Jonathan Nieder
mmits, use a macro to catch callers passing a repository other than the_repository at compile time. Signed-off-by: Stefan Beller Signed-off-by: Jonathan Nieder --- sha1_file.c | 19 +-- 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/sha1_file.c b/sha1_file.c

[PATCH 09/39] sha1_file: add repository argument to read_info_alternates

2017-08-29 Thread Jonathan Nieder
vious commit, use a macro to catch callers passing a repository other than the_repository at compile time. Signed-off-by: Stefan Beller Signed-off-by: Jonathan Nieder --- sha1_file.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/sha1_file.c b/sha1_file.c index c63b5

[PATCH 08/39] sha1_file: add repository argument to link_alt_odb_entry

2017-08-29 Thread Jonathan Nieder
ommit, use a macro to catch callers passing a repository other than the_repository at compile time. Signed-off-by: Stefan Beller Signed-off-by: Jonathan Nieder --- sha1_file.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sha1_file.c b/sha1_file.c index 1c757

[PATCH 07/39] sha1_file: add repository argument to alt_odb_usable

2017-08-29 Thread Jonathan Nieder
s like gcc 4.8.4 do not consider "r == the_repository" a compile-time constant. Signed-off-by: Stefan Beller Signed-off-by: Jonathan Nieder --- sha1_file.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sha1_file.c b/sha1_file.c index 7c6ffd205a..1c757b44a3 1006

[PATCH 06/39] pack: move approximate object count to object store

2017-08-29 Thread Jonathan Nieder
: Stefan Beller Signed-off-by: Jonathan Nieder --- object-store.h | 10 +- packfile.c | 11 +-- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/object-store.h b/object-store.h index 14129fbba1..99f77d10cd 100644 --- a/object-store.h +++ b/object-store.h

[PATCH 04/39] object-store: move packed_git and packed_git_mru to object store

2017-08-29 Thread Jonathan Nieder
ncludes of repository.h and object-store.h where needed. Signed-off-by: Stefan Beller Signed-off-by: Jonathan Nieder --- builtin/count-objects.c | 6 -- builtin/fsck.c | 7 +-- builtin/gc.c| 4 +++- builtin/index-pack.c

[PATCH 05/39] pack: move prepare_packed_git_run_once to object store

2017-08-29 Thread Jonathan Nieder
Each repository's object store can be initialized independently, so they must not share a run_once variable. Signed-off-by: Stefan Beller Signed-off-by: Jonathan Nieder --- object-store.h | 8 +++- packfile.c | 7 +++ 2 files changed, 10 insertions(+), 5 deletions(-) diff --

[PATCH 03/39] object-store: move alt_odb_list and alt_odb_tail to object store

2017-08-29 Thread Jonathan Nieder
Beller Signed-off-by: Jonathan Nieder --- builtin/fsck.c | 4 +++- cache.h| 4 ++-- object-store.h | 6 +- packfile.c | 3 ++- sha1_file.c| 25 - sha1_name.c| 3 ++- 6 files changed, 26 insertions(+), 19 deletions(-) diff --git a/builtin/fsck.c b

[PATCH 02/39] repository: introduce object store field

2017-08-29 Thread Jonathan Nieder
soon (starting with the next patch). Signed-off-by: Stefan Beller Signed-off-by: Jonathan Nieder --- Are there any straightforward ways to avoid the empty struct? Should the struct have a placeholder member to avoid language issues with an object that would have size 0? object-store.h | 8

[PATCH 01/39] pack: make packed_git_mru global a value instead of a pointer

2017-08-29 Thread Jonathan Nieder
store struct. Signed-off-by: Stefan Beller Signed-off-by: Jonathan Nieder --- builtin/pack-objects.c | 4 ++-- cache.h| 4 ++-- packfile.c | 12 +--- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/builtin/pack-objects.c b/builtin/pack-obj

[PATCH 00/39] per-repository object store, part 1

2017-08-29 Thread Jonathan Nieder
of all kinds welcome, as always. Thanks, Jonathan Nieder (24): pack: make packed_git_mru global a value instead of a pointer object-store: move packed_git and packed_git_mru to object store struct pack: move prepare_packed_git_run_once to object store struct pack: move approximate ob

Re: git signed push server-side

2017-08-25 Thread Jonathan Nieder
+Dave Borowitz, who implemented push cert handling in JGit and Gerrit Hi Ian, Ian Jackson wrote[1]: > I have been investigating git signed pushes. I found a number of > infelicities in the server side implementation which make using this > in practice rather difficult. I'm emailing here (before

Re: [RFC 0/7] transitioning to protocol v2

2017-08-25 Thread Jonathan Nieder
Hi, Jeff King wrote: > On Thu, Aug 24, 2017 at 03:53:21PM -0700, Brandon Williams wrote: >> Another version of Git's wire protocol is a topic that has been discussed and >> attempted by many in the community over the years. The biggest challenge, as >> far as I understand, has been coming up wit

Re: How to force a push to succeed?

2017-08-23 Thread Jonathan Nieder
Hi Jeffrey, Jeffrey Walton wrote: > From another testing machine, it looks like the changes have not been > backed out. The previous operation un-did the ADX gear because it was > an evolutionary dead-end. > > via$ git pull > From https://github.com/noloader/cryptopp > + 66654dd...559fc3b master

[PATCH v2 4/4] vcs-svn: move remaining repo_tree functions to fast_export.h

2017-08-22 Thread Jonathan Nieder
2017-06-22) or an svn_ prefix that would clash with libsvn (in case someone wants to link this code with libsvn some day). Signed-off-by: Jonathan Nieder --- The only change is the commit message. These functions are already namespaced on the bc/vcs-svn-cleanup, so added a note about that. That&

[PATCH v2 3/4] vcs-svn: remove repo_delete wrapper function

2017-08-22 Thread Jonathan Nieder
Since v1.7.10-rc0~118^2~4^2~4^2~3 (vcs-svn: pass paths through to fast-import, 2010-12-13) this is an alias for fast_export_delete. Remove the unnecessary layer of indirection. No functional change intended. Signed-off-by: Jonathan Nieder --- Unchanged. vcs-svn/repo_tree.c | 5 - vcs-svn

[PATCH v2 2/4] vcs-svn: remove custom mode constants

2017-08-22 Thread Jonathan Nieder
In the rest of Git, these modes are spelled as S_IFDIR, S_IFREG | 0644, S_IFREG | 0755, and S_IFLNK. Use the same constants in svn-fe for simplicity and consistency. No functional change intended. Signed-off-by: Jonathan Nieder --- Unchanged. vcs-svn/fast_export.c | 6 +++--- vcs-svn

[PATCH v2 1/4] vcs-svn: remove more unused prototypes and declarations

2017-08-22 Thread Jonathan Nieder
I forgot to remove these in v1.7.10-rc0~118^2~4^2~5^2~4 (vcs-svn: eliminate repo_tree structure, 2010-12-10). This finishes what was started in commit 36f63b50 (vcs-svn: remove unused prototypes, 2017-08-21). Signed-off-by: Jonathan Nieder --- vcs-svn/repo_tree.h | 3 --- 1 file changed, 3

[PATCH v2 bc/vcs-svn-cleanup] vcs-svn: remove repo_tree library

2017-08-22 Thread Jonathan Nieder
Hi again, Jonathan Nieder wrote: > This is an alternative to bc/vcs-svn-cleanup from 'next'. Those > patches weren't cc-ed to me and I missed them --- sorry about that. I > can rebase on top of them if that is more convenient. Here is the same series rebased on t

Re: [PATCH] vcs-svn/repo_tree.h: remove repo_init declaration

2017-08-22 Thread Jonathan Nieder
t; same function with a different signature. >> >> Helped-by: Jonathan Nieder >> Signed-off-by: Stefan Beller >> --- > > It looks to me that this is a reduced duplicate of what brian posted > yesterday. The first two patches in the 6-patch series that you > commented

[PATCH 4/4] vcs-svn: move remaining repo_tree functions to fast_export.h

2017-08-22 Thread Jonathan Nieder
06-22). Reported-by: brian m. carlson Signed-off-by: Jonathan Nieder --- Makefile | 1 - vcs-svn/fast_export.c | 35 ++- vcs-svn/fast_export.h | 3 +++ vcs-svn/repo_tree.c | 43 --- vcs-svn/repo_tree.h

[PATCH 3/4] vcs-svn: remove repo_delete wrapper function

2017-08-22 Thread Jonathan Nieder
Since v1.7.10-rc0~118^2~4^2~4^2~3 (vcs-svn: pass paths through to fast-import, 2010-12-13) this is an alias for fast_export_delete. Remove the unnecessary layer of indirection. No functional change intended. Signed-off-by: Jonathan Nieder --- vcs-svn/repo_tree.c | 5 - vcs-svn/repo_tree.h

[PATCH 2/4] vcs-svn: remove custom mode constants

2017-08-22 Thread Jonathan Nieder
In the rest of Git, these modes are spelled as S_IFDIR, S_IFREG | 0644, S_IFREG | 0755, and S_IFLNK. Use the same constants in svn-fe for simplicity and consistency. No functional change intended. Signed-off-by: Jonathan Nieder --- vcs-svn/fast_export.c | 6 +++--- vcs-svn/repo_tree.c | 2

[PATCH 1/4] vcs-svn: remove prototypes for missing functions

2017-08-22 Thread Jonathan Nieder
Reported-by: brian m. carlson Reported-by: Stefan Beller Signed-off-by: Jonathan Nieder --- vcs-svn/repo_tree.h | 10 -- 1 file changed, 10 deletions(-) diff --git a/vcs-svn/repo_tree.h b/vcs-svn/repo_tree.h index 889c6a3c95..6c2f5f8a00 100644 --- a/vcs-svn/repo_tree.h +++ b/vcs-svn/

[PATCH 0/4] vcs-svn: remove repo_tree library

2017-08-22 Thread Jonathan Nieder
. I can rebase on top of them if that is more convenient. Thoughts of all kinds welcome, as always. Thanks, Jonathan Jonathan Nieder (4): vcs-svn: remove prototypes for missing functions vcs-svn: remove custom mode constants vcs-svn: remove repo_delete wrapper function vcs-svn: move rema

Re: [PATCH] vcs-svn/repo_tree.h: remove repo_init declaration

2017-08-22 Thread Jonathan Nieder
t; same function with a different signature. >> >> Helped-by: Jonathan Nieder >> Signed-off-by: Stefan Beller > > It looks to me that this is a reduced duplicate of what brian posted > yesterday. The first two patches in the 6-patch series that you > commented on, I think

Re: Revision resolution for remote-helpers?

2017-08-18 Thread Jonathan Nieder
Mike Hommey wrote[1]: > On Fri, Aug 18, 2017 at 03:06:37PM -0700, Jonathan Nieder wrote: >> Mike Hommey wrote: >>> The reason for the :: prefix is that it matches the :: >>> prefix used for remote helpers. >>> >>> Now, there are a few caveats: [...] &

Re: Revision resolution for remote-helpers?

2017-08-18 Thread Jonathan Nieder
Hi, Mike Hommey wrote: > My thought is that a string like :: could be used > wherever a committish is expected. That would call some helper > and request to resolve revision, and the helper would provide a git > commit as a response. I like this idea. > The reason for the :: prefix is that it m

Re: [bug] Git submodule command interprets switch as argument and switch

2017-08-18 Thread Jonathan Nieder
Hi, R0b0t1 wrote: > The issue is as follows: > > R0b0t1@host:~/devel/project$ git submodule add > https://github.com/user/project -f > Cloning into '/home/R0b0t1/devel/project/-f'... Thanks for reporting. Confusingly, I think this is intended behavior. "git help submodule" explains: ad

Re: [PATCH] submodule.sh: remove unused variable

2017-08-16 Thread Jonathan Nieder
Stefan Beller wrote: > This could have been part of 48308681b0 (git submodule update: have a > dedicated helper for cloning, 2016-02-29). > > Signed-off-by: Stefan Beller > --- > git-submodule.sh | 1 - > 1 file changed, 1 deletion(-) Reviewed-by: Jonathan Nieder T

Re: [PATCH] push: do not add submodule odb as an alternate when recursing on demand

2017-08-15 Thread Jonathan Nieder
Hi, Stefan Beller wrote: > On Tue, Aug 15, 2017 at 5:11 PM, Junio C Hamano wrote: >> Stefan Beller writes: >>> Junio C Hamano wrote: Is "is it populated" a good thing to check here, though? IIRC, add-submodule-odb allows you to add the object database of an inactivated submodule

Re: [PATCH] sub-process: print the cmd when a capability is unsupported

2017-08-15 Thread Jonathan Nieder
Jonathan Tan wrote: > Christian Couder wrote: >> In handshake_capabilities() we use warning() when a capability >> is not supported, so the exit code of the function is 0 and no >> further error is shown. This is a problem because the warning >> message doesn't tell us which subprocess cmd failed

Re: [PATCH] push: do not add submodule odb as an alternate when recursing on demand

2017-08-15 Thread Jonathan Nieder
Stefan Beller wrote: > Use is_submodule_populated_gently instead, which is simpler and > cheaper. [...] > --- a/submodule.c > +++ b/submodule.c > @@ -966,7 +966,9 @@ static int push_submodule(const char *path, > const struct string_list *push_options, >

Re: [PATCH] push: do not add submodule odb as an alternate when recursing on demand

2017-08-15 Thread Jonathan Nieder
ned-off-by: Stefan Beller > --- > submodule.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) Reviewed-by: Jonathan Nieder Thanks for picking up this loose end. > diff --git a/submodule.c b/submodule.c > index 111a3007fc..e20216bc0f 100644 > --- a/s

<    5   6   7   8   9   10   11   12   13   14   >