Re: [PATCH] run-command: do not pass child process data into callbacks

2016-02-29 Thread Johannes Sixt
Am 29.02.2016 um 22:57 schrieb Stefan Beller: > The expected way to pass data into the callback is to pass them via > the customizable callback pointer. The error reporting in > default_{start_failure, task_finished} is not user friendly enough, that > we want to encourage using the child data for

Re: [PATCH] compat/mingw: brown paper bag fix for 50a6c8e

2016-02-29 Thread Jeff King
On Tue, Mar 01, 2016 at 06:49:43AM +0100, Torsten Bögershausen wrote: > However, suspecting jk/epipe-in-async, I don't know if we can do > something against this warning: > > CC run-command.o > run-command.c: In function 'async_exit': > run-command.c:631:1: warning: 'noreturn' function does retu

Re: [PATCH] compat/mingw: brown paper bag fix for 50a6c8e

2016-02-29 Thread Torsten Bögershausen
Oh, . I am only half as incompetent as I thought, then. I didn't even re-check what I sent, and just assumed Torsten was quoting it exactly (I _did_ write something like that while making the fix, and assumed I had just failed to properly commit). So yes, what I sent both times is the right thi

Re: [PATCH v3] fetch-pack: fix object_id of exact sha1

2016-02-29 Thread Jeff King
On Mon, Feb 29, 2016 at 11:12:56PM -0300, Gabriel Souza Franco wrote: > Commit 58f2ed0 (remote-curl: pass ref SHA-1 to fetch-pack as well, > 2013-12-05) added support for specifying a SHA-1 as well as a ref name. > Add support for specifying just a SHA-1 and set the ref name to the same > value in

Re: [PATCH v2] fetch-pack: fix object_id of exact sha1

2016-02-29 Thread Jeff King
On Mon, Feb 29, 2016 at 11:08:07PM -0300, Gabriel Souza Franco wrote: > On Mon, Feb 29, 2016 at 5:30 AM, Johannes Schindelin > wrote: > > Having said that, this *might* be a good opportunity to imitate the > > skip_prefix() function. If there are enough similar code constructs, we > > could simpl

[PATCH v3] fetch-pack: fix object_id of exact sha1

2016-02-29 Thread Gabriel Souza Franco
Commit 58f2ed0 (remote-curl: pass ref SHA-1 to fetch-pack as well, 2013-12-05) added support for specifying a SHA-1 as well as a ref name. Add support for specifying just a SHA-1 and set the ref name to the same value in this case. Signed-off-by: Gabriel Souza Franco --- I did keep the oid varia

Re: [PATCH v2] fetch-pack: fix object_id of exact sha1

2016-02-29 Thread Gabriel Souza Franco
On Mon, Feb 29, 2016 at 5:30 AM, Johannes Schindelin wrote: > Having said that, this *might* be a good opportunity to imitate the > skip_prefix() function. If there are enough similar code constructs, we > could simplify all of them by introducing the function > > skip_oid_hex(const char *

[PATCHv21 08/10] submodule helper: remove double 'fatal: ' prefix

2016-02-29 Thread Stefan Beller
The prefix is added by die(...), so we don't have to do it. Signed-off-by: Stefan Beller --- builtin/submodule--helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c index fd2b168..9e8109e 100644 --- a/builtin/s

[PATCHv21 02/10] submodule-config: drop check against NULL

2016-02-29 Thread Stefan Beller
Adhere to the common coding style of Git and not check explicitly for NULL throughout the file. There are still other occurrences in the code base but that is usually inside of conditions with side effects. Reviewed-by: Jonathan Nieder Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano

[PATCHv21 07/10] git submodule update: have a dedicated helper for cloning

2016-02-29 Thread Stefan Beller
This introduces a new helper function in git submodule--helper which takes care of cloning all submodules, which we want to parallelize eventually. Some tests (such as empty URL, update_mode=none) are required in the helper to make the decision for cloning. These checks have been moved into the C

[PATCHv21 05/10] run_processes_parallel: treat output of children as byte array

2016-02-29 Thread Stefan Beller
We do not want the output to be interrupted by a NUL byte, so we cannot use raw fputs. Introduce strbuf_write to avoid having long arguments in run-command.c. Reviewed-by: Jonathan Nieder Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano --- run-command.c | 8 strbuf.c |

[PATCHv21 00/10] Expose submodule parallelism to the user

2016-02-29 Thread Stefan Beller
* evicted patches: run-command: expose default_{start_failure, task_finished} run_processes_parallel: correctly terminate callbacks with an LF * rebased on top of origin/sb/no-child-process-access-in-run-parallel-callbacks * followed Jonathans advice on improving the situation for translators.

[PATCHv21 06/10] run_processes_parallel: rename parameters for the callbacks

2016-02-29 Thread Stefan Beller
The refs code has a similar pattern of passing around 'struct strbuf *err', which is strictly used for error reporting. This is not the case here, as the strbuf is used to accumulate all the output (whether it is error or not) for the user. Rename it to 'out'. Suggested-by: Jonathan Nieder Review

[PATCHv21 09/10] submodule update: expose parallelism to the user

2016-02-29 Thread Stefan Beller
Expose possible parallelism either via the "--jobs" CLI parameter or the "submodule.fetchJobs" setting. By having the variable initialized to -1, we make sure 0 can be passed into the parallel processing machine, which will then pick as many parallel workers as there are CPUs. Reviewed-by: Jonath

[PATCHv21 01/10] submodule-config: keep update strategy around

2016-02-29 Thread Stefan Beller
Currently submodule..update is only handled by git-submodule.sh. C code will start to need to make use of that value as more of the functionality of git-submodule.sh moves into library code in C. Add the update field to 'struct submodule' and populate it so it can be read as sm->update or from sm-

[PATCHv21 03/10] fetching submodules: respect `submodule.fetchJobs` config option

2016-02-29 Thread Stefan Beller
This allows to configure fetching and updating in parallel without having the command line option. This moved the responsibility to determine how many parallel processes to start from builtin/fetch to submodule.c as we need a way to communicate "The user did not specify the number of parallel proc

[PATCHv21 10/10] clone: allow an explicit argument for parallel submodule clones

2016-02-29 Thread Stefan Beller
Just pass it along to "git submodule update", which may pick reasonable defaults if you don't specify an explicit number. Reviewed-by: Jonathan Nieder Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano --- Documentation/git-clone.txt | 6 +- builtin/clone.c | 19 ++

[PATCHv21 04/10] submodule update: direct error message to stderr

2016-02-29 Thread Stefan Beller
Reroute the error message for specified but initialized submodules to stderr instead of stdout. Reviewed-by: Jonathan Nieder Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano --- git-submodule.sh | 4 ++-- t/t7400-submodule-basic.sh | 4 ++-- 2 files changed, 4 insertions(+)

Re: [PATCH v7 31/33] refs: add LMDB refs storage backend

2016-02-29 Thread Duy Nguyen
On Tue, Mar 1, 2016 at 8:35 AM, David Turner wrote: > On Tue, 2016-03-01 at 08:31 +0700, Duy Nguyen wrote: >> On Tue, Mar 1, 2016 at 7:53 AM, David Turner < >> dtur...@twopensource.com> wrote: >> > +Weaknesses: >> > +--- >> > + >> > +The reflog format is somewhat inefficient: a binary form

Re: [PATCH v6 7/7] git: submodule honor -c credential.* from command line

2016-02-29 Thread Jeff King
On Mon, Feb 29, 2016 at 03:44:51PM -0800, Jacob Keller wrote: > On Mon, Feb 29, 2016 at 3:39 PM, Stefan Beller wrote: > > On Mon, Feb 29, 2016 at 2:58 PM, Jacob Keller > > wrote: > >> > >> +test_expect_success 'cmdline credential config passes into submodules' ' > >> + git init super && >

Re: [PATCH v7 31/33] refs: add LMDB refs storage backend

2016-02-29 Thread David Turner
On Tue, 2016-03-01 at 08:31 +0700, Duy Nguyen wrote: > On Tue, Mar 1, 2016 at 7:53 AM, David Turner < > dtur...@twopensource.com> wrote: > > +Weaknesses: > > +--- > > + > > +The reflog format is somewhat inefficient: a binary format could > > store > > +reflog date/time information in somew

Re: [PATCH v7 31/33] refs: add LMDB refs storage backend

2016-02-29 Thread Duy Nguyen
On Tue, Mar 1, 2016 at 7:53 AM, David Turner wrote: > +Weaknesses: > +--- > + > +The reflog format is somewhat inefficient: a binary format could store > +reflog date/time information in somewhat less space. This raises an interesting question. What if we want to change lmdb format in fut

[PATCH v7 09/33] refs: reduce the visibility of do_for_each_ref()

2016-02-29 Thread David Turner
From: Ramsay Jones Now that we have moved do_for_each_ref into refs.c, it no longer needs to be public. Signed-off-by: Ramsay Jones Signed-off-by: Junio C Hamano --- refs.c | 19 +++ refs/refs-internal.h | 6 -- 2 files changed, 11 insertions(+), 14 deletion

[PATCH v7 28/33] refs: register ref storage backends

2016-02-29 Thread David Turner
Add new function register_ref_storage_backends(). This new function registers all known ref storage backends... once there are any other than the default. For now, it just registers the files backend. Call the function before calling set_ref_storage_backend. Signed-off-by: David Turner Signed-

[PATCH v7 33/33] tests: add ref-storage argument

2016-02-29 Thread David Turner
Add a --ref-storage argument to make it easy to test alternate ref storage backends. This means that every test that calls git init or git clone must use the new ref storage argument. Modify many tests to work under alternate ref storage backends. Introduce abstractions for raw ref/reflog readin

[PATCH v7 08/33] refs: add method for do_for_each_ref

2016-02-29 Thread David Turner
Add a ref backend method for do_for_each_ref. Signed-off-by: David Turner Signed-off-by: Junio C Hamano --- refs.c | 8 refs/files-backend.c | 7 +-- refs/refs-internal.h | 5 + 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/refs.c b/refs.c index

[PATCH v7 32/33] refs: tests for lmdb backend

2016-02-29 Thread David Turner
Add tests for the database backend. Signed-off-by: David Turner Helped-by: Dennis Kaarsemaker Signed-off-by: Junio C Hamano --- t/t1460-refs-lmdb-backend.sh| 1109 +++ t/t1470-refs-lmdb-backend-reflog.sh | 359 t/t1480-refs-lmdb-submodule.s

[PATCH v7 25/33] refs: check submodules' ref storage config

2016-02-29 Thread David Turner
All submodules must have the same ref storage (for now). Confirm that this is so before attempting to do anything with submodule refs. Signed-off-by: David Turner Signed-off-by: Junio C Hamano --- refs.c | 54 refs.h

[PATCH v7 13/33] refs: add method for delete_refs

2016-02-29 Thread David Turner
In the file-based backend, delete_refs has some special optimization to deal with packed refs. In other backends, we might be able to make ref deletion faster by putting all deletions into a single transaction. So we need a special backend function for this. Signed-off-by: David Turner Signed-o

[PATCH v7 21/33] refs: on symref reflog expire, lock symref not referrent

2016-02-29 Thread David Turner
When locking a symbolic ref to expire a reflog, lock the symbolic ref (using REF_NODEREF) instead of its referent. Add a test for this. Signed-off-by: David Turner Signed-off-by: Junio C Hamano --- refs/files-backend.c | 3 ++- t/t1410-reflog.sh| 10 ++ 2 files changed, 12 inserti

[PATCH v7 17/33] refs: make lock generic

2016-02-29 Thread David Turner
Instead of using a files-backend-specific struct ref_lock, the generic ref_transaction struct should provide a void pointer that backends can use for their own lock data. Signed-off-by: David Turner Signed-off-by: Junio C Hamano --- refs/files-backend.c | 29 - refs/

[PATCH v7 20/33] refs: don't dereference on rename

2016-02-29 Thread David Turner
When renaming refs, don't dereference either the origin or the destination before renaming. The origin does not need to be dereferenced because it is presently forbidden to rename symbolic refs. Not dereferencing the destination fixes a bug where renaming on top of a broken symref would use the p

[PATCH v7 10/33] refs: add do_for_each_per_worktree_ref

2016-02-29 Thread David Turner
Alternate refs backends might still use files to store per-worktree refs. So the files backend's ref-loading infrastructure should be available to those backends, just for use on per-worktree refs. Add do_for_each_per_worktree_ref, which iterates over per-worktree refs. Signed-off-by: David Turn

[PATCH v7 12/33] refs: add method for initial ref transaction commit

2016-02-29 Thread David Turner
Signed-off-by: Ronnie Sahlberg Signed-off-by: David Turner Signed-off-by: Junio C Hamano --- refs.c | 6 ++ refs/files-backend.c | 5 +++-- refs/refs-internal.h | 1 + 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/refs.c b/refs.c index 637df71..b5ef4fc 100644

[PATCH v7 14/33] refs: add methods to init refs db

2016-02-29 Thread David Turner
Alternate refs backends might not need the refs/heads directory and so on, so we make ref db initialization part of the backend. Signed-off-by: David Turner Signed-off-by: Junio C Hamano --- builtin/init-db.c| 20 ++-- refs.c | 5 + refs.h |

[PATCH v7 19/33] refs: allow log-only updates

2016-02-29 Thread David Turner
The refs infrastructure learns about log-only ref updates, which only update the reflog. Later, we will use this to separate symbolic reference resolution from ref updating. Signed-off-by: David Turner Signed-off-by: Junio C Hamano --- refs/files-backend.c | 15 ++- refs/refs-inter

[PATCH v7 22/33] refs: resolve symbolic refs first

2016-02-29 Thread David Turner
Before committing ref updates, split symbolic ref updates into two parts: an update to the underlying ref, and a log-only update to the symbolic ref. This ensures that both references are locked correctly while their reflogs are updated. It is still possible to confuse git by concurrent updates,

[PATCH v7 23/33] refs: always handle non-normal refs in files backend

2016-02-29 Thread David Turner
Always handle non-normal (per-worktree or pseudo) refs in the files backend instead of alternate backends. Sometimes a ref transaction will update both a per-worktree ref and a normal ref. For instance, an ordinary commit might update refs/heads/master and HEAD (or at least HEAD's reflog). Updat

[PATCH v7 15/33] refs: add method to rename refs

2016-02-29 Thread David Turner
Signed-off-by: David Turner Signed-off-by: Junio C Hamano --- refs.c | 5 + refs/files-backend.c | 4 +++- refs/refs-internal.h | 8 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/refs.c b/refs.c index b2697f6..5364dc6 100644 --- a/refs.c +++ b/refs.c @

[PATCH v7 06/33] refs: add a backend method structure with transaction functions

2016-02-29 Thread David Turner
From: Ronnie Sahlberg Add a ref structure for storage backend methods. Start by adding a method pointer for the transaction commit function. Add a function set_refs_backend to switch between storage backends. The files based storage backend is the default. Signed-off-by: Ronnie Sahlberg Signed

[PATCH v7 27/33] svn: learn ref-storage argument

2016-02-29 Thread David Turner
git svn learns to pass the ref-storage command-line argument (to init and clone) through to git init. Signed-off-by: David Turner Signed-off-by: SZEDER Gábor Signed-off-by: Eric Wong Signed-off-by: Junio C Hamano --- contrib/completion/git-completion.bash | 2 +- git-svn.perl

[PATCH v7 07/33] refs: add methods for misc ref operations

2016-02-29 Thread David Turner
From: Ronnie Sahlberg Add ref backend methods for: read_raw_ref, verify_refname_available, pack_refs, peel_ref, create_symref, resolve_gitlink_ref. read_raw_ref becomes static because it's not used outside refs.c Signed-off-by: Ronnie Sahlberg Signed-off-by: David Turner Signed-off-by: Junio

[PATCH v7 16/33] refs: handle non-normal ref renames

2016-02-29 Thread David Turner
Forbid cross-backend ref renames. This would be pretty weird, but since it will break, we should prevent it. Also make the files backend deal with all non-normal ref renames. Signed-off-by: David Turner Signed-off-by: Junio C Hamano --- refs.c | 12 +++- 1 file changed, 11 insertions(

[PATCH v7 31/33] refs: add LMDB refs storage backend

2016-02-29 Thread David Turner
Add a database backend for refs using LMDB. This backend runs git for-each-ref about 30% faster than the files backend with fully-packed refs on a repo with ~120k refs. It's also about 4x faster than using fully-unpacked refs. In addition, and perhaps more importantly, it avoids case-conflict is

[PATCH v7 26/33] clone: allow ref storage backend to be set for clone

2016-02-29 Thread David Turner
Add a new option, --ref-storage, to allow the ref storage backend to be set on new clones. Submodules must use the same ref storage as the parent repository, so we also pass the --ref-storage option option when cloning submodules. Signed-off-by: David Turner Signed-off-by: SZEDER Gábor Signed-o

[PATCH v7 24/33] init: allow alternate ref strorage to be set for new repos

2016-02-29 Thread David Turner
git init learns a new argument --ref-storage. Presently, only "files" is supported, but later we will add other storage backends. When this argument is used, the repository's extensions.refStorage configuration value is set (as well as core.repositoryformatversion), and the ref storage backend's

[PATCH v7 18/33] refs: move duplicate check to common code

2016-02-29 Thread David Turner
The check for duplicate refnames in a transaction is needed for all backends, so move it to the common code. ref_transaction_commit_fn gains a new argument, the sorted string_list of affected refnames. Signed-off-by: David Turner Signed-off-by: Junio C Hamano --- refs.c | 69

[PATCH v7 30/33] refs: break out resolve_ref_unsafe_submodule

2016-02-29 Thread David Turner
It will soon be useful for resolve_ref_unsafe to support submodules. But since it is called from so many places, changing it would have been painful. Fortunately, it's just a thin wrapper around (the former) resolve_ref_1. So now resolve_ref_1 becomes resolve_ref_unsafe_submodule, and it passes i

[PATCH v7 11/33] refs: add methods for reflog

2016-02-29 Thread David Turner
In the file-based backend, the reflog piggybacks on the ref lock. Since other backends won't have the same sort of ref lock, ref backends must also handle reflogs. Signed-off-by: Ronnie Sahlberg Signed-off-by: David Turner Signed-off-by: Junio C Hamano --- refs.c | 46 +++

[PATCH v7 29/33] setup: configure ref storage on setup

2016-02-29 Thread David Turner
This sets up the existing backend early, so that other code which reads refs is reading from the right place. Signed-off-by: David Turner Signed-off-by: Junio C Hamano --- config.c | 1 + setup.c | 4 2 files changed, 5 insertions(+) diff --git a/config.c b/config.c index 9ba40bc..cca7e2

[PATCH v7 04/33] files-backend: break out ref reading

2016-02-29 Thread David Turner
Refactor resolve_ref_1 in terms of a new function read_raw_ref, which is responsible for reading ref data from the ref storage. Later, we will make read_raw_ref a pluggable backend function, and make resolve_ref_unsafe common. Testing done: Hacked in code to run both old and new version of resolv

[PATCH v7 03/33] refs: move for_each_*ref* functions into common code

2016-02-29 Thread David Turner
Make do_for_each_ref take a submodule as an argument instead of a ref_cache. Since all for_each_*ref* functions are defined in terms of do_for_each_ref, we can then move them into the common code. Later, we can simply make do_for_each_ref into a backend function. Signed-off-by: David Turner Sig

[PATCH v7 01/33] setup: call setup_git_directory_gently before accessing refs

2016-02-29 Thread David Turner
Usually, git calls some form of setup_git_directory at startup. But sometimes, it doesn't. Usually, that's OK because it's not really using the repository. But in some cases, it is using the repo. In those cases, either setup_git_directory_gently must be called, or the repository (e.g. the refs

[PATCH v7 02/33] refs: move head_ref{,_submodule} to the common code

2016-02-29 Thread David Turner
These don't use any backend-specific functions. These were previously defined in terms of the do_head_ref helper function, but since they are otherwise identical, we don't need that function. Signed-off-by: David Turner Signed-off-by: Junio C Hamano --- refs.c | 23 ++

[PATCH v7 00/33] refs backend

2016-02-29 Thread David Turner
This one has suggestions from Peff, SZEDER Gábor, Duy Nguyen, and fixups from Junio. The major changes are: * The new patch "call setup_git_directory_gently before accessing refs" -- this is necessary in order to move "setup: configure ref storage config on startup" from config to setup. * "

[PATCH v7 05/33] refs: move resolve_ref_unsafe into common code

2016-02-29 Thread David Turner
Now that resolve_ref_unsafe's only interaction with the backend is through read_raw_ref, we can move it into the common code. Later, we'll replace read_raw_ref with a backend function. Signed-off-by: David Turner Signed-off-by: Junio C Hamano --- refs.c | 104 +

Re: [PATCH 16/22] run-command.c: mark strings for translation

2016-02-29 Thread Stefan Beller
On Mon, Feb 29, 2016 at 10:52 AM, Junio C Hamano wrote: > Nguyễn Thái Ngọc Duy writes: > >> Signed-off-by: Nguyễn Thái Ngọc Duy >> --- > > This is new and there aren't many non-BUG messages that are not > marked, so let's take this one for 2.8.0. This would collide with "[PATCH] run-command: d

Re: [PATCH] run-command: do not pass child process data into callbacks

2016-02-29 Thread Junio C Hamano
Stefan Beller writes: > It applies on 2.8.0-rc0. > > (I tried backporting it to 2.7, but realized it is not an issue there) Thanks. I tried to be nice to rebase the parallel-update stuff on top of this myself, but stopped it as I won't have enough time to push the result out for the day anyway.

Re: [PATCH v6 32/32] tests: add ref-storage argument

2016-02-29 Thread David Turner
On Mon, 2016-02-29 at 23:52 +0100, SZEDER Gábor wrote: > As far as these tests are concerned any subdirectory under .git/ > would > do, it doesn't have to be .git/refs/heads. How about cd-ing into a > different directory instead of creating the missing ones? Good idea, thanks. -- To unsubscribe

Re: [PATCH v6 7/7] git: submodule honor -c credential.* from command line

2016-02-29 Thread Jacob Keller
On Mon, Feb 29, 2016 at 3:39 PM, Stefan Beller wrote: > On Mon, Feb 29, 2016 at 2:58 PM, Jacob Keller > wrote: >> >> +test_expect_success 'cmdline credential config passes into submodules' ' >> + git init super && >> + set_askpass user@host pass@host && > > I wonder why we use pass@h

Re: [PATCH v6 7/7] git: submodule honor -c credential.* from command line

2016-02-29 Thread Stefan Beller
On Mon, Feb 29, 2016 at 2:58 PM, Jacob Keller wrote: > > +test_expect_success 'cmdline credential config passes into submodules' ' > + git init super && > + set_askpass user@host pass@host && I wonder why we use pass@host as a password, it seems confusing to me. p@ssword would have wo

Re: What's cooking in git.git (Feb 2016, #07; Thu, 25)

2016-02-29 Thread Eric Sunshine
On Mon, Feb 29, 2016 at 12:17 PM, Junio C Hamano wrote: > Eric Sunshine writes: >>> Your suggestion elsewhere in the thread to just use clang instead sounds >>> good to me. :) >> >> If possible, for the moment, I'd prefer to hold off on that >> sledge-hammer approach of unconditionally making the

Re: [PATCH v6 5/7] submodule: fix segmentation fault in submodule--helper clone

2016-02-29 Thread Jacob Keller
On Mon, Feb 29, 2016 at 3:20 PM, Stefan Beller wrote: > > I think this bug was put in, by "literally" translating from shell, > see ee8838d15776, where the shell code was rewritten to C, > specially: > > git clone $quiet ${depth:+"$depth"} -n ${reference:+"$reference"} \ > --separate-git-dir

Re: [PATCH v6 5/7] submodule: fix segmentation fault in submodule--helper clone

2016-02-29 Thread Stefan Beller
On Mon, Feb 29, 2016 at 2:58 PM, Jacob Keller wrote: > From: Jacob Keller > > The git submodule--helper clone command will fail with a segmentation > fault when given a null url or null path variable. Since these are > required for proper functioning of the submodule--helper clone > subcommand, a

Re: [PATCH v6 4/7] submodule: fix submodule--helper clone usage

2016-02-29 Thread Stefan Beller
On Mon, Feb 29, 2016 at 2:58 PM, Jacob Keller wrote: > From: Jacob Keller > > git submodule--helper clone usage stated that paths were added after the > [--] argument. The actual implementation required use of --path argument > and only supports one path at a time. Update the usage string to matc

Re: [PATCH v6 2/7] submodule: don't pass empty string arguments to submodule--helper clone

2016-02-29 Thread Stefan Beller
On Mon, Feb 29, 2016 at 2:58 PM, Jacob Keller wrote: > From: Jacob Keller > > When --reference or --depth are unused, the current git-submodule.sh > results in empty "" arguments appended to the end of the argv array > inside git submodule--helper clone. This is not caught because the argc > coun

Re: [PATCH v6 3/7] submodule: check argc count for git submodule--helper clone

2016-02-29 Thread Stefan Beller
On Mon, Feb 29, 2016 at 2:58 PM, Jacob Keller wrote: > > Extra unused arguments to git submodule--helper clone subcommand were > being silently ignored. Add a check to the argc count after options > handling to ensure that no extra arguments were left on the argv array. > > Signed-off-by: Jacob Ke

Re: [PATCH v6 28/32] config: read ref storage config on startup

2016-02-29 Thread David Turner
On Mon, 2016-02-29 at 17:21 -0500, Jeff King wrote: > On Mon, Feb 29, 2016 at 05:10:24PM -0500, Jeff King wrote: > > > > We apparently don't always call check_repo_format before calling > > > git_config_early -- or, more to the point, before doing ref > > > operations. > > > So I think we need thi

[PATCH v6 2/7] submodule: don't pass empty string arguments to submodule--helper clone

2016-02-29 Thread Jacob Keller
From: Jacob Keller When --reference or --depth are unused, the current git-submodule.sh results in empty "" arguments appended to the end of the argv array inside git submodule--helper clone. This is not caught because the argc count is not checked today. Fix git-submodule.sh to only pass an arg

[PATCH v6 1/7] t/lib-httpd: load mod_unixd

2016-02-29 Thread Jacob Keller
From: Michael J Gruber In contrast to apache 2.2, apache 2.4 does not load mod_unixd in its default configuration (because there are choices). Thus, with the current config, apache 2.4.10 will not be started and the httpd tests will not run on distros with default apache config (RedHat type). En

[PATCH v6 4/7] submodule: fix submodule--helper clone usage

2016-02-29 Thread Jacob Keller
From: Jacob Keller git submodule--helper clone usage stated that paths were added after the [--] argument. The actual implementation required use of --path argument and only supports one path at a time. Update the usage string to match the current implementation. Signed-off-by: Jacob Keller ---

[PATCH v6 7/7] git: submodule honor -c credential.* from command line

2016-02-29 Thread Jacob Keller
From: Jacob Keller Due to the way that the git-submodule code works, it clears all local git environment variables before entering submodules. This is normally a good thing since we want to clear settings such as GIT_WORKTREE and other variables which would affect the operation of submodule comma

[PATCH v6 3/7] submodule: check argc count for git submodule--helper clone

2016-02-29 Thread Jacob Keller
From: Jacob Keller Extra unused arguments to git submodule--helper clone subcommand were being silently ignored. Add a check to the argc count after options handling to ensure that no extra arguments were left on the argv array. Signed-off-by: Jacob Keller --- builtin/submodule--helper.c | 4 +

[PATCH v6 5/7] submodule: fix segmentation fault in submodule--helper clone

2016-02-29 Thread Jacob Keller
From: Jacob Keller The git submodule--helper clone command will fail with a segmentation fault when given a null url or null path variable. Since these are required for proper functioning of the submodule--helper clone subcommand, add checks to prevent running and fail gracefully when missing. U

[PATCH v6 0/7] submodule--helper credential.* pass into submodule

2016-02-29 Thread Jacob Keller
From: Jacob Keller This series implements ability to pass the credential.* configuration variables from the command line directly into the submodule. The other patches in this series are small fixups noticed along the way. --> Interdiff between v5 and v6 <-- diff --git a/builtin/submodule--help

[PATCH v6 6/7] quote: implement sq_quotef()

2016-02-29 Thread Jacob Keller
From: Jacob Keller Signed-off-by: Jacob Keller --- quote.c | 13 + quote.h | 3 +++ 2 files changed, 16 insertions(+) diff --git a/quote.c b/quote.c index fe884d24521f..b281a8fe454e 100644 --- a/quote.c +++ b/quote.c @@ -43,6 +43,19 @@ void sq_quote_buf(struct strbuf *dst, const c

Re: [PATCH v6 32/32] tests: add ref-storage argument

2016-02-29 Thread SZEDER Gábor
Hi, > diff --git a/t/t9902-completion.sh b/t/t9902-completion.sh > index 2ba62fb..d5751e2 100755 > --- a/t/t9902-completion.sh > +++ b/t/t9902-completion.sh > @@ -126,7 +126,7 @@ actual="$TRASH_DIRECTORY/actual" > > test_expect_success 'setup for __gitdir tests' ' > mkdir -p subdir/subsub

Re: [PATCH v6 28/32] config: read ref storage config on startup

2016-02-29 Thread Jeff King
On Mon, Feb 29, 2016 at 05:10:24PM -0500, Jeff King wrote: > > We apparently don't always call check_repo_format before calling > > git_config_early -- or, more to the point, before doing ref operations. > > So I think we need this in git_config_early. > > That seems horribly broken, though. If a

Re: [PATCH v6 28/32] config: read ref storage config on startup

2016-02-29 Thread Jeff King
On Mon, Feb 29, 2016 at 04:57:49PM -0500, David Turner wrote: > > By the way, I notice that the default value for the_refs_backend is > > "&refs_be_files". It might be safer to make this NULL (or some > > &refs_be_null that fills the vtable, but just returns an error for > > each > > call). > > I

Re: [PATCH v6 28/32] config: read ref storage config on startup

2016-02-29 Thread Jeff King
On Mon, Feb 29, 2016 at 04:57:42PM -0500, David Turner wrote: > > So I think this setup probably should be in > > check_repository_format_gently(), and should be able to trigger off > > of > > the existing ref_storage_backend string we've already saved (and we > > should bail immediately there if

Re: [PATCH v5 3/3] git: submodule honor -c credential.* from command line

2016-02-29 Thread Jacob Keller
On Mon, Feb 29, 2016 at 11:47 AM, Junio C Hamano wrote: > I was talking about the "not even an equal sign" true, i.e. > > $ git -c random.what -c random.false=no -c random.true=yes \ > config --bool --get-regexp 'random.*' > random.what true > random.false false > random.true

Re: [PATCH v5 1/3] sumodule--helper: fix submodule--helper clone usage and check argc count

2016-02-29 Thread Jacob Keller
On Mon, Feb 29, 2016 at 11:44 AM, Junio C Hamano wrote: > Jacob Keller writes: >> That actually is required because otherwise adding a check for argc >> would break the things. I could split them and do this first and then >> check for argc if you really prefer? > > It is not "check for argc brea

Re: [PATCH] run-command: do not pass child process data into callbacks

2016-02-29 Thread Stefan Beller
It applies on 2.8.0-rc0. (I tried backporting it to 2.7, but realized it is not an issue there) -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v6 28/32] config: read ref storage config on startup

2016-02-29 Thread David Turner
On Fri, 2016-02-26 at 22:56 -0500, Jeff King wrote: > On Wed, Feb 24, 2016 at 05:59:00PM -0500, David Turner wrote: > > > @@ -1207,6 +1208,29 @@ int git_config_early(config_fn_t fn, void > > *data, const char *repo_config) > > } > > > > if (repo_config && !access_or_die(repo_config, R_OK

Re: [PATCH v6 28/32] config: read ref storage config on startup

2016-02-29 Thread David Turner
On Fri, 2016-02-26 at 23:14 -0500, Jeff King wrote: > On Fri, Feb 26, 2016 at 10:56:34PM -0500, Jeff King wrote: > > > My second confusion is why this is happening in git_config_early(). > > That > > function is called during the setup of > > check_repository_format_gently(), > > which is why I th

[PATCH] run-command: do not pass child process data into callbacks

2016-02-29 Thread Stefan Beller
The expected way to pass data into the callback is to pass them via the customizable callback pointer. The error reporting in default_{start_failure, task_finished} is not user friendly enough, that we want to encourage using the child data for such purposes. Furthermore the struct child data is c

Re: [PATCHv19 00/11] Expose submodule parallelism to the user

2016-02-29 Thread Stefan Beller
On Mon, Feb 29, 2016 at 1:51 PM, Junio C Hamano wrote: > Johannes Sixt writes: > >> Am 29.02.2016 um 22:19 schrieb Junio C Hamano: >>> Stefan Beller writes: >>> Maybe we want to remove the struct child_process from the function signature of the callbacks and callbacks need to rely on >

Re: [PATCHv19 00/11] Expose submodule parallelism to the user

2016-02-29 Thread Junio C Hamano
Johannes Sixt writes: > Am 29.02.2016 um 22:19 schrieb Junio C Hamano: >> Stefan Beller writes: >> >>> Maybe we want to remove the struct child_process from the >>> function signature of the callbacks and callbacks need to rely on >>> the data provided solely thru the pointer as passed around fo

Re: [PATCH v4 1/7] quote: remove leading space in sq_dequote_step

2016-02-29 Thread Moritz Neeb
On 02/29/2016 10:45 PM, Moritz Neeb wrote: > On 02/29/2016 08:01 PM, Junio C Hamano wrote: >> Moritz Neeb writes: >> >>> Because sq_quote_argv adds a leading space (which is expected in trace.c), >>> sq_dequote_step should remove this space again, such that the operations >>> of quoting and dequot

Re: [PATCH v4 1/7] quote: remove leading space in sq_dequote_step

2016-02-29 Thread Moritz Neeb
On 02/29/2016 08:01 PM, Junio C Hamano wrote: > Moritz Neeb writes: > >> Because sq_quote_argv adds a leading space (which is expected in trace.c), >> sq_dequote_step should remove this space again, such that the operations >> of quoting and dequoting are inverse of each other. >> >> This patch i

Kreditangebot %100

2016-02-29 Thread Renata Mifleh e Moura Amador
Wenn Sie ein Geschäftskredit für Ihr Unternehmen oder Kapital für die Geschäfts-gründung benötigen, sind Sie bei uns an der richtigen Adresse. - Effektive Jahreszinsen: 2% - Nettodarlehensbeträge: 10.000 bis 20,000,000.000 Euro - Laufzeit: 12 bis 300 Monate - Billigungszeit: 3 Tage Kontakt E-mai

Re: [PATCH] compat/mingw: brown paper bag fix for 50a6c8e

2016-02-29 Thread Jeff King
On Mon, Feb 29, 2016 at 11:10:09AM -0800, Junio C Hamano wrote: > >> - wargs = xmalloc_array(st_add(st_mult(2, args.len), 1), > >> sizeof(wchar_t)); > >> + wargs = ALLOC_ARRAY(st_add(st_mult(2, args.len), 1), > >> sizeof(wchar_t)); > >> xutftowcs(wargs, args.buf, 2 * args.len

Re: [PATCH] Documentation: talk about pager in api-trace.txt

2016-02-29 Thread Jeff King
On Mon, Feb 29, 2016 at 03:21:20PM +0100, Christian Couder wrote: > Signed-off-by: Christian Couder > --- > Documentation/technical/api-trace.txt | 43 > +++ > 1 file changed, 43 insertions(+) I think this is fine. I'm not sure how many people would look at the

Re: GIT_TRACE_PERFORMANCE and pager

2016-02-29 Thread Jeff King
On Mon, Feb 29, 2016 at 02:46:12PM +0100, Christian Couder wrote: > > though I guess I'd question whether trace-performance is interesting at > > all for a paged command, since it is also counting the length of time > > you spend looking at the pager waiting to hit "q". > > In case of "GIT_TRACE_

Re: [PATCH 2/2] Revert "rev-parse: remove restrictions on some options"

2016-02-29 Thread Jeff King
On Mon, Feb 29, 2016 at 09:32:22AM -0800, Junio C Hamano wrote: > Jeff King writes: > > > IOW, I think my 2/2 should be replaced with this: > > This looks sensible. > > Don't we still want the documentation updates from the previous 2/2? I don't think so. They were primarily about moving thos

Re: [PATCHv19 00/11] Expose submodule parallelism to the user

2016-02-29 Thread Johannes Sixt
Am 29.02.2016 um 22:19 schrieb Junio C Hamano: Stefan Beller writes: Maybe we want to remove the struct child_process from the function signature of the callbacks and callbacks need to rely on the data provided solely thru the pointer as passed around for callback purposes, which the user is f

Re: [PATCHv19 00/11] Expose submodule parallelism to the user

2016-02-29 Thread Stefan Beller
On Mon, Feb 29, 2016 at 1:19 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> Maybe we want to remove the struct child_process from the >> function signature of the callbacks and callbacks need to rely on >> the data provided solely thru the pointer as passed around for >> callback purposes

Re: [PATCHv19 00/11] Expose submodule parallelism to the user

2016-02-29 Thread Junio C Hamano
Stefan Beller writes: > Maybe we want to remove the struct child_process from the > function signature of the callbacks and callbacks need to rely on > the data provided solely thru the pointer as passed around for > callback purposes, which the user is free to use for any kind > of data. I thin

Re: [PATCHv19 00/11] Expose submodule parallelism to the user

2016-02-29 Thread Stefan Beller
On Mon, Feb 29, 2016 at 1:01 PM, Junio C Hamano wrote: > Johannes Sixt writes: > >> The culprit seems to be default_task_finished(), which accesses argv[] >> of the struct child_process after finish_command has released it, >> provided the child exited with an error, for example: > > Thanks for a

Git has been accepted as a GSoC 2016 mentor organization!

2016-02-29 Thread Matthieu Moy
Hi, This is my pleasure to inform you all that Git has just been accepted as a GSoC mentor organization. https://summerofcode.withgoogle.com/organizations/?sp-page=3 I've invited Johannes, Stefan, Christian and Lars as potential mentors for Git, and Carlos to represent libgit2. I also took the

  1   2   >