Why does "git reset --hard" fail on file/folder conflicts?

2015-10-12 Thread Christian Halstrick
Hi, git doesn't want to do a git reset hard when for a certain path the index contains a tree, worktree contains a file and the commit to reset to contains nothing. Is it a bug or is it intended? I would expect git to simply delete that path from index and worktree. > git init Initialized empty G

Solaris: Fail to build git with CFLAGS=-m64

2015-10-12 Thread evgeny litvinenko
Hi. Tried to build git-2.6.1 on Solaris (Oracle Solaris 11.2 and OpenIndiana 151.1.9) with CFLAGS="-m64" and got an error during make step: GIT_VERSION = 2.6.1 * new build flags gcc -o credential-store.o -c -MF ./.depend/credential-store.o.d -MQ credential-store.o -MMD -MP --save-temps -O2 -

Re: [PATCH v3 18/44] refs: move transaction functions into common code

2015-10-12 Thread Michael Haggerty
On 10/12/2015 11:51 PM, David Turner wrote: > The common ref code will build up a ref transaction. Backends will > then commit it. So the transaction creation and update functions should > be in the common code. We also need to move the ref structs into > the common code so that alternate backen

Re: [PATCH v3 16/44] refs.c: move ref iterators to the common code

2015-10-12 Thread Michael Haggerty
On 10/12/2015 11:51 PM, David Turner wrote: > From: Ronnie Sahlberg > > Signed-off-by: Ronnie Sahlberg > --- > refs-be-files.c | 82 > - > refs.c | 81 > 2 files changed, 8

Re: [PATCH v3 06/44] refs.c: move delete_ref and delete_refs to the common code

2015-10-12 Thread Michael Haggerty
On 10/12/2015 11:51 PM, David Turner wrote: > From: Ronnie Sahlberg > > Move delete_pseudoref, delete_ref() and delete_refs() to the refs.c > file since these functions do not contain any backend specific code. > > Based on a patch by Ronnie Sahlberg. > > Signed-off-by: David Turner > Signed-o

Re: [PATCH v3 05/44] refs.c: move update_ref to refs.c

2015-10-12 Thread Michael Haggerty
On 10/12/2015 11:51 PM, David Turner wrote: > From: Ronnie Sahlberg > > Move update_ref() to the refs.c file since this function does not > contain any backend specific code. Move the ref classifier functions > as well, since update_ref depends on them. > > Based on Ronnie Sahlberg's patch > >

Re: [PATCH v3 02/44] refs: make repack_without_refs and is_branch public

2015-10-12 Thread Michael Haggerty
On 10/12/2015 11:51 PM, David Turner wrote: > is_branch was already non-static, but this patch declares it in the > header. > > Signed-off-by: Ronnie Sahlberg > Signed-off-by: David Turner > --- > [...] It seems odd that repack_without_refs() should be made public (and ultimately end up in refs

Re: [PATCH v3 01/44] refs.c: create a public version of verify_refname_available

2015-10-12 Thread Michael Haggerty
On 10/12/2015 11:51 PM, David Turner wrote: > From: Ronnie Sahlberg > > Create a public version of verify_refname_available that backends can > provide. > > Signed-off-by: Ronnie Sahlberg > Signed-off-by: David Turner > --- > refs.c | 65 ++-

[PATCHv2] submodule-config: Shorten logic in parse_config

2015-10-12 Thread Stefan Beller
This makes the parsing more concise by removing the forward goto as well as unifying the structure of parsing the {ignore, url, path} options. By unifying we introduce subtle changes in the error cases. We notice non-boolean variables before noticing duplicate variables now. CC: Eric Sunshine CC:

Re: [PATCH] Add fetch.recurseSubmoduleParallelism config option

2015-10-12 Thread Junio C Hamano
Stefan Beller writes: > There is core.preloadIndex to enable parallel index preload, but > that is boolean and not giving fine control to the user. We want to give > fine control to the user here I'd assume. I'd approach this as "fetching multiple submodules at a time", if I were deciding its na

Re: [PATCH] Add fetch.recurseSubmoduleParallelism config option

2015-10-12 Thread Stefan Beller
On Mon, Oct 12, 2015 at 4:14 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> This allows to configure fetching in parallel without having the annoying >> command line option. > > s/annoying//; > > I think this is a sane thing to do, but the name of the variable may > want to be bikeshedded

Re: [PATCH] Add fetch.recurseSubmoduleParallelism config option

2015-10-12 Thread Junio C Hamano
Stefan Beller writes: > This allows to configure fetching in parallel without having the annoying > command line option. s/annoying//; I think this is a sane thing to do, but the name of the variable may want to be bikeshedded a bit. > This moved the responsibility to determine how many parall

[PATCH] Add fetch.recurseSubmoduleParallelism config option

2015-10-12 Thread Stefan Beller
This allows to configure fetching in parallel without having the annoying 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 processe

Re: [PATCH v2] merge: fix cache_entry use-after-free

2015-10-12 Thread Junio C Hamano
David Turner writes: > From: Keith McGuigan > > During merges, we would previously free entries that we no longer need > in the destination index. But those entries might also be stored in > the dir_entry cache, and when a later call to add_to_index found them, > they would be used after being

Re: [PATCH v3 19/44] refs-be-files.c: add a backend method structure with transaction functions

2015-10-12 Thread David Turner
Please disregard this one; I rewrorded the commit message and forgot to delete this patch. On Mon, 2015-10-12 at 17:51 -0400, David Turner wrote: > From: Ronnie Sahlberg > > Add a ref structure for backend methods. Start by adding a method pointer > for the transaction commit function. > > Ad

[PATCH v3 05/44] refs.c: move update_ref to refs.c

2015-10-12 Thread David Turner
From: Ronnie Sahlberg Move update_ref() to the refs.c file since this function does not contain any backend specific code. Move the ref classifier functions as well, since update_ref depends on them. Based on Ronnie Sahlberg's patch Signed-off-by: Ronnie Sahlberg Signed-off-by: David Turner

[PATCH v3 01/44] refs.c: create a public version of verify_refname_available

2015-10-12 Thread David Turner
From: Ronnie Sahlberg Create a public version of verify_refname_available that backends can provide. Signed-off-by: Ronnie Sahlberg Signed-off-by: David Turner --- refs.c | 65 ++--- refs.h | 17 + 2 files changed, 47

[PATCH v2] merge: fix cache_entry use-after-free

2015-10-12 Thread David Turner
From: Keith McGuigan During merges, we would previously free entries that we no longer need in the destination index. But those entries might also be stored in the dir_entry cache, and when a later call to add_to_index found them, they would be used after being freed. To prevent this, add a ref

Fwd: [PATCH] submodule: Test a shallow branch

2015-10-12 Thread Stefan Beller
I forgot to CC you guys. -- Forwarded message -- From: Stefan Beller Date: Mon, Oct 12, 2015 at 2:36 PM Subject: [PATCH] submodule: Test a shallow branch To: gits...@pobox.com Cc: git@vger.kernel.org, carlosjosep...@gmail.com, Stefan Beller Instead of tracking the submodule at

[PATCH v3 11/44] refs.c: move read_ref, read_ref_full and ref_exists to the common code

2015-10-12 Thread David Turner
From: Ronnie Sahlberg These functions do not depend on the backend implementation so we move them to the common code. Signed-off-by: Ronnie Sahlberg Signed-off-by: David Turner --- refs-be-files.c | 18 -- refs.c | 18 ++ 2 files changed, 18 insertions

[PATCH v3 14/44] refs.c: move is_branch to the common code

2015-10-12 Thread David Turner
From: Ronnie Sahlberg Signed-off-by: Ronnie Sahlberg Signed-off-by: David Turner --- refs-be-files.c | 5 - refs.c | 5 + 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/refs-be-files.c b/refs-be-files.c index 9c57dcc..1214d9e 100644 --- a/refs-be-files.c +++ b/

[PATCH v3 32/44] initdb: move safe_create_dir into common code

2015-10-12 Thread David Turner
In a moment, we'll create initdb functions for ref backends, and code from initdb that calls this function needs to move into the files backend. So this function needs to be public. Signed-off-by: David Turner --- builtin/init-db.c | 12 cache.h | 5 + path.c

[PATCH v3 26/44] refs.c: move copy_msg to the common code

2015-10-12 Thread David Turner
Rename copy_msg to copy_reflog_msg and make it public. Signed-off-by: David Turner --- refs-be-files.c | 28 +--- refs.c | 26 ++ refs.h | 2 ++ 3 files changed, 29 insertions(+), 27 deletions(-) diff --git a/refs-be-files.c b/r

[PATCH v3 06/44] refs.c: move delete_ref and delete_refs to the common code

2015-10-12 Thread David Turner
From: Ronnie Sahlberg Move delete_pseudoref, delete_ref() and delete_refs() to the refs.c file since these functions do not contain any backend specific code. Based on a patch by Ronnie Sahlberg. Signed-off-by: David Turner Signed-off-by: Ronnie Sahlberg --- refs-be-files.c | 94

[PATCH v3 21/44] refs-be-files.c: add methods for the ref iterators

2015-10-12 Thread David Turner
From: Ronnie Sahlberg Signed-off-by: Ronnie Sahlberg Signed-off-by: David Turner --- refs-be-files.c | 41 -- refs.c | 69 ++--- refs.h | 34 +--- 3 files changed, 116

[PATCH v3 34/44] refs-be-files.c: add method to rename refs

2015-10-12 Thread David Turner
We also have to make rename_ref_available public, since alternate backends for rename_ref will need it. Signed-off-by: David Turner --- refs-be-files.c | 20 +++- refs.c | 21 + refs.h | 7 ++- 3 files changed, 30 insertions(+), 18 delet

[PATCH v3 10/44] refs.c: move warn_if_dangling_symref* to the common code

2015-10-12 Thread David Turner
From: Ronnie Sahlberg These functions do not use any backend specific code so we move them to the common code. Signed-off-by: Ronnie Sahlberg Signed-off-by: David Turner --- refs-be-files.c | 52 refs.c | 52 +++

[PATCH v3 19/44] refs-be-files.c: add a backend method structure with transaction functions

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

[PATCH v3 03/44] refs-be-files.c: rename refs to refs-be-files

2015-10-12 Thread David Turner
From: Ronnie Sahlberg Rename refs.c to refs-be-files.c to indicate that this file now holds the implementation for the files based refs backend. A smaller portion of the code in this file is backend agnostic and will be moved to a a new refs.c file that will hold all the common refs code that is

[PATCH v3 19/44] refs: add a backend method structure with transaction functions

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

[PATCH v3 07/44] refs.c: move read_ref_at to the common refs file

2015-10-12 Thread David Turner
From: Ronnie Sahlberg Move read_ref_at() to the refs.c file since this function does not contain any backend specific code. Signed-off-by: Ronnie Sahlberg Signed-off-by: David Turner --- refs-be-files.c | 118 refs.c | 118

[PATCH v3 18/44] refs: move transaction functions into common code

2015-10-12 Thread David Turner
The common ref code will build up a ref transaction. Backends will then commit it. So the transaction creation and update functions should be in the common code. We also need to move the ref structs into the common code so that alternate backends can access them. Later, we will modify struct re

[PATCH v3 20/44] refs-be-files.c: add methods for misc ref operations

2015-10-12 Thread David Turner
From: Ronnie Sahlberg Add ref backend methods for: resolve_ref_unsafe, verify_refname_available, pack_refs, peel_ref, create_symref, resolve_gitlink_ref. Signed-off-by: Ronnie Sahlberg Signed-off-by: David Turner --- builtin/init-db.c | 1 + cache.h | 7 +++ refs-be-files.c

[PATCH v3 23/44] refs-be-files.c: add do_for_each_per_worktree_ref

2015-10-12 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 v3 28/44] refs.c: move should_autocreate_reflog to common code

2015-10-12 Thread David Turner
Signed-off-by: David Turner --- refs-be-files.c | 10 -- refs.c | 10 ++ refs.h | 2 ++ 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/refs-be-files.c b/refs-be-files.c index bf2fd7a..73111e7 100644 --- a/refs-be-files.c +++ b/refs-be-files.c @

[PATCH v3 30/44] refs.c: add methods for reflog

2015-10-12 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 --- refs-be-files.c | 35 +++ refs.c

[PATCH v3 27/44] refs.c: move peel_object to the common code

2015-10-12 Thread David Turner
This function does not contain any backend specific code so we move it to the common code. Signed-off-by: David Turner --- refs-be-files.c | 53 - refs.c | 31 +++ refs.h | 27 ++

[PATCH v3 29/44] refs.c: add ref backend init function

2015-10-12 Thread David Turner
The file backend doesn't need this function, but other backends might. Signed-off-by: David Turner Signed-off-by: Ronnie Sahlberg --- refs-be-files.c | 6 ++ refs.c | 3 ++- refs.h | 4 +++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/refs-be-files.c b/

[PATCH v3 31/44] refs.c: add method for initial ref transaction commit

2015-10-12 Thread David Turner
Signed-off-by: Ronnie Sahlberg Signed-off-by: David Turner --- refs-be-files.c | 5 +++-- refs.c | 6 ++ refs.h | 1 + 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/refs-be-files.c b/refs-be-files.c index 104e90f..7560a55 100644 --- a/refs-be-files.c +++ b

[PATCH v3 40/44] refs: allow ref backend to be set for clone

2015-10-12 Thread David Turner
Add a new option, --refs-backend-type, to allow the ref backend type to be set on new clones. Submodules must use the same ref backend as the parent repository, so we also pass the --refs-backend-type option option when cloning submodules. Signed-off-by: David Turner --- Documentation/git-clone

[PATCH v3 44/44] refs: tests for db backend

2015-10-12 Thread David Turner
Add tests for the database backend. Signed-off-by: David Turner Helped-by: Dennis Kaarsemaker --- t/t1460-refs-be-db.sh| 1109 ++ t/t1470-refs-be-db-reflog.sh | 359 ++ t/test-lib.sh|1 + 3 files changed, 1469 inse

[PATCH v3 43/44] refs: add LMDB refs backend

2015-10-12 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 i

[PATCH v3 22/44] refs-be-files.c: add method for for_each_reftype_...

2015-10-12 Thread David Turner
Add method for for_each_reftype_fullpath. Signed-off-by: David Turner --- refs-be-files.c | 11 +++ refs.c | 7 +++ refs.h | 3 +++ 3 files changed, 21 insertions(+) diff --git a/refs-be-files.c b/refs-be-files.c index 2e2399e..c99319f 100644 --- a/refs-be-files.

[PATCH v3 39/44] refs: always handle non-normal refs in files backend

2015-10-12 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). We ha

[PATCH v3 41/44] refs: add register_refs_backend

2015-10-12 Thread David Turner
Add register_refs_backend, to allow refs backends to be registered. Signed-off-by: David Turner --- refs.c | 6 ++ refs.h | 1 + 2 files changed, 7 insertions(+) diff --git a/refs.c b/refs.c index 901558d..534d12e 100644 --- a/refs.c +++ b/refs.c @@ -23,6 +23,12 @@ struct ref_be *refs_backe

[PATCH v3 42/44] introduce "extensions" form of core.repositoryformatversion

2015-10-12 Thread David Turner
From: Jeff King Normally we try to avoid bumps of the whole-repository core.repositoryformatversion field. However, it is unavoidable if we want to safely change certain aspects of git in a backwards-incompatible way (e.g., modifying the set of ref tips that we must traverse to generate a list of

[PATCH v3 37/44] refs: break out a ref conflict check

2015-10-12 Thread David Turner
Create new function verify_no_descendants, to hold one of the ref conflict checks used in verify_refname_available. Multiple backends will need this function, so it goes in the common code. Signed-off-by: David Turner --- refs-be-files.c | 33 - refs.c |

[PATCH v3 36/44] refs: make files_log_ref_write functions public

2015-10-12 Thread David Turner
Because HEAD and stash are per-worktree, refs.c needs to go through the files backend to write these refs. In this patch, we make one files backend internal functions public. Later, we will use this to handle reflog updates for per-worktree symbolic refs (HEAD). Signed-off-by: David Turner ---

[PATCH v3 25/44] refs.h: document make refname_is_safe and add it to header

2015-10-12 Thread David Turner
This function might be used by other refs backends Signed-off-by: David Turner --- refs.h | 11 +++ 1 file changed, 11 insertions(+) diff --git a/refs.h b/refs.h index fc8a748..7a936e2 100644 --- a/refs.h +++ b/refs.h @@ -348,6 +348,17 @@ int verify_refname_available(const char *newname

[PATCH v3 33/44] refs.c: add method for initializing refs db

2015-10-12 Thread David Turner
Alternate refs backends might not need refs/heads and so on, so we make ref db initialization part of the backend. Signed-off-by: David Turner --- builtin/init-db.c | 14 -- refs-be-files.c | 17 + refs.c| 5 + refs.h| 4 4 files c

[PATCH v3 35/44] refs: make lock generic

2015-10-12 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 --- refs-be-files.c | 29 - refs.h | 2 +- 2 files changed,

[PATCH v3 38/44] refs: move duplicate check to common code

2015-10-12 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 --- refs-be-files.c | 57

[PATCH v3 24/44] refs.c: move refname_is_safe to the common code

2015-10-12 Thread David Turner
This function does not contain any backend specific code so we move it to the common code. Signed-off-by: Ronnie Sahlberg Signed-off-by: David Turner --- refs-be-files.c | 33 - refs.c | 24 refs.h | 2 ++ 3 files chang

[PATCH v3 13/44] refs.c: move check_refname_format to the common code

2015-10-12 Thread David Turner
From: Ronnie Sahlberg This function does not contain any backend specific code so we move it to the common code. Signed-off-by: Ronnie Sahlberg Signed-off-by: David Turner --- refs-be-files.c | 109 refs.c | 109 +++

[PATCH v3 08/44] refs.c: move the hidden refs functions to the common code

2015-10-12 Thread David Turner
From: Ronnie Sahlberg Move the hidden refs functions to the refs.c file since these functions do not contain any backend specific code. Signed-off-by: Ronnie Sahlberg Signed-off-by: David Turner --- refs-be-files.c | 51 --- refs.c | 50

[PATCH v3 16/44] refs.c: move ref iterators to the common code

2015-10-12 Thread David Turner
From: Ronnie Sahlberg Signed-off-by: Ronnie Sahlberg --- refs-be-files.c | 82 - refs.c | 81 2 files changed, 81 insertions(+), 82 deletions(-) diff --git a/refs-be-files.

[PATCH v3 12/44] refs.c: move resolve_refdup to common

2015-10-12 Thread David Turner
From: Ronnie Sahlberg This function can be shared across all refs backends so move it to the common code. Signed-off-by: Ronnie Sahlberg Signed-off-by: David Turner --- refs-be-files.c | 7 --- refs.c | 7 +++ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ref

[PATCH v3 04/44] refs.c: add a new refs.c file to hold all common refs code

2015-10-12 Thread David Turner
From: Ronnie Sahlberg Create a new refs.c file that will be used to hold all the refs code that is backend agnostic and will be shared across all backends. Signed-off-by: Ronnie Sahlberg --- Makefile | 1 + refs.c | 3 +++ 2 files changed, 4 insertions(+) create mode 100644 refs.c diff --g

[PATCH v3 15/44] refs.c: move prettify_refname to the common code

2015-10-12 Thread David Turner
From: Ronnie Sahlberg Signed-off-by: Ronnie Sahlberg --- refs-be-files.c | 9 - refs.c | 9 + 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/refs-be-files.c b/refs-be-files.c index 1214d9e..ecf2b33 100644 --- a/refs-be-files.c +++ b/refs-be-files.c @@ -2

[PATCH v3 17/44] refs.c: move head_ref_namespaced to the common code

2015-10-12 Thread David Turner
From: Ronnie Sahlberg Signed-off-by: Ronnie Sahlberg --- refs-be-files.c | 15 --- refs.c | 15 +++ 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/refs-be-files.c b/refs-be-files.c index 46fa43c..34ed220 100644 --- a/refs-be-files.c +++ b/refs-

[PATCH v3 09/44] refs.c: move dwim and friend functions to the common refs code

2015-10-12 Thread David Turner
From: Ronnie Sahlberg These functions do not contain any backend specific code so we move them to the common code and share across all backends. Signed-off-by: Ronnie Sahlberg Signed-off-by: David Turner --- refs-be-files.c | 203 refs.

[PATCH v3 00/44] alternate refs backends

2015-10-12 Thread David Turner
This version of the patch set includes the following changes: 1. Numerous formatting and style updates. Thanks for Michael Haggerty to pointing these out; remaining errors are of course my own. 2. Fixed warnings. Thanks to Michael Haggerty, Michael Blume, and Torsten Bögershausen for pointing th

[PATCH v3 02/44] refs: make repack_without_refs and is_branch public

2015-10-12 Thread David Turner
is_branch was already non-static, but this patch declares it in the header. Signed-off-by: Ronnie Sahlberg Signed-off-by: David Turner --- refs.c | 9 + refs.h | 13 + 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/refs.c b/refs.c index fe71ea0..d0dfdfc 100

[PATCH] submodule: Test a shallow branch

2015-10-12 Thread Stefan Beller
Instead of tracking the submodule at the specified branch, using a shallow clone, we get the following error: fatal: Cannot update paths and switch to branch 'anotherbranch' at the same time. Did you intend to checkout 'origin/anotherbranch' which can not be resolved as commit? Unable to checkou

Re: [PATCH 2/2] pull --rebase: reinstate helpful message on abort

2015-10-12 Thread Junio C Hamano
Johannes Schindelin writes: > Hi Junio, > > On 2015-10-09 20:36, Junio C Hamano wrote: >> Johannes Schindelin writes: >> >>> When calling `git pull --rebase`, things can go wrong. In such a case, >>> we want to tell the user about the most common ways out of this fix: >>> ... >>> builtin/am.c

Re: [PATCH 0/2] Reinstate the helpful message when `git pull --rebase` fails

2015-10-12 Thread Junio C Hamano
Johannes Schindelin writes: >> I think the most sensible regression fix as the first step at this >> point is to call it as a separate process, just like the code calls >> "apply" as a separate process for each patch. Optimization can come >> later when it is shown that it matters---we need to r

Re: How to rebase when some commit hashes are in some commit messages

2015-10-12 Thread Matthieu Moy
Francois-Xavier Le Bail writes: > Hello, > > [I try some search engines without success, perhaps I have missed something]. > > For example, if I rebase the following commits, I would want that if > the commit hash 222... become 777..., > the message > "Update test output for 2

Re: [PATCH v3 1/3] Add Travis CI support

2015-10-12 Thread Matthieu Moy
larsxschnei...@gmail.com writes: > --- /dev/null > +++ b/.travis.yml > @@ -0,0 +1,46 @@ > +language: c > + > +os: > + - linux > + - osx > + > +compiler: > + - clang > + - gcc > + > +before_install: > + - > > +export GIT_TEST_OPTS=" --quiet"; > +case "${TRAVIS_OS_NAME:-linux}" in > +

Re: [PATCH v3 1/3] Add Travis CI support

2015-10-12 Thread Matthieu Moy
Lars Schneider writes: > {Linux | OSX} * {gcc | clang} * {Default, NO_PTHREAD, NO_CURL, NO_OPENSSL, > NO_MMAP, NO_IPV6, NO_PERL} Another option would be to have a single "NO_*" build, that would activate all NO_PTHREAD, NO_CURL, NO_OPENSSL, NO_MMAP, NO_IPV6, NO_PERL at the same time. We'd miss

How to rebase when some commit hashes are in some commit messages

2015-10-12 Thread Francois-Xavier Le Bail
Hello, [I try some search engines without success, perhaps I have missed something]. For example, if I rebase the following commits, I would want that if the commit hash 222... become 777..., the message "Update test output for " become "Update test

Re: [PATCH v3 1/3] Add Travis CI support

2015-10-12 Thread Sebastian Schuberth
On Mon, Oct 12, 2015 at 9:43 PM, Lars Schneider wrote: >> Reading through Travis' docs [3] again, "before_script" is documented >> to "return a non-zero exit code, the build is errored and stops >> immediately", while "script" is documented as "returns a non-zero exit >> code, the build is failed

Add submodule specifying depth and branch at the same time won't work

2015-10-12 Thread Carlos Pita
For example, I can do: git clone --depth 1 --branch devel g...@gitlab.com:memeplex/bash.git But if I try: git submodule add --depth 1 -b devel g...@gitlab.com:memeplex/bash.git I get: fatal: Cannot update paths and switch to branch 'devel' at the same time. Did you intend to checkout 'origin/d

Re: [PATCH v3 1/3] Add Travis CI support

2015-10-12 Thread Sebastian Schuberth
On Mon, Oct 12, 2015 at 9:40 PM, Lars Schneider wrote: >> This is a slightly related tangent, but we saw a few build issues >> reported recently on customized configurations like NO_PTHREAD. If >> we are to start using automated tests, I wonder if we want to build >> (and optionally test) with v

Re: [PATCH v3 1/3] Add Travis CI support

2015-10-12 Thread Lars Schneider
On 12 Oct 2015, at 12:37, Sebastian Schuberth wrote: > On Mon, Oct 12, 2015 at 7:12 PM, Lars Schneider > wrote: > +install: make configure && ./configure + +before_script: make + +script: make --quiet test >>> >>> Semantically, it does not seem correct to me that conf

Re: [PATCH v3 1/3] Add Travis CI support

2015-10-12 Thread Lars Schneider
On 12 Oct 2015, at 09:02, Junio C Hamano wrote: > Sebastian Schuberth writes: > >> Semantically, it does not seem correct to me that configuarion goes to >> the install step. As "make test" will build git anyway, I'd instead >> propose to get rid of "install" and just say: >> >> before_script

Re: [PATCH v3 1/3] Add Travis CI support

2015-10-12 Thread Sebastian Schuberth
On Mon, Oct 12, 2015 at 7:12 PM, Lars Schneider wrote: >>> +install: make configure && ./configure >>> + >>> +before_script: make >>> + >>> +script: make --quiet test >> >> Semantically, it does not seem correct to me that configuarion goes to the >> install step. As "make test" will build git a

Re: [PATCHv7 0/8] fetch submodules in parallel

2015-10-12 Thread Junio C Hamano
Thanks; will replace. -- 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] submodule-config: Untangle logic in parse_config

2015-10-12 Thread Junio C Hamano
Stefan Beller writes: > This improves readability of the parse_config logic by making it more concise. This does make it shorter, but "improve readability" is highly subjective and "untangle logic" is content-free without explaining what aspect of the logic is being untangled into what other sha

Re: [PATCH v2 00/10] port branch.c to use ref-filter's printing options

2015-10-12 Thread Matthieu Moy
Junio C Hamano writes: > If you design a new infrastructure to help refactoring early > (i.e. before adding many copies of code that need to be cleaned up > later), it would make the work of reviewing of the design of the > helper and refactoring using that helper smaller, not larger. But most o

Re: [PATCH v2 00/10] port branch.c to use ref-filter's printing options

2015-10-12 Thread Junio C Hamano
Matthieu Moy writes: > Karthik Nayak writes: > >> On Mon, Oct 12, 2015 at 6:06 AM, Junio C Hamano wrote: >>> Karthik Nayak writes: >>> On Fri, Oct 9, 2015 at 11:59 PM, Junio C Hamano wrote: ... Also does it make sense to integrate these changes here? Or would you like to

[PATCHv7 4/8] strbuf: add strbuf_read_once to read without blocking

2015-10-12 Thread Stefan Beller
The new call will read from a file descriptor into a strbuf once. The underlying call xread_nonblock is meant to execute without blocking if the file descriptor is set to O_NONBLOCK. It is a bug to call strbuf_read_once on a file descriptor which would block. Signed-off-by: Stefan Beller Signed-o

[PATCHv7 3/8] xread_nonblock: add functionality to read from fds without blocking

2015-10-12 Thread Stefan Beller
Provide a wrapper to read(), similar to xread(), that restarts on EINTR but not EAGAIN (or EWOULDBLOCK). This enables the caller to handle polling itself, possibly polling multiple sockets or performing some other action. Helped-by: Jacob Keller Helped-by: Jeff King , Helped-by: Junio C Hamano S

[PATCHv7 0/8] fetch submodules in parallel

2015-10-12 Thread Stefan Beller
fixing two smaller nits noticed by Ramsay * make struct parallel_processes static * omit the forward declaration of get_next_submodule by reordering. Jonathan Nieder (1): submodule.c: write "Fetching submodule " to stderr Stefan Beller (7): xread: poll on non blocking fds xread_nonblock:

[PATCHv7 8/8] submodules: allow parallel fetching, add tests and documentation

2015-10-12 Thread Stefan Beller
This enables the work of the previous patches. Signed-off-by: Stefan Beller --- Documentation/fetch-options.txt | 7 +++ builtin/fetch.c | 6 +- builtin/pull.c | 6 ++ submodule.c | 3 +-- submodule.h | 2 +

[PATCHv7 1/8] submodule.c: write "Fetching submodule " to stderr

2015-10-12 Thread Stefan Beller
From: Jonathan Nieder The "Pushing submodule " progress output correctly goes to stderr, but "Fetching submodule " is going to stdout by mistake. Fix it to write to stderr. Noticed while trying to implement a parallel submodule fetch. When this particular output line went to a different file d

[PATCHv7 5/8] sigchain: add command to pop all common signals

2015-10-12 Thread Stefan Beller
The new method removes all common signal handlers that were installed by sigchain_push. CC: Jeff King Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano --- sigchain.c | 9 + sigchain.h | 1 + 2 files changed, 10 insertions(+) diff --git a/sigchain.c b/sigchain.c index faa375d

[PATCHv7 2/8] xread: poll on non blocking fds

2015-10-12 Thread Stefan Beller
>From the man page: EAGAIN The file descriptor fd refers to a file other than a socket and has been marked nonblocking (O_NONBLOCK), and the read would block. EAGAIN or EWOULDBLOCK The file descriptor fd refers to a socket and has been marked nonblocking (O_NONBLOCK), a

[PATCHv7 6/8] run-command: add an asynchronous parallel child processor

2015-10-12 Thread Stefan Beller
This allows to run external commands in parallel with ordered output on stderr. If we run external commands in parallel we cannot pipe the output directly to the our stdout/err as it would mix up. So each process's output will flow through a pipe, which we buffer. One subprocess can be directly pi

[PATCHv7 7/8] fetch_populated_submodules: use new parallel job processing

2015-10-12 Thread Stefan Beller
In a later patch we enable parallel processing of submodules, this only adds the possibility for it. So this change should not change any user facing behavior. Signed-off-by: Stefan Beller --- submodule.c | 145 ++-- 1 file changed, 101 ins

Re: [PATCH v3 1/3] Add Travis CI support

2015-10-12 Thread Sebastian Schuberth
On Mon, Oct 12, 2015 at 6:02 PM, Junio C Hamano wrote: >> Semantically, it does not seem correct to me that configuarion goes to >> the install step. As "make test" will build git anyway, I'd instead >> propose to get rid of "install" and just say: >> >> before_script: make configure && ./configu

Re: [PATCH v2 00/10] port branch.c to use ref-filter's printing options

2015-10-12 Thread Matthieu Moy
Karthik Nayak writes: > On Mon, Oct 12, 2015 at 6:06 AM, Junio C Hamano wrote: >> Karthik Nayak writes: >> >>> On Fri, Oct 9, 2015 at 11:59 PM, Junio C Hamano wrote: >>> ... >>> Also does it make sense to integrate these changes here? Or would you like >>> to >>> have another series on this?

Re: [PATCH 1/3] fixup: use xstrfmt instead of fixed-size buf + sprintf + xstrdup

2015-10-12 Thread Karthik Nayak
On Mon, Oct 12, 2015 at 11:15 PM, Junio C Hamano wrote: > Matthieu Moy writes: > >> The char buf[40] is safe (at least while the strings are not >> translated), but I'd rather avoid magic numbers like this 40 in the >> code, and use a construct that does not have this size limitation. >> Especial

[PATCH] submodule-config: Untangle logic in parse_config

2015-10-12 Thread Stefan Beller
This improves readability of the parse_config logic by making it more concise. CC: Eric Sunshine CC: Heiko Voigt Signed-off-by: Stefan Beller --- Eric commented on this during the long series for parallelizing fetching submodules. I realized this can be added as an independant patch as it d

Re: thread-utils: build with NO_PTHREADS fails

2015-10-12 Thread Junio C Hamano
Junio C Hamano writes: > Victor Leschuk writes: > >> I think that no one tried it for a long time but I needed a >> single-threaded git version for debug purpose. I tried to build >> with -DNO_PTHREADS and thread-utils.c failed to compile. >> >> In brief the situation is the following: >> >> in

Re: [PATCH v2 00/10] port branch.c to use ref-filter's printing options

2015-10-12 Thread Karthik Nayak
On Mon, Oct 12, 2015 at 6:06 AM, Junio C Hamano wrote: > Karthik Nayak writes: > >> On Fri, Oct 9, 2015 at 11:59 PM, Junio C Hamano wrote: >> ... >> Also does it make sense to integrate these changes here? Or would you like to >> have another series on this? > > I do not think you would want to

Re: [PATCH 1/3] fixup: use xstrfmt instead of fixed-size buf + sprintf + xstrdup

2015-10-12 Thread Junio C Hamano
Matthieu Moy writes: > The char buf[40] is safe (at least while the strings are not > translated), but I'd rather avoid magic numbers like this 40 in the > code, and use a construct that does not have this size limitation. > Especially if it makes the code shorter. > > Signed-off-by: Matthieu Moy

Re: [PATCH v3 1/3] Add Travis CI support

2015-10-12 Thread Lars Schneider
On 12 Oct 2015, at 01:05, Sebastian Schuberth wrote: > On 10/11/2015 19:55, larsxschnei...@gmail.com wrote: > >> + sudo apt-get update -qq >> + sudo apt-get install -y apt-transport-https >> + sudo apt-get install perforce-server git-lfs > > Why no "-y" also in this line, or app

[PATCH v1 2/2] git-p4: Skip t9819 test case on case insensitive file systems

2015-10-12 Thread larsxschneider
From: Lars Schneider Windows and OS X file systems are case insensitive by default. Consequently the "git-p4-case-folding" test case does not apply to them. Signed-off-by: Lars Schneider Acked-by: Luke Diamand --- t/t9819-git-p4-case-folding.sh | 6 ++ 1 file changed, 6 insertions(+) dif

[PATCH v1 0/2] git-p4: Fix tests on OS X

2015-10-12 Thread larsxschneider
From: Lars Schneider I extracted this patch series from "[PATCH v3 0/3] Add Travis CI support" as suggested by Junio. Thanks, Lars Lars Schneider (2): git-p4: Improve test case portability for t9815 git-p4-submit-fail git-p4: Skip t9819 test case on case insensitive file systems t/t9815-g

[PATCH v1 1/2] git-p4: Improve test case portability for t9815 git-p4-submit-fail

2015-10-12 Thread larsxschneider
From: Lars Schneider Replace the stats command with the ls command to check file mode bits. The stats command is not available on Windows and has different command line options on OS X. Signed-off-by: Lars Schneider --- t/t9815-git-p4-submit-fail.sh | 7 ++- 1 file changed, 2 insertions(+)

  1   2   >