Re: [RFC/PATCH 3/3] receive-pack: allow a maximum input size to be specified

2016-08-15 Thread Junio C Hamano
Jeff King writes: > The simple fix is to call register_tempfile() in open_pack_file(), and > just have index-pack clean up the file on its way out. > > But there are harder cases. For instance, imagine somebody pushes a > 500MB file, and you have a pre-receive hook that says "too

[PATCHv5 8/8] clone: recursive and reference option triggers submodule alternates

2016-08-15 Thread Stefan Beller
When `--recursive` and `--reference` is given, it is reasonable to expect that the submodules are created with references to the submodules of the given alternate for the superproject. An initial attempt to do this was presented to the mailing list, which used flags that are passed around

[PATCHv5 3/8] submodule--helper module-clone: allow multiple references

2016-08-15 Thread Stefan Beller
Allow users to pass in multiple references, just as clone accepts multiple references as well. Signed-off-by: Stefan Beller --- builtin/submodule--helper.c | 20 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/builtin/submodule--helper.c

[PATCHv5 6/8] clone: clarify option_reference as required

2016-08-15 Thread Stefan Beller
In the next patch we introduce optional references; To better distinguish between optional and required references we rename the variable. Signed-off-by: Stefan Beller --- builtin/clone.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git

[PATCHv5 7/8] clone: implement optional references

2016-08-15 Thread Stefan Beller
In a later patch we want to try to create alternates for submodules, but they might not exist in the referenced superproject. So add a way to skip the non existing references and report them. Signed-off-by: Stefan Beller --- Documentation/git-clone.txt | 5 -

[PATCHv5 5/8] clone: factor out checking for an alternate path

2016-08-15 Thread Stefan Beller
In a later patch we want to determine if a path is suitable as an alternate from other commands than builtin/clone. Move the checking functionality of `add_one_reference` to `compute_alternate_path` that is defined in cache.h. Signed-off-by: Stefan Beller --- builtin/clone.c

[PATCHv5 0/8] git clone: Marry --recursive and --reference

2016-08-15 Thread Stefan Beller
v5: Thanks Junio, Ramsay for comments. As the comments only address programming work as opposed to design, the interdiff is rather small: diff --git a/builtin/clone.c b/builtin/clone.c index 0593aee..404c5e8 100644 --- a/builtin/clone.c +++ b/builtin/clone.c @@ -285,23 +285,26 @@ static void

[PATCHv5 4/8] submodule--helper update-clone: allow multiple references

2016-08-15 Thread Stefan Beller
Allow the user to pass in multiple references to update_clone. Currently this is only internal API, but once the shell script is replaced by a C version, this is needed. This fixes an API bug between the shell script and the helper. Currently the helper accepts "--reference" "--reference=foo" as

[PATCHv5 2/8] t7408: merge short tests, factor out testing method

2016-08-15 Thread Stefan Beller
Tests consisting of one line each can be consolidated to have fewer tests to run as well as fewer lines of code. When having just a few git commands, do not create a new shell but use the -C flag in Git to execute in the correct directory. Signed-off-by: Stefan Beller ---

[PATCHv5 1/8] t7408: modernize style

2016-08-15 Thread Stefan Beller
No functional change intended. This commit only changes formatting to the style we recently use, e.g. starting the body of a test with a single quote on the same line as the header, and then having the test indented in the following lines. Whenever we change directories, we do that in subshells.

Re: [PATCH v2] help: make option --help open man pages only for Git commands

2016-08-15 Thread Junio C Hamano
"Philip Oakley" writes: > The other option is to simply build a guide-list in exactly the same > format as the command list (which if it works can be merged > later). Re-use the existing code, etc. Yeah, that sounds like a good way to go forward. To implement typo

Re: [PATCHv5 0/8] git clone: Marry --recursive and --reference

2016-08-15 Thread Junio C Hamano
Stefan Beller writes: > As the comments only address programming work as opposed to design, the > interdiff is rather small: Thanks. Will queue. I think we do not need that extra err strbuf in add_one_reference(), but we can go either way and it is not worth rerolling.

Re: [PATCH 2/2] checkout: do not mention detach advice for explicit --detach option

2016-08-15 Thread Junio C Hamano
Jeff King writes: >> REF_NODEREF, UPDATE_REFS_DIE_ON_ERR); >> if (!opts->quiet) { >> if (old->path && >> -(advice_detached_head == 1 || >> - (advice_detached_head == -1 && >>

Re: storing cover letter of a patch series?

2016-08-15 Thread Jacob Keller
On Mon, Aug 15, 2016 at 1:38 PM, Junio C Hamano wrote: > Jacob Keller writes: > >> Some people have suggested this simple idea, and I like it, but they >> did mention that modifying the cover letter now requires a rebase over >> a potentially large

Re: [PATCH v5 2/3] diff: add --diff-line-prefix option for passing in a prefix

2016-08-15 Thread Jacob Keller
On Mon, Aug 15, 2016 at 8:37 AM, Junio C Hamano wrote: > Jacob Keller writes: > >> I will look more into how to do the log version tomorrow, if I am >> still stuck I will re-work the patches as you suggest here. >> >> I am hoping I can find a good

Re: [RFC/PATCH 3/3] receive-pack: allow a maximum input size to be specified

2016-08-15 Thread Jeff King
On Mon, Aug 15, 2016 at 03:48:55PM -0700, Junio C Hamano wrote: > Jeff King writes: > > > The simple fix is to call register_tempfile() in open_pack_file(), and > > just have index-pack clean up the file on its way out. > > > > But there are harder cases. For instance, imagine

Re: [PATCH] make rebase respect core.hooksPath if set

2016-08-15 Thread ryenus
On 15 August 2016 at 20:24, Johannes Schindelin wrote: > Would it not be more appropriate to teach --git-path hooks to respect the > core.hooksPath variable? This would be in line with --git-path objects > respecting the GIT_OBJECT_DIRECTORY environment variable.

<    1   2